diff --git a/logs/MLTrader_2024-04-13_03-47-40_logs.csv b/logs/MLTrader_2024-04-13_03-47-40_logs.csv new file mode 100644 index 0000000..27f143e --- /dev/null +++ b/logs/MLTrader_2024-04-13_03-47-40_logs.csv @@ -0,0 +1,29898 @@ +2024-04-13 03:47:40,210: asyncio: INFO: [MLTrader] Executing the initialize lifecycle method +2024-04-13 03:47:41,322: root: INFO: Current backtesting datetime 2020-01-02 08:30:00-05:00 +2024-04-13 03:47:41,322: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:47:41,323: root: INFO: Current backtesting datetime 2020-01-02 09:30:00-05:00 +2024-04-13 03:47:41,323: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:47:41,324: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:47:41 +2024-04-13 03:47:41,325: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:41,340: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:41,341: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:47:41,355: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:47:41,355: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:47:41,356: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:47:41,357: root: INFO: Current backtesting datetime 2020-01-02 16:00:00-05:00 +2024-04-13 03:47:41,357: root: INFO: Current backtesting datetime 2020-01-03 09:30:00-05:00 +2024-04-13 03:47:41,358: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:47:41 +2024-04-13 03:47:41,358: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:41,359: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:41,359: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:47:41,359: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:47:41,359: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:47:45,795: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:47:45,796: root: INFO: Current backtesting datetime 2020-01-03 16:00:00-05:00 +2024-04-13 03:47:45,797: root: INFO: Current backtesting datetime 2020-01-04 09:30:00-05:00 +2024-04-13 03:47:45,798: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:47:45,800: root: INFO: Current backtesting datetime 2020-01-04 09:29:00-05:00 +2024-04-13 03:47:45,802: root: INFO: Current backtesting datetime 2020-01-04 09:29:00-05:00 +2024-04-13 03:47:45,802: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:47:45,803: root: INFO: Current backtesting datetime 2020-01-06 08:30:00-05:00 +2024-04-13 03:47:45,804: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:47:45,805: root: INFO: Current backtesting datetime 2020-01-06 09:30:00-05:00 +2024-04-13 03:47:45,806: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:47:45,807: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:47:45 +2024-04-13 03:47:45,807: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:45,809: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:45,809: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:47:45,810: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:47:45,810: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:47:48,882: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:47:48,883: root: INFO: Current backtesting datetime 2020-01-06 16:00:00-05:00 +2024-04-13 03:47:48,883: root: INFO: Current backtesting datetime 2020-01-07 09:30:00-05:00 +2024-04-13 03:47:48,884: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:47:48 +2024-04-13 03:47:48,884: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:48,885: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:48,885: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:47:48,885: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:47:48,886: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:47:55,138: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:47:55,139: root: INFO: Current backtesting datetime 2020-01-07 16:00:00-05:00 +2024-04-13 03:47:55,139: root: INFO: Current backtesting datetime 2020-01-08 09:30:00-05:00 +2024-04-13 03:47:55,140: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:47:55 +2024-04-13 03:47:55,140: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:55,140: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:55,141: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:47:55,141: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:47:55,141: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:47:58,020: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:47:58,021: root: INFO: Current backtesting datetime 2020-01-08 16:00:00-05:00 +2024-04-13 03:47:58,021: root: INFO: Current backtesting datetime 2020-01-09 09:30:00-05:00 +2024-04-13 03:47:58,022: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:47:58 +2024-04-13 03:47:58,022: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:58,023: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:47:58,023: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:47:58,024: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:47:58,024: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:00,005: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:00,006: root: INFO: Current backtesting datetime 2020-01-09 16:00:00-05:00 +2024-04-13 03:48:00,006: root: INFO: Current backtesting datetime 2020-01-10 09:30:00-05:00 +2024-04-13 03:48:00,007: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:00 +2024-04-13 03:48:00,007: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:00,008: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:00,008: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:00,009: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:00,009: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:02,314: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:02,315: root: INFO: Current backtesting datetime 2020-01-10 16:00:00-05:00 +2024-04-13 03:48:02,315: root: INFO: Current backtesting datetime 2020-01-11 09:30:00-05:00 +2024-04-13 03:48:02,316: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:02,317: root: INFO: Current backtesting datetime 2020-01-11 09:29:00-05:00 +2024-04-13 03:48:02,318: root: INFO: Current backtesting datetime 2020-01-11 09:29:00-05:00 +2024-04-13 03:48:02,318: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:02,319: root: INFO: Current backtesting datetime 2020-01-13 08:30:00-05:00 +2024-04-13 03:48:02,320: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:02,321: root: INFO: Current backtesting datetime 2020-01-13 09:30:00-05:00 +2024-04-13 03:48:02,321: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:02,322: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:02 +2024-04-13 03:48:02,322: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:02,323: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:02,323: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:02,323: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:02,324: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:05,670: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:05,671: root: INFO: Current backtesting datetime 2020-01-13 16:00:00-05:00 +2024-04-13 03:48:05,672: root: INFO: Current backtesting datetime 2020-01-14 09:30:00-05:00 +2024-04-13 03:48:05,672: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:05 +2024-04-13 03:48:05,672: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:05,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:05,673: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:05,674: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:05,674: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:09,403: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:09,404: root: INFO: Current backtesting datetime 2020-01-14 16:00:00-05:00 +2024-04-13 03:48:09,404: root: INFO: Current backtesting datetime 2020-01-15 09:30:00-05:00 +2024-04-13 03:48:09,404: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:09 +2024-04-13 03:48:09,404: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:09,405: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:09,406: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:09,406: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:09,406: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:11,139: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:11,140: root: INFO: Current backtesting datetime 2020-01-15 16:00:00-05:00 +2024-04-13 03:48:11,141: root: INFO: Current backtesting datetime 2020-01-16 09:30:00-05:00 +2024-04-13 03:48:11,141: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:11 +2024-04-13 03:48:11,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:11,142: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:11,142: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:11,143: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:11,143: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:11,868: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:11,869: root: INFO: Current backtesting datetime 2020-01-16 16:00:00-05:00 +2024-04-13 03:48:11,869: root: INFO: Current backtesting datetime 2020-01-17 09:30:00-05:00 +2024-04-13 03:48:11,870: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:11 +2024-04-13 03:48:11,870: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:11,871: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:11,871: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:11,871: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:11,872: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:12,411: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:12,412: root: INFO: Current backtesting datetime 2020-01-17 16:00:00-05:00 +2024-04-13 03:48:12,412: root: INFO: Current backtesting datetime 2020-01-18 09:30:00-05:00 +2024-04-13 03:48:12,413: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:12,414: root: INFO: Current backtesting datetime 2020-01-18 09:29:00-05:00 +2024-04-13 03:48:12,416: root: INFO: Current backtesting datetime 2020-01-18 09:29:00-05:00 +2024-04-13 03:48:12,416: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:12,417: root: INFO: Current backtesting datetime 2020-01-21 08:30:00-05:00 +2024-04-13 03:48:12,417: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:12,418: root: INFO: Current backtesting datetime 2020-01-21 09:30:00-05:00 +2024-04-13 03:48:12,418: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:12,419: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:12 +2024-04-13 03:48:12,419: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:12,420: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:12,420: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:12,421: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:12,421: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:12,980: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:12,981: root: INFO: Current backtesting datetime 2020-01-21 16:00:00-05:00 +2024-04-13 03:48:12,981: root: INFO: Current backtesting datetime 2020-01-22 09:30:00-05:00 +2024-04-13 03:48:12,982: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:12 +2024-04-13 03:48:12,982: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:12,982: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:12,983: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:12,983: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:12,983: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:13,504: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:13,505: root: INFO: Current backtesting datetime 2020-01-22 16:00:00-05:00 +2024-04-13 03:48:13,506: root: INFO: Current backtesting datetime 2020-01-23 09:30:00-05:00 +2024-04-13 03:48:13,506: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:13 +2024-04-13 03:48:13,506: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:13,507: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:13,507: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:13,508: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:13,508: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:13,928: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:13,929: root: INFO: Current backtesting datetime 2020-01-23 16:00:00-05:00 +2024-04-13 03:48:13,929: root: INFO: Current backtesting datetime 2020-01-24 09:30:00-05:00 +2024-04-13 03:48:13,930: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:13 +2024-04-13 03:48:13,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:13,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:13,931: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:13,932: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:13,932: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:14,388: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:14,389: root: INFO: Current backtesting datetime 2020-01-24 16:00:00-05:00 +2024-04-13 03:48:14,390: root: INFO: Current backtesting datetime 2020-01-25 09:30:00-05:00 +2024-04-13 03:48:14,390: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:14,391: root: INFO: Current backtesting datetime 2020-01-25 09:29:00-05:00 +2024-04-13 03:48:14,393: root: INFO: Current backtesting datetime 2020-01-25 09:29:00-05:00 +2024-04-13 03:48:14,393: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:14,394: root: INFO: Current backtesting datetime 2020-01-27 08:30:00-05:00 +2024-04-13 03:48:14,394: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:14,395: root: INFO: Current backtesting datetime 2020-01-27 09:30:00-05:00 +2024-04-13 03:48:14,395: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:14,396: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:14 +2024-04-13 03:48:14,396: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:14,397: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:14,397: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:14,398: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:14,398: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:14,829: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:14,830: root: INFO: Current backtesting datetime 2020-01-27 16:00:00-05:00 +2024-04-13 03:48:14,830: root: INFO: Current backtesting datetime 2020-01-28 09:30:00-05:00 +2024-04-13 03:48:14,830: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:14 +2024-04-13 03:48:14,830: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:14,831: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:14,831: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:14,832: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:14,832: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:15,099: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:15,100: root: INFO: Current backtesting datetime 2020-01-28 16:00:00-05:00 +2024-04-13 03:48:15,100: root: INFO: Current backtesting datetime 2020-01-29 09:30:00-05:00 +2024-04-13 03:48:15,101: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:15 +2024-04-13 03:48:15,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:15,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:15,102: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:15,102: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:15,102: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:15,741: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:15,742: root: INFO: Current backtesting datetime 2020-01-29 16:00:00-05:00 +2024-04-13 03:48:15,742: root: INFO: Current backtesting datetime 2020-01-30 09:30:00-05:00 +2024-04-13 03:48:15,742: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:15 +2024-04-13 03:48:15,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:15,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:15,744: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:15,744: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:15,744: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:16,009: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:16,011: root: INFO: Current backtesting datetime 2020-01-30 16:00:00-05:00 +2024-04-13 03:48:16,011: root: INFO: Current backtesting datetime 2020-01-31 09:30:00-05:00 +2024-04-13 03:48:16,011: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:16 +2024-04-13 03:48:16,012: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:16,012: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:16,013: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:16,013: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:16,013: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:16,706: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:16,707: root: INFO: Current backtesting datetime 2020-01-31 16:00:00-05:00 +2024-04-13 03:48:16,707: root: INFO: Current backtesting datetime 2020-02-01 09:30:00-05:00 +2024-04-13 03:48:16,708: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:16,709: root: INFO: Current backtesting datetime 2020-02-01 09:29:00-05:00 +2024-04-13 03:48:16,710: root: INFO: Current backtesting datetime 2020-02-01 09:29:00-05:00 +2024-04-13 03:48:16,711: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:16,711: root: INFO: Current backtesting datetime 2020-02-03 08:30:00-05:00 +2024-04-13 03:48:16,712: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:16,713: root: INFO: Current backtesting datetime 2020-02-03 09:30:00-05:00 +2024-04-13 03:48:16,713: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:16,714: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:16 +2024-04-13 03:48:16,714: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:16,715: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:16,715: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:16,716: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:16,716: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:16,980: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:16,982: root: INFO: Current backtesting datetime 2020-02-03 16:00:00-05:00 +2024-04-13 03:48:16,982: root: INFO: Current backtesting datetime 2020-02-04 09:30:00-05:00 +2024-04-13 03:48:16,982: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:16 +2024-04-13 03:48:16,983: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:16,983: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:16,984: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:16,984: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:16,984: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:17,495: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:17,496: root: INFO: Current backtesting datetime 2020-02-04 16:00:00-05:00 +2024-04-13 03:48:17,496: root: INFO: Current backtesting datetime 2020-02-05 09:30:00-05:00 +2024-04-13 03:48:17,496: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:17 +2024-04-13 03:48:17,497: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:17,497: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:17,498: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:17,498: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:17,498: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:17,979: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:17,980: root: INFO: Current backtesting datetime 2020-02-05 16:00:00-05:00 +2024-04-13 03:48:17,980: root: INFO: Current backtesting datetime 2020-02-06 09:30:00-05:00 +2024-04-13 03:48:17,981: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:17 +2024-04-13 03:48:17,981: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:17,981: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:17,982: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:17,982: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:17,982: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:18,499: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:18,500: root: INFO: Current backtesting datetime 2020-02-06 16:00:00-05:00 +2024-04-13 03:48:18,501: root: INFO: Current backtesting datetime 2020-02-07 09:30:00-05:00 +2024-04-13 03:48:18,501: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:18 +2024-04-13 03:48:18,501: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:18,502: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:18,502: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:18,503: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:18,503: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:19,012: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:19,013: root: INFO: Current backtesting datetime 2020-02-07 16:00:00-05:00 +2024-04-13 03:48:19,013: root: INFO: Current backtesting datetime 2020-02-08 09:30:00-05:00 +2024-04-13 03:48:19,013: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:19,015: root: INFO: Current backtesting datetime 2020-02-08 09:29:00-05:00 +2024-04-13 03:48:19,016: root: INFO: Current backtesting datetime 2020-02-08 09:29:00-05:00 +2024-04-13 03:48:19,016: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:19,017: root: INFO: Current backtesting datetime 2020-02-10 08:30:00-05:00 +2024-04-13 03:48:19,017: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:19,018: root: INFO: Current backtesting datetime 2020-02-10 09:30:00-05:00 +2024-04-13 03:48:19,018: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:19,019: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:19 +2024-04-13 03:48:19,020: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:19,020: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:19,021: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:19,021: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:19,021: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:19,734: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:19,735: root: INFO: Current backtesting datetime 2020-02-10 16:00:00-05:00 +2024-04-13 03:48:19,735: root: INFO: Current backtesting datetime 2020-02-11 09:30:00-05:00 +2024-04-13 03:48:19,735: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:19 +2024-04-13 03:48:19,735: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:19,736: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:19,736: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:19,737: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:19,737: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:19,981: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:19,982: root: INFO: Current backtesting datetime 2020-02-11 16:00:00-05:00 +2024-04-13 03:48:19,982: root: INFO: Current backtesting datetime 2020-02-12 09:30:00-05:00 +2024-04-13 03:48:19,982: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:19 +2024-04-13 03:48:19,983: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:19,983: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:19,984: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:19,984: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:19,984: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:20,449: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:20,450: root: INFO: Current backtesting datetime 2020-02-12 16:00:00-05:00 +2024-04-13 03:48:20,451: root: INFO: Current backtesting datetime 2020-02-13 09:30:00-05:00 +2024-04-13 03:48:20,451: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:20 +2024-04-13 03:48:20,451: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:20,452: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:20,452: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:20,452: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:20,453: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:20,867: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:20,868: root: INFO: Current backtesting datetime 2020-02-13 16:00:00-05:00 +2024-04-13 03:48:20,869: root: INFO: Current backtesting datetime 2020-02-14 09:30:00-05:00 +2024-04-13 03:48:20,869: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:20 +2024-04-13 03:48:20,869: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:20,870: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:20,870: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:20,871: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:20,871: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:21,356: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:21,356: root: INFO: Current backtesting datetime 2020-02-14 16:00:00-05:00 +2024-04-13 03:48:21,356: root: INFO: Current backtesting datetime 2020-02-15 09:30:00-05:00 +2024-04-13 03:48:21,358: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:21,358: root: INFO: Current backtesting datetime 2020-02-15 09:29:00-05:00 +2024-04-13 03:48:21,360: root: INFO: Current backtesting datetime 2020-02-15 09:29:00-05:00 +2024-04-13 03:48:21,360: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:21,361: root: INFO: Current backtesting datetime 2020-02-18 08:30:00-05:00 +2024-04-13 03:48:21,361: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:21,362: root: INFO: Current backtesting datetime 2020-02-18 09:30:00-05:00 +2024-04-13 03:48:21,362: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:21,363: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:21 +2024-04-13 03:48:21,363: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:21,364: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:21,364: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:21,365: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:21,365: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:21,823: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:21,824: root: INFO: Current backtesting datetime 2020-02-18 16:00:00-05:00 +2024-04-13 03:48:21,825: root: INFO: Current backtesting datetime 2020-02-19 09:30:00-05:00 +2024-04-13 03:48:21,825: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:21 +2024-04-13 03:48:21,825: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:21,826: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:21,826: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:21,827: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:21,827: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:22,061: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:22,062: root: INFO: Current backtesting datetime 2020-02-19 16:00:00-05:00 +2024-04-13 03:48:22,062: root: INFO: Current backtesting datetime 2020-02-20 09:30:00-05:00 +2024-04-13 03:48:22,063: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:22 +2024-04-13 03:48:22,063: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:22,064: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:22,064: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:22,064: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:22,065: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:22,727: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:22,727: root: INFO: Current backtesting datetime 2020-02-20 16:00:00-05:00 +2024-04-13 03:48:22,727: root: INFO: Current backtesting datetime 2020-02-21 09:30:00-05:00 +2024-04-13 03:48:22,727: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:22 +2024-04-13 03:48:22,727: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:22,729: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:22,729: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:22,730: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:22,730: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:22,959: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:22,960: root: INFO: Current backtesting datetime 2020-02-21 16:00:00-05:00 +2024-04-13 03:48:22,961: root: INFO: Current backtesting datetime 2020-02-22 09:30:00-05:00 +2024-04-13 03:48:22,961: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:22,963: root: INFO: Current backtesting datetime 2020-02-22 09:29:00-05:00 +2024-04-13 03:48:22,964: root: INFO: Current backtesting datetime 2020-02-22 09:29:00-05:00 +2024-04-13 03:48:22,964: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:22,965: root: INFO: Current backtesting datetime 2020-02-24 08:30:00-05:00 +2024-04-13 03:48:22,965: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:22,966: root: INFO: Current backtesting datetime 2020-02-24 09:30:00-05:00 +2024-04-13 03:48:22,966: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:22,967: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:22 +2024-04-13 03:48:22,967: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:22,968: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:22,968: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:22,969: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:22,969: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:23,420: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:23,421: root: INFO: Current backtesting datetime 2020-02-24 16:00:00-05:00 +2024-04-13 03:48:23,421: root: INFO: Current backtesting datetime 2020-02-25 09:30:00-05:00 +2024-04-13 03:48:23,422: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:23 +2024-04-13 03:48:23,422: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:23,423: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:23,423: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:23,424: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:23,424: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:23,985: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:23,986: root: INFO: Current backtesting datetime 2020-02-25 16:00:00-05:00 +2024-04-13 03:48:23,987: root: INFO: Current backtesting datetime 2020-02-26 09:30:00-05:00 +2024-04-13 03:48:23,987: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:23 +2024-04-13 03:48:23,987: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:23,988: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:23,988: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:23,989: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:23,989: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:24,438: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:24,439: root: INFO: Current backtesting datetime 2020-02-26 16:00:00-05:00 +2024-04-13 03:48:24,439: root: INFO: Current backtesting datetime 2020-02-27 09:30:00-05:00 +2024-04-13 03:48:24,440: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:24 +2024-04-13 03:48:24,440: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:24,441: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:24,441: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:24,442: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:24,442: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:24,906: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:24,907: root: INFO: Current backtesting datetime 2020-02-27 16:00:00-05:00 +2024-04-13 03:48:24,907: root: INFO: Current backtesting datetime 2020-02-28 09:30:00-05:00 +2024-04-13 03:48:24,907: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:24 +2024-04-13 03:48:24,908: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:24,908: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:24,909: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:24,909: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:24,909: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:25,335: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:25,336: root: INFO: Current backtesting datetime 2020-02-28 16:00:00-05:00 +2024-04-13 03:48:25,337: root: INFO: Current backtesting datetime 2020-02-29 09:30:00-05:00 +2024-04-13 03:48:25,337: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:25,339: root: INFO: Current backtesting datetime 2020-02-29 09:29:00-05:00 +2024-04-13 03:48:25,340: root: INFO: Current backtesting datetime 2020-02-29 09:29:00-05:00 +2024-04-13 03:48:25,340: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:25,341: root: INFO: Current backtesting datetime 2020-03-02 08:30:00-05:00 +2024-04-13 03:48:25,341: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:25,342: root: INFO: Current backtesting datetime 2020-03-02 09:30:00-05:00 +2024-04-13 03:48:25,342: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:25,343: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:25 +2024-04-13 03:48:25,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:25,344: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:25,344: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:25,345: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:25,345: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:25,807: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:25,808: root: INFO: Current backtesting datetime 2020-03-02 16:00:00-05:00 +2024-04-13 03:48:25,808: root: INFO: Current backtesting datetime 2020-03-03 09:30:00-05:00 +2024-04-13 03:48:25,809: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:25 +2024-04-13 03:48:25,809: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:25,810: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:25,810: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:25,810: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:25,810: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:26,083: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:26,084: root: INFO: Current backtesting datetime 2020-03-03 16:00:00-05:00 +2024-04-13 03:48:26,084: root: INFO: Current backtesting datetime 2020-03-04 09:30:00-05:00 +2024-04-13 03:48:26,084: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:26 +2024-04-13 03:48:26,085: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:26,085: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:26,086: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:26,086: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:26,086: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:26,779: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:26,780: root: INFO: Current backtesting datetime 2020-03-04 16:00:00-05:00 +2024-04-13 03:48:26,781: root: INFO: Current backtesting datetime 2020-03-05 09:30:00-05:00 +2024-04-13 03:48:26,781: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:26 +2024-04-13 03:48:26,781: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:26,782: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:26,782: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:26,783: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:26,783: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:27,034: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:27,035: root: INFO: Current backtesting datetime 2020-03-05 16:00:00-05:00 +2024-04-13 03:48:27,036: root: INFO: Current backtesting datetime 2020-03-06 09:30:00-05:00 +2024-04-13 03:48:27,036: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:27 +2024-04-13 03:48:27,036: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:27,037: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:27,037: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:27,038: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:27,038: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:27,679: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:27,680: root: INFO: Current backtesting datetime 2020-03-06 16:00:00-05:00 +2024-04-13 03:48:27,680: root: INFO: Current backtesting datetime 2020-03-07 09:30:00-05:00 +2024-04-13 03:48:27,681: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:27,682: root: INFO: Current backtesting datetime 2020-03-07 09:29:00-05:00 +2024-04-13 03:48:27,683: root: INFO: Current backtesting datetime 2020-03-07 09:29:00-05:00 +2024-04-13 03:48:27,684: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:27,684: root: INFO: Current backtesting datetime 2020-03-09 07:30:00-05:00 +2024-04-13 03:48:27,685: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:27,686: root: INFO: Current backtesting datetime 2020-03-09 08:30:00-05:00 +2024-04-13 03:48:27,686: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:27,687: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:27 +2024-04-13 03:48:27,687: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:27,688: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:27,688: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:27,688: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:27,689: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:27,953: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:27,954: root: INFO: Current backtesting datetime 2020-03-09 15:00:00-05:00 +2024-04-13 03:48:27,954: root: INFO: Current backtesting datetime 2020-03-10 08:30:00-05:00 +2024-04-13 03:48:27,954: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:27 +2024-04-13 03:48:27,954: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:27,955: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:27,955: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:27,956: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:27,956: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:28,451: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:28,452: root: INFO: Current backtesting datetime 2020-03-10 15:00:00-05:00 +2024-04-13 03:48:28,453: root: INFO: Current backtesting datetime 2020-03-11 08:30:00-05:00 +2024-04-13 03:48:28,453: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:28 +2024-04-13 03:48:28,453: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:28,454: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:28,454: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:28,455: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:28,455: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:28,888: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:28,889: root: INFO: Current backtesting datetime 2020-03-11 15:00:00-05:00 +2024-04-13 03:48:28,890: root: INFO: Current backtesting datetime 2020-03-12 08:30:00-05:00 +2024-04-13 03:48:28,890: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:28 +2024-04-13 03:48:28,890: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:28,891: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:28,891: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:28,892: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:28,892: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:29,391: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:29,392: root: INFO: Current backtesting datetime 2020-03-12 15:00:00-05:00 +2024-04-13 03:48:29,392: root: INFO: Current backtesting datetime 2020-03-13 08:30:00-05:00 +2024-04-13 03:48:29,392: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:29 +2024-04-13 03:48:29,393: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:29,393: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:29,394: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:29,394: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:29,394: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:29,825: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:29,826: root: INFO: Current backtesting datetime 2020-03-13 15:00:00-05:00 +2024-04-13 03:48:29,826: root: INFO: Current backtesting datetime 2020-03-14 08:30:00-05:00 +2024-04-13 03:48:29,827: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:29,828: root: INFO: Current backtesting datetime 2020-03-14 08:29:00-05:00 +2024-04-13 03:48:29,829: root: INFO: Current backtesting datetime 2020-03-14 08:29:00-05:00 +2024-04-13 03:48:29,829: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:29,830: root: INFO: Current backtesting datetime 2020-03-16 07:30:00-05:00 +2024-04-13 03:48:29,830: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:29,831: root: INFO: Current backtesting datetime 2020-03-16 08:30:00-05:00 +2024-04-13 03:48:29,831: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:29,832: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:29 +2024-04-13 03:48:29,833: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:29,833: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:29,833: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:29,834: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:29,834: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:30,068: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:30,069: root: INFO: Current backtesting datetime 2020-03-16 15:00:00-05:00 +2024-04-13 03:48:30,070: root: INFO: Current backtesting datetime 2020-03-17 08:30:00-05:00 +2024-04-13 03:48:30,070: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:30 +2024-04-13 03:48:30,070: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:30,071: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:30,071: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:30,072: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:30,072: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:30,666: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:30,667: root: INFO: Current backtesting datetime 2020-03-17 15:00:00-05:00 +2024-04-13 03:48:30,667: root: INFO: Current backtesting datetime 2020-03-18 08:30:00-05:00 +2024-04-13 03:48:30,668: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:30 +2024-04-13 03:48:30,668: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:30,668: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:30,669: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:30,669: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:30,669: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:30,906: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:30,907: root: INFO: Current backtesting datetime 2020-03-18 15:00:00-05:00 +2024-04-13 03:48:30,907: root: INFO: Current backtesting datetime 2020-03-19 08:30:00-05:00 +2024-04-13 03:48:30,907: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:30 +2024-04-13 03:48:30,908: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:30,908: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:30,909: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:30,909: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:30,909: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:31,346: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:31,347: root: INFO: Current backtesting datetime 2020-03-19 15:00:00-05:00 +2024-04-13 03:48:31,347: root: INFO: Current backtesting datetime 2020-03-20 08:30:00-05:00 +2024-04-13 03:48:31,348: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:31 +2024-04-13 03:48:31,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:31,349: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:31,349: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:31,350: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:31,350: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:31,819: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:31,820: root: INFO: Current backtesting datetime 2020-03-20 15:00:00-05:00 +2024-04-13 03:48:31,820: root: INFO: Current backtesting datetime 2020-03-21 08:30:00-05:00 +2024-04-13 03:48:31,820: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:31,822: root: INFO: Current backtesting datetime 2020-03-21 08:29:00-05:00 +2024-04-13 03:48:31,823: root: INFO: Current backtesting datetime 2020-03-21 08:29:00-05:00 +2024-04-13 03:48:31,823: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:31,824: root: INFO: Current backtesting datetime 2020-03-23 07:30:00-05:00 +2024-04-13 03:48:31,825: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:31,825: root: INFO: Current backtesting datetime 2020-03-23 08:30:00-05:00 +2024-04-13 03:48:31,825: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:31,826: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:31 +2024-04-13 03:48:31,827: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:31,827: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:31,828: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:31,828: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:31,828: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:32,054: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:32,055: root: INFO: Current backtesting datetime 2020-03-23 15:00:00-05:00 +2024-04-13 03:48:32,055: root: INFO: Current backtesting datetime 2020-03-24 08:30:00-05:00 +2024-04-13 03:48:32,055: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:32 +2024-04-13 03:48:32,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:32,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:32,057: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:32,057: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:32,057: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:32,649: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:32,650: root: INFO: Current backtesting datetime 2020-03-24 15:00:00-05:00 +2024-04-13 03:48:32,650: root: INFO: Current backtesting datetime 2020-03-25 08:30:00-05:00 +2024-04-13 03:48:32,650: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:32 +2024-04-13 03:48:32,651: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:32,651: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:32,652: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:32,652: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:32,652: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:32,908: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:32,909: root: INFO: Current backtesting datetime 2020-03-25 15:00:00-05:00 +2024-04-13 03:48:32,909: root: INFO: Current backtesting datetime 2020-03-26 08:30:00-05:00 +2024-04-13 03:48:32,910: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:32 +2024-04-13 03:48:32,910: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:32,910: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:32,911: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:32,911: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:32,911: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:33,395: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:33,396: root: INFO: Current backtesting datetime 2020-03-26 15:00:00-05:00 +2024-04-13 03:48:33,396: root: INFO: Current backtesting datetime 2020-03-27 08:30:00-05:00 +2024-04-13 03:48:33,397: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:33 +2024-04-13 03:48:33,397: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:33,397: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:33,398: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:33,398: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:33,398: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:33,846: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:33,847: root: INFO: Current backtesting datetime 2020-03-27 15:00:00-05:00 +2024-04-13 03:48:33,848: root: INFO: Current backtesting datetime 2020-03-28 08:30:00-05:00 +2024-04-13 03:48:33,848: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:33,850: root: INFO: Current backtesting datetime 2020-03-28 08:29:00-05:00 +2024-04-13 03:48:33,851: root: INFO: Current backtesting datetime 2020-03-28 08:29:00-05:00 +2024-04-13 03:48:33,851: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:33,852: root: INFO: Current backtesting datetime 2020-03-30 07:30:00-05:00 +2024-04-13 03:48:33,852: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:33,853: root: INFO: Current backtesting datetime 2020-03-30 08:30:00-05:00 +2024-04-13 03:48:33,853: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:33,854: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:33 +2024-04-13 03:48:33,855: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:33,855: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:33,856: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:33,856: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:33,856: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:34,380: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:34,381: root: INFO: Current backtesting datetime 2020-03-30 15:00:00-05:00 +2024-04-13 03:48:34,381: root: INFO: Current backtesting datetime 2020-03-31 08:30:00-05:00 +2024-04-13 03:48:34,382: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:34 +2024-04-13 03:48:34,382: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:34,383: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:34,383: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:34,383: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:34,383: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:34,863: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:34,864: root: INFO: Current backtesting datetime 2020-03-31 15:00:00-05:00 +2024-04-13 03:48:34,864: root: INFO: Current backtesting datetime 2020-04-01 08:30:00-05:00 +2024-04-13 03:48:34,865: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:34 +2024-04-13 03:48:34,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:34,866: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:34,866: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:34,866: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:34,866: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:35,316: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:35,317: root: INFO: Current backtesting datetime 2020-04-01 15:00:00-05:00 +2024-04-13 03:48:35,317: root: INFO: Current backtesting datetime 2020-04-02 08:30:00-05:00 +2024-04-13 03:48:35,317: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:35 +2024-04-13 03:48:35,318: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:35,318: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:35,319: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:35,319: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:35,319: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:35,761: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:35,762: root: INFO: Current backtesting datetime 2020-04-02 15:00:00-05:00 +2024-04-13 03:48:35,762: root: INFO: Current backtesting datetime 2020-04-03 08:30:00-05:00 +2024-04-13 03:48:35,762: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:35 +2024-04-13 03:48:35,762: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:35,763: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:35,763: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:35,764: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:35,764: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:35,984: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:35,985: root: INFO: Current backtesting datetime 2020-04-03 15:00:00-05:00 +2024-04-13 03:48:35,986: root: INFO: Current backtesting datetime 2020-04-04 08:30:00-05:00 +2024-04-13 03:48:35,986: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:35,987: root: INFO: Current backtesting datetime 2020-04-04 08:29:00-05:00 +2024-04-13 03:48:35,989: root: INFO: Current backtesting datetime 2020-04-04 08:29:00-05:00 +2024-04-13 03:48:35,989: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:35,989: root: INFO: Current backtesting datetime 2020-04-06 07:30:00-05:00 +2024-04-13 03:48:35,990: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:35,991: root: INFO: Current backtesting datetime 2020-04-06 08:30:00-05:00 +2024-04-13 03:48:35,991: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:35,992: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:35 +2024-04-13 03:48:35,992: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:35,993: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:35,993: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:35,994: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:35,994: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:36,641: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:36,642: root: INFO: Current backtesting datetime 2020-04-06 15:00:00-05:00 +2024-04-13 03:48:36,642: root: INFO: Current backtesting datetime 2020-04-07 08:30:00-05:00 +2024-04-13 03:48:36,642: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:36 +2024-04-13 03:48:36,643: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:36,643: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:36,644: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:36,644: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:36,644: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:36,882: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:36,883: root: INFO: Current backtesting datetime 2020-04-07 15:00:00-05:00 +2024-04-13 03:48:36,883: root: INFO: Current backtesting datetime 2020-04-08 08:30:00-05:00 +2024-04-13 03:48:36,884: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:36 +2024-04-13 03:48:36,884: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:36,885: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:36,885: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:36,886: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:36,886: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:37,403: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:37,404: root: INFO: Current backtesting datetime 2020-04-08 15:00:00-05:00 +2024-04-13 03:48:37,404: root: INFO: Current backtesting datetime 2020-04-09 08:30:00-05:00 +2024-04-13 03:48:37,404: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:37 +2024-04-13 03:48:37,405: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:37,405: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:37,406: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:37,406: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:37,406: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:37,824: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:37,825: root: INFO: Current backtesting datetime 2020-04-09 15:00:00-05:00 +2024-04-13 03:48:37,825: root: INFO: Current backtesting datetime 2020-04-10 08:30:00-05:00 +2024-04-13 03:48:37,826: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:37,827: root: INFO: Current backtesting datetime 2020-04-10 08:29:00-05:00 +2024-04-13 03:48:37,828: root: INFO: Current backtesting datetime 2020-04-10 08:29:00-05:00 +2024-04-13 03:48:37,828: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:37,829: root: INFO: Current backtesting datetime 2020-04-13 07:30:00-05:00 +2024-04-13 03:48:37,830: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:37,830: root: INFO: Current backtesting datetime 2020-04-13 08:30:00-05:00 +2024-04-13 03:48:37,830: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:37,831: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:37 +2024-04-13 03:48:37,832: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:37,832: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:37,833: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:37,833: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:37,833: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:38,058: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:38,059: root: INFO: Current backtesting datetime 2020-04-13 15:00:00-05:00 +2024-04-13 03:48:38,060: root: INFO: Current backtesting datetime 2020-04-14 08:30:00-05:00 +2024-04-13 03:48:38,060: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:38 +2024-04-13 03:48:38,060: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:38,061: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:38,061: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:38,062: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:38,062: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:38,808: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:38,810: root: INFO: Current backtesting datetime 2020-04-14 15:00:00-05:00 +2024-04-13 03:48:38,810: root: INFO: Current backtesting datetime 2020-04-15 08:30:00-05:00 +2024-04-13 03:48:38,810: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:38 +2024-04-13 03:48:38,811: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:38,811: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:38,812: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:38,812: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:38,812: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:39,042: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:39,043: root: INFO: Current backtesting datetime 2020-04-15 15:00:00-05:00 +2024-04-13 03:48:39,044: root: INFO: Current backtesting datetime 2020-04-16 08:30:00-05:00 +2024-04-13 03:48:39,044: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:39 +2024-04-13 03:48:39,044: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:39,045: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:39,045: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:39,046: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:39,046: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:40,579: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:40,580: root: INFO: Current backtesting datetime 2020-04-16 15:00:00-05:00 +2024-04-13 03:48:40,580: root: INFO: Current backtesting datetime 2020-04-17 08:30:00-05:00 +2024-04-13 03:48:40,580: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:40 +2024-04-13 03:48:40,581: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:40,581: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:40,582: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:40,582: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:40,582: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:44,090: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:44,091: root: INFO: Current backtesting datetime 2020-04-17 15:00:00-05:00 +2024-04-13 03:48:44,091: root: INFO: Current backtesting datetime 2020-04-18 08:30:00-05:00 +2024-04-13 03:48:44,092: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:48:44,093: root: INFO: Current backtesting datetime 2020-04-18 08:29:00-05:00 +2024-04-13 03:48:44,094: root: INFO: Current backtesting datetime 2020-04-18 08:29:00-05:00 +2024-04-13 03:48:44,094: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:48:44,095: root: INFO: Current backtesting datetime 2020-04-20 07:30:00-05:00 +2024-04-13 03:48:44,096: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:48:44,097: root: INFO: Current backtesting datetime 2020-04-20 08:30:00-05:00 +2024-04-13 03:48:44,097: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:48:44,098: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:44 +2024-04-13 03:48:44,098: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:44,098: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:44,099: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:44,099: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:44,099: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:49,284: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:49,285: root: INFO: Current backtesting datetime 2020-04-20 15:00:00-05:00 +2024-04-13 03:48:49,286: root: INFO: Current backtesting datetime 2020-04-21 08:30:00-05:00 +2024-04-13 03:48:49,286: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:49 +2024-04-13 03:48:49,286: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:49,287: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:49,287: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:49,288: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:49,288: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:48:55,556: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:48:55,557: root: INFO: Current backtesting datetime 2020-04-21 15:00:00-05:00 +2024-04-13 03:48:55,558: root: INFO: Current backtesting datetime 2020-04-22 08:30:00-05:00 +2024-04-13 03:48:55,558: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:48:55 +2024-04-13 03:48:55,558: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:55,559: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:48:55,559: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:48:55,560: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:48:55,560: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:00,168: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:00,169: root: INFO: Current backtesting datetime 2020-04-22 15:00:00-05:00 +2024-04-13 03:49:00,169: root: INFO: Current backtesting datetime 2020-04-23 08:30:00-05:00 +2024-04-13 03:49:00,170: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:00 +2024-04-13 03:49:00,170: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:00,171: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:00,171: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:00,172: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:00,172: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:08,026: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:08,028: root: INFO: Current backtesting datetime 2020-04-23 15:00:00-05:00 +2024-04-13 03:49:08,028: root: INFO: Current backtesting datetime 2020-04-24 08:30:00-05:00 +2024-04-13 03:49:08,028: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:08 +2024-04-13 03:49:08,028: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:08,029: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:08,030: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:08,030: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:08,030: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:13,798: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:13,798: root: INFO: Current backtesting datetime 2020-04-24 15:00:00-05:00 +2024-04-13 03:49:13,799: root: INFO: Current backtesting datetime 2020-04-25 08:30:00-05:00 +2024-04-13 03:49:13,799: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:49:13,801: root: INFO: Current backtesting datetime 2020-04-25 08:29:00-05:00 +2024-04-13 03:49:13,802: root: INFO: Current backtesting datetime 2020-04-25 08:29:00-05:00 +2024-04-13 03:49:13,802: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:49:13,803: root: INFO: Current backtesting datetime 2020-04-27 07:30:00-05:00 +2024-04-13 03:49:13,803: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:49:13,804: root: INFO: Current backtesting datetime 2020-04-27 08:30:00-05:00 +2024-04-13 03:49:13,804: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:49:13,805: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:13 +2024-04-13 03:49:13,805: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:13,806: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:13,806: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:13,807: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:13,807: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:18,222: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:18,224: root: INFO: Current backtesting datetime 2020-04-27 15:00:00-05:00 +2024-04-13 03:49:18,224: root: INFO: Current backtesting datetime 2020-04-28 08:30:00-05:00 +2024-04-13 03:49:18,225: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:18 +2024-04-13 03:49:18,225: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:18,225: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:18,226: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:18,226: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:18,226: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:21,674: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:21,676: root: INFO: Current backtesting datetime 2020-04-28 15:00:00-05:00 +2024-04-13 03:49:21,676: root: INFO: Current backtesting datetime 2020-04-29 08:30:00-05:00 +2024-04-13 03:49:21,676: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:21 +2024-04-13 03:49:21,676: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:21,677: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:21,677: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:21,678: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:21,678: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:22,416: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:22,417: root: INFO: Current backtesting datetime 2020-04-29 15:00:00-05:00 +2024-04-13 03:49:22,417: root: INFO: Current backtesting datetime 2020-04-30 08:30:00-05:00 +2024-04-13 03:49:22,418: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:22 +2024-04-13 03:49:22,418: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:22,419: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:22,419: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:22,420: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:22,420: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:22,924: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:22,925: root: INFO: Current backtesting datetime 2020-04-30 15:00:00-05:00 +2024-04-13 03:49:22,926: root: INFO: Current backtesting datetime 2020-05-01 08:30:00-05:00 +2024-04-13 03:49:22,926: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:22 +2024-04-13 03:49:22,926: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:22,927: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:22,927: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:22,928: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:22,928: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:23,375: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:23,376: root: INFO: Current backtesting datetime 2020-05-01 15:00:00-05:00 +2024-04-13 03:49:23,376: root: INFO: Current backtesting datetime 2020-05-02 08:30:00-05:00 +2024-04-13 03:49:23,376: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:49:23,379: root: INFO: Current backtesting datetime 2020-05-02 08:29:00-05:00 +2024-04-13 03:49:23,380: root: INFO: Current backtesting datetime 2020-05-02 08:29:00-05:00 +2024-04-13 03:49:23,380: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:49:23,380: root: INFO: Current backtesting datetime 2020-05-04 07:30:00-05:00 +2024-04-13 03:49:23,380: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:49:23,381: root: INFO: Current backtesting datetime 2020-05-04 08:30:00-05:00 +2024-04-13 03:49:23,381: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:49:23,382: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:23 +2024-04-13 03:49:23,382: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:23,384: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:23,384: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:23,384: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:23,384: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:24,044: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:24,045: root: INFO: Current backtesting datetime 2020-05-04 15:00:00-05:00 +2024-04-13 03:49:24,045: root: INFO: Current backtesting datetime 2020-05-05 08:30:00-05:00 +2024-04-13 03:49:24,046: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:24 +2024-04-13 03:49:24,046: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:24,047: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:24,047: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:24,047: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:24,047: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:25,250: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:25,251: root: INFO: Current backtesting datetime 2020-05-05 15:00:00-05:00 +2024-04-13 03:49:25,252: root: INFO: Current backtesting datetime 2020-05-06 08:30:00-05:00 +2024-04-13 03:49:25,252: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:25 +2024-04-13 03:49:25,252: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:25,253: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:25,253: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:25,254: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:25,254: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:26,468: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:26,469: root: INFO: Current backtesting datetime 2020-05-06 15:00:00-05:00 +2024-04-13 03:49:26,469: root: INFO: Current backtesting datetime 2020-05-07 08:30:00-05:00 +2024-04-13 03:49:26,470: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:26 +2024-04-13 03:49:26,470: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:26,471: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:26,471: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:26,471: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:26,471: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:27,939: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:27,940: root: INFO: Current backtesting datetime 2020-05-07 15:00:00-05:00 +2024-04-13 03:49:27,940: root: INFO: Current backtesting datetime 2020-05-08 08:30:00-05:00 +2024-04-13 03:49:27,940: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:27 +2024-04-13 03:49:27,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:27,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:27,942: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:27,942: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:27,942: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:29,506: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:29,507: root: INFO: Current backtesting datetime 2020-05-08 15:00:00-05:00 +2024-04-13 03:49:29,507: root: INFO: Current backtesting datetime 2020-05-09 08:30:00-05:00 +2024-04-13 03:49:29,508: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:49:29,509: root: INFO: Current backtesting datetime 2020-05-09 08:29:00-05:00 +2024-04-13 03:49:29,510: root: INFO: Current backtesting datetime 2020-05-09 08:29:00-05:00 +2024-04-13 03:49:29,510: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:49:29,511: root: INFO: Current backtesting datetime 2020-05-11 07:30:00-05:00 +2024-04-13 03:49:29,512: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:49:29,512: root: INFO: Current backtesting datetime 2020-05-11 08:30:00-05:00 +2024-04-13 03:49:29,512: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:49:29,513: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:29 +2024-04-13 03:49:29,514: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:29,514: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:29,515: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:29,515: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:29,515: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:31,171: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:31,172: root: INFO: Current backtesting datetime 2020-05-11 15:00:00-05:00 +2024-04-13 03:49:31,172: root: INFO: Current backtesting datetime 2020-05-12 08:30:00-05:00 +2024-04-13 03:49:31,173: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:31 +2024-04-13 03:49:31,173: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:31,173: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:31,174: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:31,174: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:31,174: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:33,490: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:33,491: root: INFO: Current backtesting datetime 2020-05-12 15:00:00-05:00 +2024-04-13 03:49:33,491: root: INFO: Current backtesting datetime 2020-05-13 08:30:00-05:00 +2024-04-13 03:49:33,492: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:33 +2024-04-13 03:49:33,492: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:33,492: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:33,493: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:33,493: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:33,493: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:35,511: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:35,512: root: INFO: Current backtesting datetime 2020-05-13 15:00:00-05:00 +2024-04-13 03:49:35,512: root: INFO: Current backtesting datetime 2020-05-14 08:30:00-05:00 +2024-04-13 03:49:35,513: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:35 +2024-04-13 03:49:35,513: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:35,514: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:35,514: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:35,514: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:35,514: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:36,906: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:36,907: root: INFO: Current backtesting datetime 2020-05-14 15:00:00-05:00 +2024-04-13 03:49:36,907: root: INFO: Current backtesting datetime 2020-05-15 08:30:00-05:00 +2024-04-13 03:49:36,908: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:36 +2024-04-13 03:49:36,908: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:36,909: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:36,909: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:36,910: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:36,910: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:39,577: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:39,578: root: INFO: Current backtesting datetime 2020-05-15 15:00:00-05:00 +2024-04-13 03:49:39,578: root: INFO: Current backtesting datetime 2020-05-16 08:30:00-05:00 +2024-04-13 03:49:39,578: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:49:39,580: root: INFO: Current backtesting datetime 2020-05-16 08:29:00-05:00 +2024-04-13 03:49:39,581: root: INFO: Current backtesting datetime 2020-05-16 08:29:00-05:00 +2024-04-13 03:49:39,581: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:49:39,582: root: INFO: Current backtesting datetime 2020-05-18 07:30:00-05:00 +2024-04-13 03:49:39,582: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:49:39,583: root: INFO: Current backtesting datetime 2020-05-18 08:30:00-05:00 +2024-04-13 03:49:39,583: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:49:39,584: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:39 +2024-04-13 03:49:39,584: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:39,585: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:39,585: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:39,586: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:39,586: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:41,974: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:41,975: root: INFO: Current backtesting datetime 2020-05-18 15:00:00-05:00 +2024-04-13 03:49:41,975: root: INFO: Current backtesting datetime 2020-05-19 08:30:00-05:00 +2024-04-13 03:49:41,976: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:41 +2024-04-13 03:49:41,976: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:41,977: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:41,977: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:41,977: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:41,978: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:45,737: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:45,738: root: INFO: Current backtesting datetime 2020-05-19 15:00:00-05:00 +2024-04-13 03:49:45,738: root: INFO: Current backtesting datetime 2020-05-20 08:30:00-05:00 +2024-04-13 03:49:45,738: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:45 +2024-04-13 03:49:45,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:45,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:45,740: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:45,740: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:45,740: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:50,830: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:50,831: root: INFO: Current backtesting datetime 2020-05-20 15:00:00-05:00 +2024-04-13 03:49:50,832: root: INFO: Current backtesting datetime 2020-05-21 08:30:00-05:00 +2024-04-13 03:49:50,832: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:50 +2024-04-13 03:49:50,832: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:50,833: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:50,833: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:50,834: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:50,834: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:49:57,035: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:49:57,036: root: INFO: Current backtesting datetime 2020-05-21 15:00:00-05:00 +2024-04-13 03:49:57,036: root: INFO: Current backtesting datetime 2020-05-22 08:30:00-05:00 +2024-04-13 03:49:57,037: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:49:57 +2024-04-13 03:49:57,037: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:57,038: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:49:57,038: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:49:57,039: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:49:57,039: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:00,051: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:00,052: root: INFO: Current backtesting datetime 2020-05-22 15:00:00-05:00 +2024-04-13 03:50:00,052: root: INFO: Current backtesting datetime 2020-05-23 08:30:00-05:00 +2024-04-13 03:50:00,053: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:50:00,054: root: INFO: Current backtesting datetime 2020-05-23 08:29:00-05:00 +2024-04-13 03:50:00,055: root: INFO: Current backtesting datetime 2020-05-23 08:29:00-05:00 +2024-04-13 03:50:00,056: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:50:00,056: root: INFO: Current backtesting datetime 2020-05-26 07:30:00-05:00 +2024-04-13 03:50:00,057: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:50:00,058: root: INFO: Current backtesting datetime 2020-05-26 08:30:00-05:00 +2024-04-13 03:50:00,059: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:50:00,060: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:00 +2024-04-13 03:50:00,060: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:00,061: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:00,061: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:00,061: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:00,061: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:01,863: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:01,864: root: INFO: Current backtesting datetime 2020-05-26 15:00:00-05:00 +2024-04-13 03:50:01,865: root: INFO: Current backtesting datetime 2020-05-27 08:30:00-05:00 +2024-04-13 03:50:01,865: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:01 +2024-04-13 03:50:01,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:01,866: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:01,866: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:01,867: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:01,867: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:03,595: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:03,596: root: INFO: Current backtesting datetime 2020-05-27 15:00:00-05:00 +2024-04-13 03:50:03,596: root: INFO: Current backtesting datetime 2020-05-28 08:30:00-05:00 +2024-04-13 03:50:03,597: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:03 +2024-04-13 03:50:03,597: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:03,597: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:03,598: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:03,598: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:03,598: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:05,305: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:05,306: root: INFO: Current backtesting datetime 2020-05-28 15:00:00-05:00 +2024-04-13 03:50:05,306: root: INFO: Current backtesting datetime 2020-05-29 08:30:00-05:00 +2024-04-13 03:50:05,307: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:05 +2024-04-13 03:50:05,307: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:05,308: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:05,308: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:05,308: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:05,308: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:06,649: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:06,650: root: INFO: Current backtesting datetime 2020-05-29 15:00:00-05:00 +2024-04-13 03:50:06,650: root: INFO: Current backtesting datetime 2020-05-30 08:30:00-05:00 +2024-04-13 03:50:06,651: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:50:06,652: root: INFO: Current backtesting datetime 2020-05-30 08:29:00-05:00 +2024-04-13 03:50:06,653: root: INFO: Current backtesting datetime 2020-05-30 08:29:00-05:00 +2024-04-13 03:50:06,653: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:50:06,654: root: INFO: Current backtesting datetime 2020-06-01 07:30:00-05:00 +2024-04-13 03:50:06,655: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:50:06,656: root: INFO: Current backtesting datetime 2020-06-01 08:30:00-05:00 +2024-04-13 03:50:06,656: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:50:06,657: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:06 +2024-04-13 03:50:06,657: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:06,657: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:06,658: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:06,658: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:06,658: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:08,781: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:08,782: root: INFO: Current backtesting datetime 2020-06-01 15:00:00-05:00 +2024-04-13 03:50:08,782: root: INFO: Current backtesting datetime 2020-06-02 08:30:00-05:00 +2024-04-13 03:50:08,783: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:08 +2024-04-13 03:50:08,783: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:08,784: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:08,784: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:08,784: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:08,784: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:10,484: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:10,485: root: INFO: Current backtesting datetime 2020-06-02 15:00:00-05:00 +2024-04-13 03:50:10,485: root: INFO: Current backtesting datetime 2020-06-03 08:30:00-05:00 +2024-04-13 03:50:10,486: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:10 +2024-04-13 03:50:10,486: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:10,487: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:10,487: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:10,487: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:10,487: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:12,343: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:12,344: root: INFO: Current backtesting datetime 2020-06-03 15:00:00-05:00 +2024-04-13 03:50:12,344: root: INFO: Current backtesting datetime 2020-06-04 08:30:00-05:00 +2024-04-13 03:50:12,345: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:12 +2024-04-13 03:50:12,345: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:12,345: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:12,346: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:12,346: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:12,346: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:14,089: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:14,090: root: INFO: Current backtesting datetime 2020-06-04 15:00:00-05:00 +2024-04-13 03:50:14,090: root: INFO: Current backtesting datetime 2020-06-05 08:30:00-05:00 +2024-04-13 03:50:14,091: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:14 +2024-04-13 03:50:14,091: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:14,092: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:14,092: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:14,092: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:14,093: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:15,517: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:15,518: root: INFO: Current backtesting datetime 2020-06-05 15:00:00-05:00 +2024-04-13 03:50:15,519: root: INFO: Current backtesting datetime 2020-06-06 08:30:00-05:00 +2024-04-13 03:50:15,519: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:50:15,521: root: INFO: Current backtesting datetime 2020-06-06 08:29:00-05:00 +2024-04-13 03:50:15,522: root: INFO: Current backtesting datetime 2020-06-06 08:29:00-05:00 +2024-04-13 03:50:15,522: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:50:15,523: root: INFO: Current backtesting datetime 2020-06-08 07:30:00-05:00 +2024-04-13 03:50:15,523: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:50:15,524: root: INFO: Current backtesting datetime 2020-06-08 08:30:00-05:00 +2024-04-13 03:50:15,524: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:50:15,525: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:15 +2024-04-13 03:50:15,526: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:15,526: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:15,527: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:15,527: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:15,527: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:16,927: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:16,928: root: INFO: Current backtesting datetime 2020-06-08 15:00:00-05:00 +2024-04-13 03:50:16,929: root: INFO: Current backtesting datetime 2020-06-09 08:30:00-05:00 +2024-04-13 03:50:16,929: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:16 +2024-04-13 03:50:16,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:16,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:16,930: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:16,931: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:16,931: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:18,261: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:18,262: root: INFO: Current backtesting datetime 2020-06-09 15:00:00-05:00 +2024-04-13 03:50:18,263: root: INFO: Current backtesting datetime 2020-06-10 08:30:00-05:00 +2024-04-13 03:50:18,263: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:18 +2024-04-13 03:50:18,263: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:18,264: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:18,264: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:18,265: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:18,265: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:19,934: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:19,935: root: INFO: Current backtesting datetime 2020-06-10 15:00:00-05:00 +2024-04-13 03:50:19,935: root: INFO: Current backtesting datetime 2020-06-11 08:30:00-05:00 +2024-04-13 03:50:19,936: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:19 +2024-04-13 03:50:19,936: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:19,937: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:19,937: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:19,937: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:19,937: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:21,635: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:21,636: root: INFO: Current backtesting datetime 2020-06-11 15:00:00-05:00 +2024-04-13 03:50:21,637: root: INFO: Current backtesting datetime 2020-06-12 08:30:00-05:00 +2024-04-13 03:50:21,637: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:21 +2024-04-13 03:50:21,637: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:21,638: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:21,638: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:21,639: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:21,639: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:23,533: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:23,534: root: INFO: Current backtesting datetime 2020-06-12 15:00:00-05:00 +2024-04-13 03:50:23,534: root: INFO: Current backtesting datetime 2020-06-13 08:30:00-05:00 +2024-04-13 03:50:23,535: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:50:23,536: root: INFO: Current backtesting datetime 2020-06-13 08:29:00-05:00 +2024-04-13 03:50:23,537: root: INFO: Current backtesting datetime 2020-06-13 08:29:00-05:00 +2024-04-13 03:50:23,537: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:50:23,538: root: INFO: Current backtesting datetime 2020-06-15 07:30:00-05:00 +2024-04-13 03:50:23,539: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:50:23,540: root: INFO: Current backtesting datetime 2020-06-15 08:30:00-05:00 +2024-04-13 03:50:23,540: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:50:23,541: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:23 +2024-04-13 03:50:23,541: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:23,542: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:23,542: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:23,542: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:23,543: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:25,145: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:25,146: root: INFO: Current backtesting datetime 2020-06-15 15:00:00-05:00 +2024-04-13 03:50:25,146: root: INFO: Current backtesting datetime 2020-06-16 08:30:00-05:00 +2024-04-13 03:50:25,147: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:25 +2024-04-13 03:50:25,147: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:25,148: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:25,148: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:25,148: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:25,148: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:27,026: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:27,027: root: INFO: Current backtesting datetime 2020-06-16 15:00:00-05:00 +2024-04-13 03:50:27,027: root: INFO: Current backtesting datetime 2020-06-17 08:30:00-05:00 +2024-04-13 03:50:27,027: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:27 +2024-04-13 03:50:27,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:27,028: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:27,028: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:27,029: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:27,029: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:29,521: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:29,522: root: INFO: Current backtesting datetime 2020-06-17 15:00:00-05:00 +2024-04-13 03:50:29,522: root: INFO: Current backtesting datetime 2020-06-18 08:30:00-05:00 +2024-04-13 03:50:29,522: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:29 +2024-04-13 03:50:29,523: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:29,523: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:29,524: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:29,524: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:29,524: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:31,149: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:31,149: root: INFO: Current backtesting datetime 2020-06-18 15:00:00-05:00 +2024-04-13 03:50:31,149: root: INFO: Current backtesting datetime 2020-06-19 08:30:00-05:00 +2024-04-13 03:50:31,151: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:31 +2024-04-13 03:50:31,151: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:31,151: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:31,152: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:31,152: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:31,152: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:32,595: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:32,596: root: INFO: Current backtesting datetime 2020-06-19 15:00:00-05:00 +2024-04-13 03:50:32,597: root: INFO: Current backtesting datetime 2020-06-20 08:30:00-05:00 +2024-04-13 03:50:32,597: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:50:32,599: root: INFO: Current backtesting datetime 2020-06-20 08:29:00-05:00 +2024-04-13 03:50:32,600: root: INFO: Current backtesting datetime 2020-06-20 08:29:00-05:00 +2024-04-13 03:50:32,600: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:50:32,601: root: INFO: Current backtesting datetime 2020-06-22 07:30:00-05:00 +2024-04-13 03:50:32,601: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:50:32,602: root: INFO: Current backtesting datetime 2020-06-22 08:30:00-05:00 +2024-04-13 03:50:32,602: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:50:32,603: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:32 +2024-04-13 03:50:32,603: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:32,604: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:32,604: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:32,605: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:32,605: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:33,842: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:33,843: root: INFO: Current backtesting datetime 2020-06-22 15:00:00-05:00 +2024-04-13 03:50:33,843: root: INFO: Current backtesting datetime 2020-06-23 08:30:00-05:00 +2024-04-13 03:50:33,844: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:33 +2024-04-13 03:50:33,844: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:33,844: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:33,845: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:33,845: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:33,845: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:34,870: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:34,871: root: INFO: Current backtesting datetime 2020-06-23 15:00:00-05:00 +2024-04-13 03:50:34,871: root: INFO: Current backtesting datetime 2020-06-24 08:30:00-05:00 +2024-04-13 03:50:34,872: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:34 +2024-04-13 03:50:34,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:34,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:34,873: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:34,873: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:34,873: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:35,718: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:35,719: root: INFO: Current backtesting datetime 2020-06-24 15:00:00-05:00 +2024-04-13 03:50:35,719: root: INFO: Current backtesting datetime 2020-06-25 08:30:00-05:00 +2024-04-13 03:50:35,720: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:35 +2024-04-13 03:50:35,720: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:35,721: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:35,721: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:35,722: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:35,722: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:36,627: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:36,628: root: INFO: Current backtesting datetime 2020-06-25 15:00:00-05:00 +2024-04-13 03:50:36,629: root: INFO: Current backtesting datetime 2020-06-26 08:30:00-05:00 +2024-04-13 03:50:36,629: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:36 +2024-04-13 03:50:36,629: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:36,630: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:36,630: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:36,631: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:36,631: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:37,896: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:37,897: root: INFO: Current backtesting datetime 2020-06-26 15:00:00-05:00 +2024-04-13 03:50:37,897: root: INFO: Current backtesting datetime 2020-06-27 08:30:00-05:00 +2024-04-13 03:50:37,898: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:50:37,899: root: INFO: Current backtesting datetime 2020-06-27 08:29:00-05:00 +2024-04-13 03:50:37,901: root: INFO: Current backtesting datetime 2020-06-27 08:29:00-05:00 +2024-04-13 03:50:37,901: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:50:37,901: root: INFO: Current backtesting datetime 2020-06-29 07:30:00-05:00 +2024-04-13 03:50:37,902: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:50:37,903: root: INFO: Current backtesting datetime 2020-06-29 08:30:00-05:00 +2024-04-13 03:50:37,903: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:50:37,904: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:37 +2024-04-13 03:50:37,904: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:37,905: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:37,905: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:37,906: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:37,906: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:39,180: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:39,181: root: INFO: Current backtesting datetime 2020-06-29 15:00:00-05:00 +2024-04-13 03:50:39,181: root: INFO: Current backtesting datetime 2020-06-30 08:30:00-05:00 +2024-04-13 03:50:39,182: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:39 +2024-04-13 03:50:39,182: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:39,182: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:39,183: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:39,183: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:39,183: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:40,466: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:40,467: root: INFO: Current backtesting datetime 2020-06-30 15:00:00-05:00 +2024-04-13 03:50:40,467: root: INFO: Current backtesting datetime 2020-07-01 08:30:00-05:00 +2024-04-13 03:50:40,468: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:40 +2024-04-13 03:50:40,468: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:40,468: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:40,469: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:40,469: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:40,469: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:42,324: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:42,325: root: INFO: Current backtesting datetime 2020-07-01 15:00:00-05:00 +2024-04-13 03:50:42,326: root: INFO: Current backtesting datetime 2020-07-02 08:30:00-05:00 +2024-04-13 03:50:42,326: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:42 +2024-04-13 03:50:42,326: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:42,327: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:42,327: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:42,328: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:42,328: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:43,627: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:43,628: root: INFO: Current backtesting datetime 2020-07-02 15:00:00-05:00 +2024-04-13 03:50:43,628: root: INFO: Current backtesting datetime 2020-07-03 08:30:00-05:00 +2024-04-13 03:50:43,629: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:50:43,630: root: INFO: Current backtesting datetime 2020-07-03 08:29:00-05:00 +2024-04-13 03:50:43,632: root: INFO: Current backtesting datetime 2020-07-03 08:29:00-05:00 +2024-04-13 03:50:43,632: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:50:43,632: root: INFO: Current backtesting datetime 2020-07-06 07:30:00-05:00 +2024-04-13 03:50:43,633: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:50:43,634: root: INFO: Current backtesting datetime 2020-07-06 08:30:00-05:00 +2024-04-13 03:50:43,634: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:50:43,635: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:43 +2024-04-13 03:50:43,635: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:43,636: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:43,636: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:43,636: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:43,636: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:44,932: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:44,933: root: INFO: Current backtesting datetime 2020-07-06 15:00:00-05:00 +2024-04-13 03:50:44,933: root: INFO: Current backtesting datetime 2020-07-07 08:30:00-05:00 +2024-04-13 03:50:44,933: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:44 +2024-04-13 03:50:44,934: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:44,934: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:44,935: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:44,935: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:44,935: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:46,277: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:46,278: root: INFO: Current backtesting datetime 2020-07-07 15:00:00-05:00 +2024-04-13 03:50:46,278: root: INFO: Current backtesting datetime 2020-07-08 08:30:00-05:00 +2024-04-13 03:50:46,278: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:46 +2024-04-13 03:50:46,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:46,279: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:46,279: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:46,279: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:46,279: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:48,391: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:48,392: root: INFO: Current backtesting datetime 2020-07-08 15:00:00-05:00 +2024-04-13 03:50:48,393: root: INFO: Current backtesting datetime 2020-07-09 08:30:00-05:00 +2024-04-13 03:50:48,393: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:48 +2024-04-13 03:50:48,393: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:48,394: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:48,394: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:48,395: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:48,395: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:49,539: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:49,541: root: INFO: Current backtesting datetime 2020-07-09 15:00:00-05:00 +2024-04-13 03:50:49,541: root: INFO: Current backtesting datetime 2020-07-10 08:30:00-05:00 +2024-04-13 03:50:49,541: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:49 +2024-04-13 03:50:49,542: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:49,542: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:49,543: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:49,543: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:49,543: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:51,388: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:51,389: root: INFO: Current backtesting datetime 2020-07-10 15:00:00-05:00 +2024-04-13 03:50:51,389: root: INFO: Current backtesting datetime 2020-07-11 08:30:00-05:00 +2024-04-13 03:50:51,389: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:50:51,391: root: INFO: Current backtesting datetime 2020-07-11 08:29:00-05:00 +2024-04-13 03:50:51,392: root: INFO: Current backtesting datetime 2020-07-11 08:29:00-05:00 +2024-04-13 03:50:51,392: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:50:51,393: root: INFO: Current backtesting datetime 2020-07-13 07:30:00-05:00 +2024-04-13 03:50:51,394: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:50:51,394: root: INFO: Current backtesting datetime 2020-07-13 08:30:00-05:00 +2024-04-13 03:50:51,394: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:50:51,395: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:51 +2024-04-13 03:50:51,396: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:51,396: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:51,397: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:51,397: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:51,397: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:52,922: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:52,923: root: INFO: Current backtesting datetime 2020-07-13 15:00:00-05:00 +2024-04-13 03:50:52,923: root: INFO: Current backtesting datetime 2020-07-14 08:30:00-05:00 +2024-04-13 03:50:52,923: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:52 +2024-04-13 03:50:52,924: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:52,924: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:52,925: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:52,925: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:52,925: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:54,689: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:54,690: root: INFO: Current backtesting datetime 2020-07-14 15:00:00-05:00 +2024-04-13 03:50:54,690: root: INFO: Current backtesting datetime 2020-07-15 08:30:00-05:00 +2024-04-13 03:50:54,691: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:54 +2024-04-13 03:50:54,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:54,692: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:54,692: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:54,692: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:54,693: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:50:55,895: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:50:55,896: root: INFO: Current backtesting datetime 2020-07-15 15:00:00-05:00 +2024-04-13 03:50:55,896: root: INFO: Current backtesting datetime 2020-07-16 08:30:00-05:00 +2024-04-13 03:50:55,897: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:50:55 +2024-04-13 03:50:55,897: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:55,898: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:50:55,898: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:50:55,898: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:50:55,898: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:01,376: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:01,377: root: INFO: Current backtesting datetime 2020-07-16 15:00:00-05:00 +2024-04-13 03:51:01,377: root: INFO: Current backtesting datetime 2020-07-17 08:30:00-05:00 +2024-04-13 03:51:01,378: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:01 +2024-04-13 03:51:01,378: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:01,379: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:01,379: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:01,380: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:01,380: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:07,651: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:07,652: root: INFO: Current backtesting datetime 2020-07-17 15:00:00-05:00 +2024-04-13 03:51:07,652: root: INFO: Current backtesting datetime 2020-07-18 08:30:00-05:00 +2024-04-13 03:51:07,653: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:51:07,654: root: INFO: Current backtesting datetime 2020-07-18 08:29:00-05:00 +2024-04-13 03:51:07,655: root: INFO: Current backtesting datetime 2020-07-18 08:29:00-05:00 +2024-04-13 03:51:07,655: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:51:07,656: root: INFO: Current backtesting datetime 2020-07-20 07:30:00-05:00 +2024-04-13 03:51:07,657: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:51:07,657: root: INFO: Current backtesting datetime 2020-07-20 08:30:00-05:00 +2024-04-13 03:51:07,657: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:51:07,659: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:07 +2024-04-13 03:51:07,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:07,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:07,660: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:07,660: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:07,660: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:10,336: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:10,337: root: INFO: Current backtesting datetime 2020-07-20 15:00:00-05:00 +2024-04-13 03:51:10,337: root: INFO: Current backtesting datetime 2020-07-21 08:30:00-05:00 +2024-04-13 03:51:10,337: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:10 +2024-04-13 03:51:10,337: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:10,338: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:10,339: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:10,339: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:10,339: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:11,728: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:11,729: root: INFO: Current backtesting datetime 2020-07-21 15:00:00-05:00 +2024-04-13 03:51:11,729: root: INFO: Current backtesting datetime 2020-07-22 08:30:00-05:00 +2024-04-13 03:51:11,730: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:11 +2024-04-13 03:51:11,730: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:11,731: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:11,731: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:11,732: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:11,732: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:12,861: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:12,862: root: INFO: Current backtesting datetime 2020-07-22 15:00:00-05:00 +2024-04-13 03:51:12,863: root: INFO: Current backtesting datetime 2020-07-23 08:30:00-05:00 +2024-04-13 03:51:12,863: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:12 +2024-04-13 03:51:12,863: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:12,864: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:12,864: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:12,865: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:12,865: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:13,950: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:13,951: root: INFO: Current backtesting datetime 2020-07-23 15:00:00-05:00 +2024-04-13 03:51:13,951: root: INFO: Current backtesting datetime 2020-07-24 08:30:00-05:00 +2024-04-13 03:51:13,952: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:13 +2024-04-13 03:51:13,952: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:13,953: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:13,953: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:13,953: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:13,953: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:16,352: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:16,353: root: INFO: Current backtesting datetime 2020-07-24 15:00:00-05:00 +2024-04-13 03:51:16,353: root: INFO: Current backtesting datetime 2020-07-25 08:30:00-05:00 +2024-04-13 03:51:16,354: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:51:16,355: root: INFO: Current backtesting datetime 2020-07-25 08:29:00-05:00 +2024-04-13 03:51:16,357: root: INFO: Current backtesting datetime 2020-07-25 08:29:00-05:00 +2024-04-13 03:51:16,357: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:51:16,357: root: INFO: Current backtesting datetime 2020-07-27 07:30:00-05:00 +2024-04-13 03:51:16,358: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:51:16,359: root: INFO: Current backtesting datetime 2020-07-27 08:30:00-05:00 +2024-04-13 03:51:16,359: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:51:16,360: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:16 +2024-04-13 03:51:16,360: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:16,361: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:16,361: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:16,361: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:16,362: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:17,983: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:17,984: root: INFO: Current backtesting datetime 2020-07-27 15:00:00-05:00 +2024-04-13 03:51:17,984: root: INFO: Current backtesting datetime 2020-07-28 08:30:00-05:00 +2024-04-13 03:51:17,985: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:17 +2024-04-13 03:51:17,985: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:17,985: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:17,986: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:17,986: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:17,986: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:19,586: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:19,587: root: INFO: Current backtesting datetime 2020-07-28 15:00:00-05:00 +2024-04-13 03:51:19,587: root: INFO: Current backtesting datetime 2020-07-29 08:30:00-05:00 +2024-04-13 03:51:19,588: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:19 +2024-04-13 03:51:19,588: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:19,588: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:19,589: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:19,589: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:19,589: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:21,070: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:21,071: root: INFO: Current backtesting datetime 2020-07-29 15:00:00-05:00 +2024-04-13 03:51:21,072: root: INFO: Current backtesting datetime 2020-07-30 08:30:00-05:00 +2024-04-13 03:51:21,072: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:21 +2024-04-13 03:51:21,072: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:21,073: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:21,073: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:21,074: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:21,074: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:22,914: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:22,915: root: INFO: Current backtesting datetime 2020-07-30 15:00:00-05:00 +2024-04-13 03:51:22,915: root: INFO: Current backtesting datetime 2020-07-31 08:30:00-05:00 +2024-04-13 03:51:22,916: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:22 +2024-04-13 03:51:22,916: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:22,917: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:22,917: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:22,918: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:22,918: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:24,628: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:24,629: root: INFO: Current backtesting datetime 2020-07-31 15:00:00-05:00 +2024-04-13 03:51:24,629: root: INFO: Current backtesting datetime 2020-08-01 08:30:00-05:00 +2024-04-13 03:51:24,630: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:51:24,631: root: INFO: Current backtesting datetime 2020-08-01 08:29:00-05:00 +2024-04-13 03:51:24,632: root: INFO: Current backtesting datetime 2020-08-01 08:29:00-05:00 +2024-04-13 03:51:24,632: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:51:24,633: root: INFO: Current backtesting datetime 2020-08-03 07:30:00-05:00 +2024-04-13 03:51:24,634: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:51:24,635: root: INFO: Current backtesting datetime 2020-08-03 08:30:00-05:00 +2024-04-13 03:51:24,635: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:51:24,636: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:24 +2024-04-13 03:51:24,636: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:24,637: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:24,637: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:24,637: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:24,637: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:25,644: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:25,645: root: INFO: Current backtesting datetime 2020-08-03 15:00:00-05:00 +2024-04-13 03:51:25,645: root: INFO: Current backtesting datetime 2020-08-04 08:30:00-05:00 +2024-04-13 03:51:25,645: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:25 +2024-04-13 03:51:25,645: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:25,646: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:25,646: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:25,647: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:25,647: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:26,375: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:26,376: root: INFO: Current backtesting datetime 2020-08-04 15:00:00-05:00 +2024-04-13 03:51:26,376: root: INFO: Current backtesting datetime 2020-08-05 08:30:00-05:00 +2024-04-13 03:51:26,377: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:26 +2024-04-13 03:51:26,377: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:26,378: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:26,378: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:26,378: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:26,378: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:26,847: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:26,848: root: INFO: Current backtesting datetime 2020-08-05 15:00:00-05:00 +2024-04-13 03:51:26,849: root: INFO: Current backtesting datetime 2020-08-06 08:30:00-05:00 +2024-04-13 03:51:26,849: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:26 +2024-04-13 03:51:26,849: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:26,850: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:26,850: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:26,851: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:26,851: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:28,581: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:28,582: root: INFO: Current backtesting datetime 2020-08-06 15:00:00-05:00 +2024-04-13 03:51:28,582: root: INFO: Current backtesting datetime 2020-08-07 08:30:00-05:00 +2024-04-13 03:51:28,583: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:28 +2024-04-13 03:51:28,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:28,584: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:28,584: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:28,585: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:28,585: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:30,407: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:30,407: root: INFO: Current backtesting datetime 2020-08-07 15:00:00-05:00 +2024-04-13 03:51:30,408: root: INFO: Current backtesting datetime 2020-08-08 08:30:00-05:00 +2024-04-13 03:51:30,408: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:51:30,410: root: INFO: Current backtesting datetime 2020-08-08 08:29:00-05:00 +2024-04-13 03:51:30,411: root: INFO: Current backtesting datetime 2020-08-08 08:29:00-05:00 +2024-04-13 03:51:30,411: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:51:30,412: root: INFO: Current backtesting datetime 2020-08-10 07:30:00-05:00 +2024-04-13 03:51:30,412: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:51:30,413: root: INFO: Current backtesting datetime 2020-08-10 08:30:00-05:00 +2024-04-13 03:51:30,413: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:51:30,414: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:30 +2024-04-13 03:51:30,415: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:30,416: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:30,416: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:30,417: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:30,417: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:32,286: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:32,287: root: INFO: Current backtesting datetime 2020-08-10 15:00:00-05:00 +2024-04-13 03:51:32,287: root: INFO: Current backtesting datetime 2020-08-11 08:30:00-05:00 +2024-04-13 03:51:32,288: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:32 +2024-04-13 03:51:32,288: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:32,288: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:32,289: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:32,289: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:32,289: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:33,046: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:33,047: root: INFO: Current backtesting datetime 2020-08-11 15:00:00-05:00 +2024-04-13 03:51:33,048: root: INFO: Current backtesting datetime 2020-08-12 08:30:00-05:00 +2024-04-13 03:51:33,048: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:33 +2024-04-13 03:51:33,048: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:33,049: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:33,049: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:33,050: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:33,050: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:33,703: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:33,704: root: INFO: Current backtesting datetime 2020-08-12 15:00:00-05:00 +2024-04-13 03:51:33,704: root: INFO: Current backtesting datetime 2020-08-13 08:30:00-05:00 +2024-04-13 03:51:33,705: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:33 +2024-04-13 03:51:33,705: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:33,706: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:33,706: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:33,706: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:33,707: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:34,046: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:34,047: root: INFO: Current backtesting datetime 2020-08-13 15:00:00-05:00 +2024-04-13 03:51:34,047: root: INFO: Current backtesting datetime 2020-08-14 08:30:00-05:00 +2024-04-13 03:51:34,047: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:34 +2024-04-13 03:51:34,048: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:34,048: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:34,049: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:34,049: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:34,049: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:34,784: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:34,785: root: INFO: Current backtesting datetime 2020-08-14 15:00:00-05:00 +2024-04-13 03:51:34,786: root: INFO: Current backtesting datetime 2020-08-15 08:30:00-05:00 +2024-04-13 03:51:34,787: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:51:34,788: root: INFO: Current backtesting datetime 2020-08-15 08:29:00-05:00 +2024-04-13 03:51:34,789: root: INFO: Current backtesting datetime 2020-08-15 08:29:00-05:00 +2024-04-13 03:51:34,789: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:51:34,790: root: INFO: Current backtesting datetime 2020-08-17 07:30:00-05:00 +2024-04-13 03:51:34,791: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:51:34,792: root: INFO: Current backtesting datetime 2020-08-17 08:30:00-05:00 +2024-04-13 03:51:34,792: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:51:34,793: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:34 +2024-04-13 03:51:34,793: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:34,794: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:34,794: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:34,794: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:34,794: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:35,124: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:35,125: root: INFO: Current backtesting datetime 2020-08-17 15:00:00-05:00 +2024-04-13 03:51:35,125: root: INFO: Current backtesting datetime 2020-08-18 08:30:00-05:00 +2024-04-13 03:51:35,126: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:35 +2024-04-13 03:51:35,126: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:35,127: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:35,127: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:35,128: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:35,128: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:37,393: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:37,394: root: INFO: Current backtesting datetime 2020-08-18 15:00:00-05:00 +2024-04-13 03:51:37,394: root: INFO: Current backtesting datetime 2020-08-19 08:30:00-05:00 +2024-04-13 03:51:37,395: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:37 +2024-04-13 03:51:37,395: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:37,396: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:37,396: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:37,397: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:37,397: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:40,693: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:40,694: root: INFO: Current backtesting datetime 2020-08-19 15:00:00-05:00 +2024-04-13 03:51:40,694: root: INFO: Current backtesting datetime 2020-08-20 08:30:00-05:00 +2024-04-13 03:51:40,695: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:40 +2024-04-13 03:51:40,695: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:40,696: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:40,696: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:40,696: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:40,696: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:45,069: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:45,070: root: INFO: Current backtesting datetime 2020-08-20 15:00:00-05:00 +2024-04-13 03:51:45,070: root: INFO: Current backtesting datetime 2020-08-21 08:30:00-05:00 +2024-04-13 03:51:45,071: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:45 +2024-04-13 03:51:45,071: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:45,072: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:45,072: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:45,073: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:45,073: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:52,158: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:52,158: root: INFO: Current backtesting datetime 2020-08-21 15:00:00-05:00 +2024-04-13 03:51:52,158: root: INFO: Current backtesting datetime 2020-08-22 08:30:00-05:00 +2024-04-13 03:51:52,159: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:51:52,160: root: INFO: Current backtesting datetime 2020-08-22 08:29:00-05:00 +2024-04-13 03:51:52,161: root: INFO: Current backtesting datetime 2020-08-22 08:29:00-05:00 +2024-04-13 03:51:52,162: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:51:52,162: root: INFO: Current backtesting datetime 2020-08-24 07:30:00-05:00 +2024-04-13 03:51:52,163: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:51:52,164: root: INFO: Current backtesting datetime 2020-08-24 08:30:00-05:00 +2024-04-13 03:51:52,164: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:51:52,165: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:52 +2024-04-13 03:51:52,165: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:52,166: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:52,166: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:52,166: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:52,166: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:51:56,750: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:51:56,751: root: INFO: Current backtesting datetime 2020-08-24 15:00:00-05:00 +2024-04-13 03:51:56,751: root: INFO: Current backtesting datetime 2020-08-25 08:30:00-05:00 +2024-04-13 03:51:56,752: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:51:56 +2024-04-13 03:51:56,752: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:56,752: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:51:56,753: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:51:56,753: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:51:56,753: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:01,652: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:01,653: root: INFO: Current backtesting datetime 2020-08-25 15:00:00-05:00 +2024-04-13 03:52:01,653: root: INFO: Current backtesting datetime 2020-08-26 08:30:00-05:00 +2024-04-13 03:52:01,654: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:01 +2024-04-13 03:52:01,654: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:01,654: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:01,655: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:01,655: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:01,655: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:10,246: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:10,247: root: INFO: Current backtesting datetime 2020-08-26 15:00:00-05:00 +2024-04-13 03:52:10,248: root: INFO: Current backtesting datetime 2020-08-27 08:30:00-05:00 +2024-04-13 03:52:10,248: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:10 +2024-04-13 03:52:10,248: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:10,249: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:10,249: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:10,250: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:10,250: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:19,253: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:19,254: root: INFO: Current backtesting datetime 2020-08-27 15:00:00-05:00 +2024-04-13 03:52:19,255: root: INFO: Current backtesting datetime 2020-08-28 08:30:00-05:00 +2024-04-13 03:52:19,255: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:19 +2024-04-13 03:52:19,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:19,256: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:19,256: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:19,257: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:19,257: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:22,741: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:22,742: root: INFO: Current backtesting datetime 2020-08-28 15:00:00-05:00 +2024-04-13 03:52:22,743: root: INFO: Current backtesting datetime 2020-08-29 08:30:00-05:00 +2024-04-13 03:52:22,743: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:52:22,745: root: INFO: Current backtesting datetime 2020-08-29 08:29:00-05:00 +2024-04-13 03:52:22,746: root: INFO: Current backtesting datetime 2020-08-29 08:29:00-05:00 +2024-04-13 03:52:22,746: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:52:22,747: root: INFO: Current backtesting datetime 2020-08-31 07:30:00-05:00 +2024-04-13 03:52:22,747: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:52:22,748: root: INFO: Current backtesting datetime 2020-08-31 08:30:00-05:00 +2024-04-13 03:52:22,748: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:52:22,749: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:22 +2024-04-13 03:52:22,749: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:22,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:22,750: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:22,751: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:22,751: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:25,458: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:25,459: root: INFO: Current backtesting datetime 2020-08-31 15:00:00-05:00 +2024-04-13 03:52:25,459: root: INFO: Current backtesting datetime 2020-09-01 08:30:00-05:00 +2024-04-13 03:52:25,460: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:25 +2024-04-13 03:52:25,460: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:25,461: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:25,461: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:25,461: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:25,462: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:29,261: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:29,262: root: INFO: Current backtesting datetime 2020-09-01 15:00:00-05:00 +2024-04-13 03:52:29,262: root: INFO: Current backtesting datetime 2020-09-02 08:30:00-05:00 +2024-04-13 03:52:29,263: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:29 +2024-04-13 03:52:29,263: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:29,264: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:29,264: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:29,264: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:29,264: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:32,254: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:32,255: root: INFO: Current backtesting datetime 2020-09-02 15:00:00-05:00 +2024-04-13 03:52:32,255: root: INFO: Current backtesting datetime 2020-09-03 08:30:00-05:00 +2024-04-13 03:52:32,256: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:32 +2024-04-13 03:52:32,256: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:32,256: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:32,257: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:32,257: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:32,257: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:34,714: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:34,715: root: INFO: Current backtesting datetime 2020-09-03 15:00:00-05:00 +2024-04-13 03:52:34,716: root: INFO: Current backtesting datetime 2020-09-04 08:30:00-05:00 +2024-04-13 03:52:34,716: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:34 +2024-04-13 03:52:34,716: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:34,717: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:34,717: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:34,718: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:34,718: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:37,173: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:37,174: root: INFO: Current backtesting datetime 2020-09-04 15:00:00-05:00 +2024-04-13 03:52:37,174: root: INFO: Current backtesting datetime 2020-09-05 08:30:00-05:00 +2024-04-13 03:52:37,174: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:52:37,176: root: INFO: Current backtesting datetime 2020-09-05 08:29:00-05:00 +2024-04-13 03:52:37,177: root: INFO: Current backtesting datetime 2020-09-05 08:29:00-05:00 +2024-04-13 03:52:37,177: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:52:37,178: root: INFO: Current backtesting datetime 2020-09-08 07:30:00-05:00 +2024-04-13 03:52:37,178: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:52:37,179: root: INFO: Current backtesting datetime 2020-09-08 08:30:00-05:00 +2024-04-13 03:52:37,179: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:52:37,180: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:37 +2024-04-13 03:52:37,180: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:37,181: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:37,181: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:37,182: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:37,182: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:40,754: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:40,755: root: INFO: Current backtesting datetime 2020-09-08 15:00:00-05:00 +2024-04-13 03:52:40,755: root: INFO: Current backtesting datetime 2020-09-09 08:30:00-05:00 +2024-04-13 03:52:40,755: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:40 +2024-04-13 03:52:40,756: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:40,756: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:40,757: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:40,757: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:40,757: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:44,014: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:44,015: root: INFO: Current backtesting datetime 2020-09-09 15:00:00-05:00 +2024-04-13 03:52:44,015: root: INFO: Current backtesting datetime 2020-09-10 08:30:00-05:00 +2024-04-13 03:52:44,016: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:44 +2024-04-13 03:52:44,016: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:44,017: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:44,017: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:44,018: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:44,018: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:47,395: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:47,396: root: INFO: Current backtesting datetime 2020-09-10 15:00:00-05:00 +2024-04-13 03:52:47,396: root: INFO: Current backtesting datetime 2020-09-11 08:30:00-05:00 +2024-04-13 03:52:47,397: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:47 +2024-04-13 03:52:47,397: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:47,398: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:47,398: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:47,398: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:47,399: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:51,392: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:51,393: root: INFO: Current backtesting datetime 2020-09-11 15:00:00-05:00 +2024-04-13 03:52:51,394: root: INFO: Current backtesting datetime 2020-09-12 08:30:00-05:00 +2024-04-13 03:52:51,394: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:52:51,395: root: INFO: Current backtesting datetime 2020-09-12 08:29:00-05:00 +2024-04-13 03:52:51,397: root: INFO: Current backtesting datetime 2020-09-12 08:29:00-05:00 +2024-04-13 03:52:51,397: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:52:51,398: root: INFO: Current backtesting datetime 2020-09-14 07:30:00-05:00 +2024-04-13 03:52:51,398: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:52:51,399: root: INFO: Current backtesting datetime 2020-09-14 08:30:00-05:00 +2024-04-13 03:52:51,399: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:52:51,400: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:51 +2024-04-13 03:52:51,400: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:51,401: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:51,401: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:51,402: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:51,402: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:55,340: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:55,341: root: INFO: Current backtesting datetime 2020-09-14 15:00:00-05:00 +2024-04-13 03:52:55,341: root: INFO: Current backtesting datetime 2020-09-15 08:30:00-05:00 +2024-04-13 03:52:55,341: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:55 +2024-04-13 03:52:55,341: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:55,342: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:55,342: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:55,343: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:55,343: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:52:57,585: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:52:57,586: root: INFO: Current backtesting datetime 2020-09-15 15:00:00-05:00 +2024-04-13 03:52:57,586: root: INFO: Current backtesting datetime 2020-09-16 08:30:00-05:00 +2024-04-13 03:52:57,587: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:52:57 +2024-04-13 03:52:57,587: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:57,587: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:52:57,588: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:52:57,588: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:52:57,588: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:00,746: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:00,746: root: INFO: Current backtesting datetime 2020-09-16 15:00:00-05:00 +2024-04-13 03:53:00,747: root: INFO: Current backtesting datetime 2020-09-17 08:30:00-05:00 +2024-04-13 03:53:00,747: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:00 +2024-04-13 03:53:00,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:00,748: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:00,748: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:00,749: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:00,749: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:03,204: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:03,205: root: INFO: Current backtesting datetime 2020-09-17 15:00:00-05:00 +2024-04-13 03:53:03,205: root: INFO: Current backtesting datetime 2020-09-18 08:30:00-05:00 +2024-04-13 03:53:03,206: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:03 +2024-04-13 03:53:03,206: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:03,207: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:03,207: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:03,208: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:03,208: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:05,523: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:05,524: root: INFO: Current backtesting datetime 2020-09-18 15:00:00-05:00 +2024-04-13 03:53:05,525: root: INFO: Current backtesting datetime 2020-09-19 08:30:00-05:00 +2024-04-13 03:53:05,525: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:05,527: root: INFO: Current backtesting datetime 2020-09-19 08:29:00-05:00 +2024-04-13 03:53:05,528: root: INFO: Current backtesting datetime 2020-09-19 08:29:00-05:00 +2024-04-13 03:53:05,528: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:05,529: root: INFO: Current backtesting datetime 2020-09-21 07:30:00-05:00 +2024-04-13 03:53:05,529: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:05,530: root: INFO: Current backtesting datetime 2020-09-21 08:30:00-05:00 +2024-04-13 03:53:05,530: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:05,531: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:05 +2024-04-13 03:53:05,531: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:05,532: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:05,532: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:05,533: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:05,533: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:06,700: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:06,701: root: INFO: Current backtesting datetime 2020-09-21 15:00:00-05:00 +2024-04-13 03:53:06,701: root: INFO: Current backtesting datetime 2020-09-22 08:30:00-05:00 +2024-04-13 03:53:06,702: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:06 +2024-04-13 03:53:06,702: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:06,703: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:06,703: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:06,703: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:06,703: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:08,799: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:08,800: root: INFO: Current backtesting datetime 2020-09-22 15:00:00-05:00 +2024-04-13 03:53:08,800: root: INFO: Current backtesting datetime 2020-09-23 08:30:00-05:00 +2024-04-13 03:53:08,801: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:08 +2024-04-13 03:53:08,801: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:08,802: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:08,802: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:08,802: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:08,802: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:14,137: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:14,138: root: INFO: Current backtesting datetime 2020-09-23 15:00:00-05:00 +2024-04-13 03:53:14,138: root: INFO: Current backtesting datetime 2020-09-24 08:30:00-05:00 +2024-04-13 03:53:14,138: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:14 +2024-04-13 03:53:14,139: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:14,139: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:14,140: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:14,140: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:14,140: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:16,934: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:16,935: root: INFO: Current backtesting datetime 2020-09-24 15:00:00-05:00 +2024-04-13 03:53:16,936: root: INFO: Current backtesting datetime 2020-09-25 08:30:00-05:00 +2024-04-13 03:53:16,936: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:16 +2024-04-13 03:53:16,936: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:16,937: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:16,937: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:16,938: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:16,938: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:18,358: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:18,359: root: INFO: Current backtesting datetime 2020-09-25 15:00:00-05:00 +2024-04-13 03:53:18,360: root: INFO: Current backtesting datetime 2020-09-26 08:30:00-05:00 +2024-04-13 03:53:18,360: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:18,362: root: INFO: Current backtesting datetime 2020-09-26 08:29:00-05:00 +2024-04-13 03:53:18,363: root: INFO: Current backtesting datetime 2020-09-26 08:29:00-05:00 +2024-04-13 03:53:18,363: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:18,364: root: INFO: Current backtesting datetime 2020-09-28 07:30:00-05:00 +2024-04-13 03:53:18,364: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:18,365: root: INFO: Current backtesting datetime 2020-09-28 08:30:00-05:00 +2024-04-13 03:53:18,365: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:18,366: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:18 +2024-04-13 03:53:18,367: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:18,367: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:18,368: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:18,368: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:18,368: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:19,067: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:19,068: root: INFO: Current backtesting datetime 2020-09-28 15:00:00-05:00 +2024-04-13 03:53:19,068: root: INFO: Current backtesting datetime 2020-09-29 08:30:00-05:00 +2024-04-13 03:53:19,068: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:19 +2024-04-13 03:53:19,069: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:19,069: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:19,070: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:19,070: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:19,070: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:19,686: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:19,687: root: INFO: Current backtesting datetime 2020-09-29 15:00:00-05:00 +2024-04-13 03:53:19,687: root: INFO: Current backtesting datetime 2020-09-30 08:30:00-05:00 +2024-04-13 03:53:19,688: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:19 +2024-04-13 03:53:19,688: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:19,688: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:19,689: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:19,689: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:19,689: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:20,012: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:20,013: root: INFO: Current backtesting datetime 2020-09-30 15:00:00-05:00 +2024-04-13 03:53:20,013: root: INFO: Current backtesting datetime 2020-10-01 08:30:00-05:00 +2024-04-13 03:53:20,014: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:20 +2024-04-13 03:53:20,014: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:20,015: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:20,015: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:20,015: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:20,015: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:20,670: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:20,671: root: INFO: Current backtesting datetime 2020-10-01 15:00:00-05:00 +2024-04-13 03:53:20,672: root: INFO: Current backtesting datetime 2020-10-02 08:30:00-05:00 +2024-04-13 03:53:20,672: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:20 +2024-04-13 03:53:20,672: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:20,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:20,673: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:20,674: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:20,674: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:20,978: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:20,979: root: INFO: Current backtesting datetime 2020-10-02 15:00:00-05:00 +2024-04-13 03:53:20,980: root: INFO: Current backtesting datetime 2020-10-03 08:30:00-05:00 +2024-04-13 03:53:20,980: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:20,982: root: INFO: Current backtesting datetime 2020-10-03 08:29:00-05:00 +2024-04-13 03:53:20,983: root: INFO: Current backtesting datetime 2020-10-03 08:29:00-05:00 +2024-04-13 03:53:20,983: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:20,984: root: INFO: Current backtesting datetime 2020-10-05 07:30:00-05:00 +2024-04-13 03:53:20,984: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:20,985: root: INFO: Current backtesting datetime 2020-10-05 08:30:00-05:00 +2024-04-13 03:53:20,985: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:20,986: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:20 +2024-04-13 03:53:20,986: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:20,987: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:20,987: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:20,988: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:20,988: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:21,472: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:21,473: root: INFO: Current backtesting datetime 2020-10-05 15:00:00-05:00 +2024-04-13 03:53:21,474: root: INFO: Current backtesting datetime 2020-10-06 08:30:00-05:00 +2024-04-13 03:53:21,474: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:21 +2024-04-13 03:53:21,474: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:21,475: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:21,475: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:21,476: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:21,476: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:22,033: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:22,034: root: INFO: Current backtesting datetime 2020-10-06 15:00:00-05:00 +2024-04-13 03:53:22,034: root: INFO: Current backtesting datetime 2020-10-07 08:30:00-05:00 +2024-04-13 03:53:22,034: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:22 +2024-04-13 03:53:22,035: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:22,035: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:22,036: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:22,036: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:22,036: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:22,725: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:22,726: root: INFO: Current backtesting datetime 2020-10-07 15:00:00-05:00 +2024-04-13 03:53:22,726: root: INFO: Current backtesting datetime 2020-10-08 08:30:00-05:00 +2024-04-13 03:53:22,727: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:22 +2024-04-13 03:53:22,727: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:22,727: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:22,728: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:22,728: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:22,728: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:23,040: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:23,041: root: INFO: Current backtesting datetime 2020-10-08 15:00:00-05:00 +2024-04-13 03:53:23,041: root: INFO: Current backtesting datetime 2020-10-09 08:30:00-05:00 +2024-04-13 03:53:23,041: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:23 +2024-04-13 03:53:23,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:23,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:23,043: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:23,043: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:23,043: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:23,675: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:23,676: root: INFO: Current backtesting datetime 2020-10-09 15:00:00-05:00 +2024-04-13 03:53:23,676: root: INFO: Current backtesting datetime 2020-10-10 08:30:00-05:00 +2024-04-13 03:53:23,677: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:23,678: root: INFO: Current backtesting datetime 2020-10-10 08:29:00-05:00 +2024-04-13 03:53:23,679: root: INFO: Current backtesting datetime 2020-10-10 08:29:00-05:00 +2024-04-13 03:53:23,679: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:23,680: root: INFO: Current backtesting datetime 2020-10-12 07:30:00-05:00 +2024-04-13 03:53:23,681: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:23,681: root: INFO: Current backtesting datetime 2020-10-12 08:30:00-05:00 +2024-04-13 03:53:23,682: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:23,683: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:23 +2024-04-13 03:53:23,683: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:23,683: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:23,684: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:23,684: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:23,684: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:23,987: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:23,988: root: INFO: Current backtesting datetime 2020-10-12 15:00:00-05:00 +2024-04-13 03:53:23,988: root: INFO: Current backtesting datetime 2020-10-13 08:30:00-05:00 +2024-04-13 03:53:23,989: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:23 +2024-04-13 03:53:23,989: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:23,990: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:23,990: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:23,990: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:23,990: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:24,735: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:24,736: root: INFO: Current backtesting datetime 2020-10-13 15:00:00-05:00 +2024-04-13 03:53:24,736: root: INFO: Current backtesting datetime 2020-10-14 08:30:00-05:00 +2024-04-13 03:53:24,737: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:24 +2024-04-13 03:53:24,737: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:24,738: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:24,738: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:24,738: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:24,738: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:24,998: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:24,999: root: INFO: Current backtesting datetime 2020-10-14 15:00:00-05:00 +2024-04-13 03:53:24,999: root: INFO: Current backtesting datetime 2020-10-15 08:30:00-05:00 +2024-04-13 03:53:24,999: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:24 +2024-04-13 03:53:24,999: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:25,000: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:25,001: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:25,001: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:25,001: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:25,612: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:25,613: root: INFO: Current backtesting datetime 2020-10-15 15:00:00-05:00 +2024-04-13 03:53:25,613: root: INFO: Current backtesting datetime 2020-10-16 08:30:00-05:00 +2024-04-13 03:53:25,614: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:25 +2024-04-13 03:53:25,614: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:25,615: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:25,615: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:25,615: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:25,616: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:25,867: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:25,868: root: INFO: Current backtesting datetime 2020-10-16 15:00:00-05:00 +2024-04-13 03:53:25,868: root: INFO: Current backtesting datetime 2020-10-17 08:30:00-05:00 +2024-04-13 03:53:25,868: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:25,870: root: INFO: Current backtesting datetime 2020-10-17 08:29:00-05:00 +2024-04-13 03:53:25,871: root: INFO: Current backtesting datetime 2020-10-17 08:29:00-05:00 +2024-04-13 03:53:25,871: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:25,872: root: INFO: Current backtesting datetime 2020-10-19 07:30:00-05:00 +2024-04-13 03:53:25,873: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:25,874: root: INFO: Current backtesting datetime 2020-10-19 08:30:00-05:00 +2024-04-13 03:53:25,874: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:25,875: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:25 +2024-04-13 03:53:25,875: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:25,876: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:25,876: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:25,876: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:25,876: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:26,293: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:26,294: root: INFO: Current backtesting datetime 2020-10-19 15:00:00-05:00 +2024-04-13 03:53:26,294: root: INFO: Current backtesting datetime 2020-10-20 08:30:00-05:00 +2024-04-13 03:53:26,295: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:26 +2024-04-13 03:53:26,295: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:26,296: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:26,296: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:26,296: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:26,296: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:26,775: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:26,777: root: INFO: Current backtesting datetime 2020-10-20 15:00:00-05:00 +2024-04-13 03:53:26,777: root: INFO: Current backtesting datetime 2020-10-21 08:30:00-05:00 +2024-04-13 03:53:26,777: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:26 +2024-04-13 03:53:26,777: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:26,778: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:26,779: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:26,779: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:26,779: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:27,016: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:27,017: root: INFO: Current backtesting datetime 2020-10-21 15:00:00-05:00 +2024-04-13 03:53:27,017: root: INFO: Current backtesting datetime 2020-10-22 08:30:00-05:00 +2024-04-13 03:53:27,018: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:27 +2024-04-13 03:53:27,018: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:27,019: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:27,019: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:27,019: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:27,019: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:27,752: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:27,753: root: INFO: Current backtesting datetime 2020-10-22 15:00:00-05:00 +2024-04-13 03:53:27,753: root: INFO: Current backtesting datetime 2020-10-23 08:30:00-05:00 +2024-04-13 03:53:27,753: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:27 +2024-04-13 03:53:27,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:27,754: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:27,755: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:27,755: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:27,755: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:28,010: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:28,011: root: INFO: Current backtesting datetime 2020-10-23 15:00:00-05:00 +2024-04-13 03:53:28,011: root: INFO: Current backtesting datetime 2020-10-24 08:30:00-05:00 +2024-04-13 03:53:28,011: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:28,013: root: INFO: Current backtesting datetime 2020-10-24 08:29:00-05:00 +2024-04-13 03:53:28,014: root: INFO: Current backtesting datetime 2020-10-24 08:29:00-05:00 +2024-04-13 03:53:28,014: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:28,015: root: INFO: Current backtesting datetime 2020-10-26 07:30:00-05:00 +2024-04-13 03:53:28,016: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:28,016: root: INFO: Current backtesting datetime 2020-10-26 08:30:00-05:00 +2024-04-13 03:53:28,016: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:28,018: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:28 +2024-04-13 03:53:28,018: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:28,018: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:28,019: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:28,019: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:28,019: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:28,631: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:28,632: root: INFO: Current backtesting datetime 2020-10-26 15:00:00-05:00 +2024-04-13 03:53:28,632: root: INFO: Current backtesting datetime 2020-10-27 08:30:00-05:00 +2024-04-13 03:53:28,633: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:28 +2024-04-13 03:53:28,633: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:28,633: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:28,634: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:28,634: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:28,634: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:28,872: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:28,873: root: INFO: Current backtesting datetime 2020-10-27 15:00:00-05:00 +2024-04-13 03:53:28,873: root: INFO: Current backtesting datetime 2020-10-28 08:30:00-05:00 +2024-04-13 03:53:28,873: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:28 +2024-04-13 03:53:28,874: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:28,874: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:28,875: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:28,875: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:28,875: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:29,367: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:29,368: root: INFO: Current backtesting datetime 2020-10-28 15:00:00-05:00 +2024-04-13 03:53:29,368: root: INFO: Current backtesting datetime 2020-10-29 08:30:00-05:00 +2024-04-13 03:53:29,369: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:29 +2024-04-13 03:53:29,369: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:29,370: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:29,370: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:29,371: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:29,371: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:29,844: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:29,845: root: INFO: Current backtesting datetime 2020-10-29 15:00:00-05:00 +2024-04-13 03:53:29,845: root: INFO: Current backtesting datetime 2020-10-30 08:30:00-05:00 +2024-04-13 03:53:29,846: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:29 +2024-04-13 03:53:29,846: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:29,847: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:29,847: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:29,848: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:29,848: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:30,080: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:30,081: root: INFO: Current backtesting datetime 2020-10-30 15:00:00-05:00 +2024-04-13 03:53:30,081: root: INFO: Current backtesting datetime 2020-10-31 08:30:00-05:00 +2024-04-13 03:53:30,082: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:30,083: root: INFO: Current backtesting datetime 2020-10-31 08:29:00-05:00 +2024-04-13 03:53:30,085: root: INFO: Current backtesting datetime 2020-10-31 08:29:00-05:00 +2024-04-13 03:53:30,085: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:30,085: root: INFO: Current backtesting datetime 2020-11-02 08:30:00-05:00 +2024-04-13 03:53:30,086: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:30,087: root: INFO: Current backtesting datetime 2020-11-02 09:30:00-05:00 +2024-04-13 03:53:30,087: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:30,088: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:30 +2024-04-13 03:53:30,088: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:30,089: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:30,089: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:30,090: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:30,090: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:30,727: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:30,728: root: INFO: Current backtesting datetime 2020-11-02 16:00:00-05:00 +2024-04-13 03:53:30,728: root: INFO: Current backtesting datetime 2020-11-03 09:30:00-05:00 +2024-04-13 03:53:30,729: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:30 +2024-04-13 03:53:30,729: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:30,730: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:30,730: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:30,730: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:30,731: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:30,963: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:30,963: root: INFO: Current backtesting datetime 2020-11-03 16:00:00-05:00 +2024-04-13 03:53:30,964: root: INFO: Current backtesting datetime 2020-11-04 09:30:00-05:00 +2024-04-13 03:53:30,964: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:30 +2024-04-13 03:53:30,964: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:30,965: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:30,965: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:30,966: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:30,966: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:31,359: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:31,360: root: INFO: Current backtesting datetime 2020-11-04 16:00:00-05:00 +2024-04-13 03:53:31,360: root: INFO: Current backtesting datetime 2020-11-05 09:30:00-05:00 +2024-04-13 03:53:31,361: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:31 +2024-04-13 03:53:31,361: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:31,361: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:31,362: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:31,362: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:31,362: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:31,771: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:31,772: root: INFO: Current backtesting datetime 2020-11-05 16:00:00-05:00 +2024-04-13 03:53:31,772: root: INFO: Current backtesting datetime 2020-11-06 09:30:00-05:00 +2024-04-13 03:53:31,773: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:31 +2024-04-13 03:53:31,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:31,774: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:31,774: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:31,775: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:31,775: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:32,020: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:32,022: root: INFO: Current backtesting datetime 2020-11-06 16:00:00-05:00 +2024-04-13 03:53:32,022: root: INFO: Current backtesting datetime 2020-11-07 09:30:00-05:00 +2024-04-13 03:53:32,022: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:32,024: root: INFO: Current backtesting datetime 2020-11-07 09:29:00-05:00 +2024-04-13 03:53:32,025: root: INFO: Current backtesting datetime 2020-11-07 09:29:00-05:00 +2024-04-13 03:53:32,025: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:32,026: root: INFO: Current backtesting datetime 2020-11-09 08:30:00-05:00 +2024-04-13 03:53:32,027: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:32,028: root: INFO: Current backtesting datetime 2020-11-09 09:30:00-05:00 +2024-04-13 03:53:32,028: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:32,029: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:32 +2024-04-13 03:53:32,029: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:32,030: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:32,030: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:32,030: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:32,030: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:32,768: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:32,769: root: INFO: Current backtesting datetime 2020-11-09 16:00:00-05:00 +2024-04-13 03:53:32,769: root: INFO: Current backtesting datetime 2020-11-10 09:30:00-05:00 +2024-04-13 03:53:32,770: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:32 +2024-04-13 03:53:32,770: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:32,771: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:32,771: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:32,771: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:32,771: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:33,022: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:33,023: root: INFO: Current backtesting datetime 2020-11-10 16:00:00-05:00 +2024-04-13 03:53:33,023: root: INFO: Current backtesting datetime 2020-11-11 09:30:00-05:00 +2024-04-13 03:53:33,024: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:33 +2024-04-13 03:53:33,024: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:33,025: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:33,025: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:33,025: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:33,025: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:33,607: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:33,608: root: INFO: Current backtesting datetime 2020-11-11 16:00:00-05:00 +2024-04-13 03:53:33,608: root: INFO: Current backtesting datetime 2020-11-12 09:30:00-05:00 +2024-04-13 03:53:33,608: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:33 +2024-04-13 03:53:33,608: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:33,609: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:33,609: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:33,610: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:33,610: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:33,846: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:33,847: root: INFO: Current backtesting datetime 2020-11-12 16:00:00-05:00 +2024-04-13 03:53:33,847: root: INFO: Current backtesting datetime 2020-11-13 09:30:00-05:00 +2024-04-13 03:53:33,848: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:33 +2024-04-13 03:53:33,848: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:33,849: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:33,849: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:33,849: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:33,849: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:34,070: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:34,071: root: INFO: Current backtesting datetime 2020-11-13 16:00:00-05:00 +2024-04-13 03:53:34,071: root: INFO: Current backtesting datetime 2020-11-14 09:30:00-05:00 +2024-04-13 03:53:34,071: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:34,073: root: INFO: Current backtesting datetime 2020-11-14 09:29:00-05:00 +2024-04-13 03:53:34,074: root: INFO: Current backtesting datetime 2020-11-14 09:29:00-05:00 +2024-04-13 03:53:34,074: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:34,075: root: INFO: Current backtesting datetime 2020-11-16 08:30:00-05:00 +2024-04-13 03:53:34,075: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:34,076: root: INFO: Current backtesting datetime 2020-11-16 09:30:00-05:00 +2024-04-13 03:53:34,076: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:34,077: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:34 +2024-04-13 03:53:34,077: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:34,078: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:34,078: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:34,079: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:34,079: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:34,637: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:34,638: root: INFO: Current backtesting datetime 2020-11-16 16:00:00-05:00 +2024-04-13 03:53:34,638: root: INFO: Current backtesting datetime 2020-11-17 09:30:00-05:00 +2024-04-13 03:53:34,639: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:34 +2024-04-13 03:53:34,639: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:34,640: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:34,640: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:34,641: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:34,641: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:34,902: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:34,903: root: INFO: Current backtesting datetime 2020-11-17 16:00:00-05:00 +2024-04-13 03:53:34,904: root: INFO: Current backtesting datetime 2020-11-18 09:30:00-05:00 +2024-04-13 03:53:34,904: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:34 +2024-04-13 03:53:34,904: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:34,905: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:34,905: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:34,906: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:34,906: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:35,369: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:35,372: root: INFO: Current backtesting datetime 2020-11-18 16:00:00-05:00 +2024-04-13 03:53:35,372: root: INFO: Current backtesting datetime 2020-11-19 09:30:00-05:00 +2024-04-13 03:53:35,372: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:35 +2024-04-13 03:53:35,373: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:35,373: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:35,374: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:35,374: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:35,374: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:35,834: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:35,834: root: INFO: Current backtesting datetime 2020-11-19 16:00:00-05:00 +2024-04-13 03:53:35,835: root: INFO: Current backtesting datetime 2020-11-20 09:30:00-05:00 +2024-04-13 03:53:35,835: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:35 +2024-04-13 03:53:35,835: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:35,836: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:35,836: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:35,837: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:35,837: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:36,053: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:36,054: root: INFO: Current backtesting datetime 2020-11-20 16:00:00-05:00 +2024-04-13 03:53:36,054: root: INFO: Current backtesting datetime 2020-11-21 09:30:00-05:00 +2024-04-13 03:53:36,054: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:36,056: root: INFO: Current backtesting datetime 2020-11-21 09:29:00-05:00 +2024-04-13 03:53:36,057: root: INFO: Current backtesting datetime 2020-11-21 09:29:00-05:00 +2024-04-13 03:53:36,057: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:36,058: root: INFO: Current backtesting datetime 2020-11-23 08:30:00-05:00 +2024-04-13 03:53:36,058: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:36,059: root: INFO: Current backtesting datetime 2020-11-23 09:30:00-05:00 +2024-04-13 03:53:36,059: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:36,060: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:36 +2024-04-13 03:53:36,060: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:36,061: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:36,061: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:36,062: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:36,062: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:36,671: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:36,672: root: INFO: Current backtesting datetime 2020-11-23 16:00:00-05:00 +2024-04-13 03:53:36,672: root: INFO: Current backtesting datetime 2020-11-24 09:30:00-05:00 +2024-04-13 03:53:36,673: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:36 +2024-04-13 03:53:36,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:36,674: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:36,674: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:36,675: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:36,675: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:36,891: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:36,893: root: INFO: Current backtesting datetime 2020-11-24 16:00:00-05:00 +2024-04-13 03:53:36,893: root: INFO: Current backtesting datetime 2020-11-25 09:30:00-05:00 +2024-04-13 03:53:36,894: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:36 +2024-04-13 03:53:36,894: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:36,894: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:36,895: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:36,895: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:36,895: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:37,471: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:37,472: root: INFO: Current backtesting datetime 2020-11-25 16:00:00-05:00 +2024-04-13 03:53:37,472: root: INFO: Current backtesting datetime 2020-11-26 09:30:00-05:00 +2024-04-13 03:53:37,473: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:37,474: root: INFO: Current backtesting datetime 2020-11-26 09:29:00-05:00 +2024-04-13 03:53:37,475: root: INFO: Current backtesting datetime 2020-11-26 09:29:00-05:00 +2024-04-13 03:53:37,475: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:37,476: root: INFO: Current backtesting datetime 2020-11-27 08:30:00-05:00 +2024-04-13 03:53:37,477: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:37,477: root: INFO: Current backtesting datetime 2020-11-27 09:30:00-05:00 +2024-04-13 03:53:37,477: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:37,478: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:37 +2024-04-13 03:53:37,479: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:37,479: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:37,480: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:37,480: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:37,480: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:37,928: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:37,929: root: INFO: Current backtesting datetime 2020-11-27 13:00:00-05:00 +2024-04-13 03:53:37,929: root: INFO: Current backtesting datetime 2020-11-28 09:30:00-05:00 +2024-04-13 03:53:37,929: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:37,931: root: INFO: Current backtesting datetime 2020-11-28 09:29:00-05:00 +2024-04-13 03:53:37,932: root: INFO: Current backtesting datetime 2020-11-28 09:29:00-05:00 +2024-04-13 03:53:37,932: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:37,933: root: INFO: Current backtesting datetime 2020-11-30 08:30:00-05:00 +2024-04-13 03:53:37,933: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:37,934: root: INFO: Current backtesting datetime 2020-11-30 09:30:00-05:00 +2024-04-13 03:53:37,934: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:37,935: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:37 +2024-04-13 03:53:37,935: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:37,936: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:37,936: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:37,937: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:37,937: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:38,353: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:38,354: root: INFO: Current backtesting datetime 2020-11-30 16:00:00-05:00 +2024-04-13 03:53:38,354: root: INFO: Current backtesting datetime 2020-12-01 09:30:00-05:00 +2024-04-13 03:53:38,355: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:38 +2024-04-13 03:53:38,355: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:38,356: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:38,356: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:38,357: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:38,357: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:38,802: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:38,803: root: INFO: Current backtesting datetime 2020-12-01 16:00:00-05:00 +2024-04-13 03:53:38,803: root: INFO: Current backtesting datetime 2020-12-02 09:30:00-05:00 +2024-04-13 03:53:38,804: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:38 +2024-04-13 03:53:38,804: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:38,805: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:38,805: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:38,805: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:38,806: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:39,029: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:39,030: root: INFO: Current backtesting datetime 2020-12-02 16:00:00-05:00 +2024-04-13 03:53:39,031: root: INFO: Current backtesting datetime 2020-12-03 09:30:00-05:00 +2024-04-13 03:53:39,031: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:39 +2024-04-13 03:53:39,031: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:39,032: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:39,032: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:39,033: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:39,033: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:39,685: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:39,686: root: INFO: Current backtesting datetime 2020-12-03 16:00:00-05:00 +2024-04-13 03:53:39,687: root: INFO: Current backtesting datetime 2020-12-04 09:30:00-05:00 +2024-04-13 03:53:39,687: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:39 +2024-04-13 03:53:39,687: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:39,688: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:39,688: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:39,689: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:39,689: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:39,920: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:39,921: root: INFO: Current backtesting datetime 2020-12-04 16:00:00-05:00 +2024-04-13 03:53:39,921: root: INFO: Current backtesting datetime 2020-12-05 09:30:00-05:00 +2024-04-13 03:53:39,922: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:39,923: root: INFO: Current backtesting datetime 2020-12-05 09:29:00-05:00 +2024-04-13 03:53:39,925: root: INFO: Current backtesting datetime 2020-12-05 09:29:00-05:00 +2024-04-13 03:53:39,925: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:39,925: root: INFO: Current backtesting datetime 2020-12-07 08:30:00-05:00 +2024-04-13 03:53:39,926: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:39,927: root: INFO: Current backtesting datetime 2020-12-07 09:30:00-05:00 +2024-04-13 03:53:39,927: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:39,928: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:39 +2024-04-13 03:53:39,928: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:39,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:39,929: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:39,929: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:39,929: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:40,315: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:40,316: root: INFO: Current backtesting datetime 2020-12-07 16:00:00-05:00 +2024-04-13 03:53:40,316: root: INFO: Current backtesting datetime 2020-12-08 09:30:00-05:00 +2024-04-13 03:53:40,316: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:40 +2024-04-13 03:53:40,316: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:40,317: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:40,317: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:40,318: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:40,318: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:40,704: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:40,705: root: INFO: Current backtesting datetime 2020-12-08 16:00:00-05:00 +2024-04-13 03:53:40,705: root: INFO: Current backtesting datetime 2020-12-09 09:30:00-05:00 +2024-04-13 03:53:40,706: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:40 +2024-04-13 03:53:40,706: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:40,707: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:40,707: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:40,707: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:40,707: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:40,920: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:40,921: root: INFO: Current backtesting datetime 2020-12-09 16:00:00-05:00 +2024-04-13 03:53:40,921: root: INFO: Current backtesting datetime 2020-12-10 09:30:00-05:00 +2024-04-13 03:53:40,922: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:40 +2024-04-13 03:53:40,922: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:40,923: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:40,923: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:40,923: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:40,923: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:41,309: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:41,310: root: INFO: Current backtesting datetime 2020-12-10 16:00:00-05:00 +2024-04-13 03:53:41,310: root: INFO: Current backtesting datetime 2020-12-11 09:30:00-05:00 +2024-04-13 03:53:41,311: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:41 +2024-04-13 03:53:41,311: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:41,311: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:41,312: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:41,312: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:41,312: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:41,784: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:41,785: root: INFO: Current backtesting datetime 2020-12-11 16:00:00-05:00 +2024-04-13 03:53:41,785: root: INFO: Current backtesting datetime 2020-12-12 09:30:00-05:00 +2024-04-13 03:53:41,785: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:41,787: root: INFO: Current backtesting datetime 2020-12-12 09:29:00-05:00 +2024-04-13 03:53:41,788: root: INFO: Current backtesting datetime 2020-12-12 09:29:00-05:00 +2024-04-13 03:53:41,788: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:41,789: root: INFO: Current backtesting datetime 2020-12-14 08:30:00-05:00 +2024-04-13 03:53:41,790: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:41,790: root: INFO: Current backtesting datetime 2020-12-14 09:30:00-05:00 +2024-04-13 03:53:41,790: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:41,791: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:41 +2024-04-13 03:53:41,792: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:41,792: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:41,793: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:41,793: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:41,793: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:42,271: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:42,272: root: INFO: Current backtesting datetime 2020-12-14 16:00:00-05:00 +2024-04-13 03:53:42,272: root: INFO: Current backtesting datetime 2020-12-15 09:30:00-05:00 +2024-04-13 03:53:42,273: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:42 +2024-04-13 03:53:42,273: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:42,274: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:42,274: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:42,275: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:42,275: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:42,737: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:42,738: root: INFO: Current backtesting datetime 2020-12-15 16:00:00-05:00 +2024-04-13 03:53:42,738: root: INFO: Current backtesting datetime 2020-12-16 09:30:00-05:00 +2024-04-13 03:53:42,738: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:42 +2024-04-13 03:53:42,738: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:42,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:42,739: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:42,740: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:42,740: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:42,949: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:42,950: root: INFO: Current backtesting datetime 2020-12-16 16:00:00-05:00 +2024-04-13 03:53:42,950: root: INFO: Current backtesting datetime 2020-12-17 09:30:00-05:00 +2024-04-13 03:53:42,951: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:42 +2024-04-13 03:53:42,951: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:42,952: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:42,952: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:42,952: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:42,953: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:43,387: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:43,388: root: INFO: Current backtesting datetime 2020-12-17 16:00:00-05:00 +2024-04-13 03:53:43,388: root: INFO: Current backtesting datetime 2020-12-18 09:30:00-05:00 +2024-04-13 03:53:43,389: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:43 +2024-04-13 03:53:43,389: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:43,390: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:43,390: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:43,390: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:43,390: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:43,804: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:43,806: root: INFO: Current backtesting datetime 2020-12-18 16:00:00-05:00 +2024-04-13 03:53:43,806: root: INFO: Current backtesting datetime 2020-12-19 09:30:00-05:00 +2024-04-13 03:53:43,806: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:43,808: root: INFO: Current backtesting datetime 2020-12-19 09:29:00-05:00 +2024-04-13 03:53:43,809: root: INFO: Current backtesting datetime 2020-12-19 09:29:00-05:00 +2024-04-13 03:53:43,809: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:43,810: root: INFO: Current backtesting datetime 2020-12-21 08:30:00-05:00 +2024-04-13 03:53:43,811: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:43,811: root: INFO: Current backtesting datetime 2020-12-21 09:30:00-05:00 +2024-04-13 03:53:43,811: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:43,813: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:43 +2024-04-13 03:53:43,813: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:43,813: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:43,814: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:43,814: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:43,814: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:44,027: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:44,028: root: INFO: Current backtesting datetime 2020-12-21 16:00:00-05:00 +2024-04-13 03:53:44,028: root: INFO: Current backtesting datetime 2020-12-22 09:30:00-05:00 +2024-04-13 03:53:44,029: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:44 +2024-04-13 03:53:44,029: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:44,030: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:44,030: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:44,030: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:44,030: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:44,671: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:44,674: root: INFO: Current backtesting datetime 2020-12-22 16:00:00-05:00 +2024-04-13 03:53:44,674: root: INFO: Current backtesting datetime 2020-12-23 09:30:00-05:00 +2024-04-13 03:53:44,676: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:44 +2024-04-13 03:53:44,676: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:44,678: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:44,680: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:44,682: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:44,682: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:44,909: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:44,910: root: INFO: Current backtesting datetime 2020-12-23 16:00:00-05:00 +2024-04-13 03:53:44,910: root: INFO: Current backtesting datetime 2020-12-24 09:30:00-05:00 +2024-04-13 03:53:44,910: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:44 +2024-04-13 03:53:44,910: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:44,911: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:44,911: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:44,912: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:44,912: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:45,309: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:45,310: root: INFO: Current backtesting datetime 2020-12-24 13:00:00-05:00 +2024-04-13 03:53:45,311: root: INFO: Current backtesting datetime 2020-12-25 09:30:00-05:00 +2024-04-13 03:53:45,311: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:45,313: root: INFO: Current backtesting datetime 2020-12-25 09:29:00-05:00 +2024-04-13 03:53:45,314: root: INFO: Current backtesting datetime 2020-12-25 09:29:00-05:00 +2024-04-13 03:53:45,314: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:45,315: root: INFO: Current backtesting datetime 2020-12-28 08:30:00-05:00 +2024-04-13 03:53:45,315: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:45,316: root: INFO: Current backtesting datetime 2020-12-28 09:30:00-05:00 +2024-04-13 03:53:45,316: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:45,317: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:45 +2024-04-13 03:53:45,317: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:45,318: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:45,318: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:45,319: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:45,319: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:45,768: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:45,769: root: INFO: Current backtesting datetime 2020-12-28 16:00:00-05:00 +2024-04-13 03:53:45,769: root: INFO: Current backtesting datetime 2020-12-29 09:30:00-05:00 +2024-04-13 03:53:45,769: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:45 +2024-04-13 03:53:45,770: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:45,770: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:45,771: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:45,771: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:45,771: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:46,192: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:46,193: root: INFO: Current backtesting datetime 2020-12-29 16:00:00-05:00 +2024-04-13 03:53:46,193: root: INFO: Current backtesting datetime 2020-12-30 09:30:00-05:00 +2024-04-13 03:53:46,194: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:46 +2024-04-13 03:53:46,194: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:46,195: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:46,195: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:46,195: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:46,195: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:48,845: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:48,846: root: INFO: Current backtesting datetime 2020-12-30 16:00:00-05:00 +2024-04-13 03:53:48,846: root: INFO: Current backtesting datetime 2020-12-31 09:30:00-05:00 +2024-04-13 03:53:48,847: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:48 +2024-04-13 03:53:48,847: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:48,848: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:48,848: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:48,848: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:48,848: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:52,549: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:52,550: root: INFO: Current backtesting datetime 2020-12-31 16:00:00-05:00 +2024-04-13 03:53:52,550: root: INFO: Current backtesting datetime 2021-01-01 09:30:00-05:00 +2024-04-13 03:53:52,551: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:53:52,552: root: INFO: Current backtesting datetime 2021-01-01 09:29:00-05:00 +2024-04-13 03:53:52,553: root: INFO: Current backtesting datetime 2021-01-01 09:29:00-05:00 +2024-04-13 03:53:52,553: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:53:52,554: root: INFO: Current backtesting datetime 2021-01-04 08:30:00-05:00 +2024-04-13 03:53:52,555: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:53:52,556: root: INFO: Current backtesting datetime 2021-01-04 09:30:00-05:00 +2024-04-13 03:53:52,556: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:53:52,557: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:52 +2024-04-13 03:53:52,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:52,558: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:52,558: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:52,559: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:52,559: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:54,832: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:54,833: root: INFO: Current backtesting datetime 2021-01-04 16:00:00-05:00 +2024-04-13 03:53:54,834: root: INFO: Current backtesting datetime 2021-01-05 09:30:00-05:00 +2024-04-13 03:53:54,834: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:54 +2024-04-13 03:53:54,834: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:54,835: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:54,835: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:54,836: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:54,836: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:56,461: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:56,462: root: INFO: Current backtesting datetime 2021-01-05 16:00:00-05:00 +2024-04-13 03:53:56,463: root: INFO: Current backtesting datetime 2021-01-06 09:30:00-05:00 +2024-04-13 03:53:56,463: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:56 +2024-04-13 03:53:56,463: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:56,464: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:56,464: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:56,465: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:56,465: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:57,406: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:57,408: root: INFO: Current backtesting datetime 2021-01-06 16:00:00-05:00 +2024-04-13 03:53:57,408: root: INFO: Current backtesting datetime 2021-01-07 09:30:00-05:00 +2024-04-13 03:53:57,409: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:57 +2024-04-13 03:53:57,409: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:57,411: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:57,412: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:57,412: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:57,412: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:53:59,006: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:53:59,007: root: INFO: Current backtesting datetime 2021-01-07 16:00:00-05:00 +2024-04-13 03:53:59,007: root: INFO: Current backtesting datetime 2021-01-08 09:30:00-05:00 +2024-04-13 03:53:59,007: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:53:59 +2024-04-13 03:53:59,008: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:59,008: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:53:59,009: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:53:59,009: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:53:59,009: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:02,047: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:02,048: root: INFO: Current backtesting datetime 2021-01-08 16:00:00-05:00 +2024-04-13 03:54:02,049: root: INFO: Current backtesting datetime 2021-01-09 09:30:00-05:00 +2024-04-13 03:54:02,049: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:54:02,051: root: INFO: Current backtesting datetime 2021-01-09 09:29:00-05:00 +2024-04-13 03:54:02,052: root: INFO: Current backtesting datetime 2021-01-09 09:29:00-05:00 +2024-04-13 03:54:02,052: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:54:02,053: root: INFO: Current backtesting datetime 2021-01-11 08:30:00-05:00 +2024-04-13 03:54:02,054: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:54:02,055: root: INFO: Current backtesting datetime 2021-01-11 09:30:00-05:00 +2024-04-13 03:54:02,055: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:54:02,056: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:02 +2024-04-13 03:54:02,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:02,057: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:02,057: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:02,057: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:02,057: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:04,856: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:04,856: root: INFO: Current backtesting datetime 2021-01-11 16:00:00-05:00 +2024-04-13 03:54:04,857: root: INFO: Current backtesting datetime 2021-01-12 09:30:00-05:00 +2024-04-13 03:54:04,857: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:04 +2024-04-13 03:54:04,857: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:04,858: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:04,858: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:04,859: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:04,859: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:08,946: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:08,947: root: INFO: Current backtesting datetime 2021-01-12 16:00:00-05:00 +2024-04-13 03:54:08,947: root: INFO: Current backtesting datetime 2021-01-13 09:30:00-05:00 +2024-04-13 03:54:08,947: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:08 +2024-04-13 03:54:08,948: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:08,948: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:08,949: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:08,949: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:08,949: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:14,700: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:14,701: root: INFO: Current backtesting datetime 2021-01-13 16:00:00-05:00 +2024-04-13 03:54:14,702: root: INFO: Current backtesting datetime 2021-01-14 09:30:00-05:00 +2024-04-13 03:54:14,702: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:14 +2024-04-13 03:54:14,702: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:14,703: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:14,703: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:14,704: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:14,704: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:18,759: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:18,760: root: INFO: Current backtesting datetime 2021-01-14 16:00:00-05:00 +2024-04-13 03:54:18,761: root: INFO: Current backtesting datetime 2021-01-15 09:30:00-05:00 +2024-04-13 03:54:18,761: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:18 +2024-04-13 03:54:18,761: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:18,762: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:18,762: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:18,763: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:18,763: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:24,960: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:24,961: root: INFO: Current backtesting datetime 2021-01-15 16:00:00-05:00 +2024-04-13 03:54:24,961: root: INFO: Current backtesting datetime 2021-01-16 09:30:00-05:00 +2024-04-13 03:54:24,962: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:54:24,963: root: INFO: Current backtesting datetime 2021-01-16 09:29:00-05:00 +2024-04-13 03:54:24,964: root: INFO: Current backtesting datetime 2021-01-16 09:29:00-05:00 +2024-04-13 03:54:24,964: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:54:24,965: root: INFO: Current backtesting datetime 2021-01-19 08:30:00-05:00 +2024-04-13 03:54:24,965: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:54:24,966: root: INFO: Current backtesting datetime 2021-01-19 09:30:00-05:00 +2024-04-13 03:54:24,966: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:54:24,967: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:24 +2024-04-13 03:54:24,967: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:24,968: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:24,969: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:24,969: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:24,969: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:28,802: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:28,803: root: INFO: Current backtesting datetime 2021-01-19 16:00:00-05:00 +2024-04-13 03:54:28,803: root: INFO: Current backtesting datetime 2021-01-20 09:30:00-05:00 +2024-04-13 03:54:28,803: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:28 +2024-04-13 03:54:28,804: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:28,804: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:28,805: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:28,805: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:28,805: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:37,739: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:37,740: root: INFO: Current backtesting datetime 2021-01-20 16:00:00-05:00 +2024-04-13 03:54:37,740: root: INFO: Current backtesting datetime 2021-01-21 09:30:00-05:00 +2024-04-13 03:54:37,741: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:37 +2024-04-13 03:54:37,741: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:37,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:37,742: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:37,743: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:37,743: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:41,579: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:41,580: root: INFO: Current backtesting datetime 2021-01-21 16:00:00-05:00 +2024-04-13 03:54:41,580: root: INFO: Current backtesting datetime 2021-01-22 09:30:00-05:00 +2024-04-13 03:54:41,580: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:41 +2024-04-13 03:54:41,580: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:41,582: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:41,582: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:41,582: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:41,582: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:48,207: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:48,208: root: INFO: Current backtesting datetime 2021-01-22 16:00:00-05:00 +2024-04-13 03:54:48,208: root: INFO: Current backtesting datetime 2021-01-23 09:30:00-05:00 +2024-04-13 03:54:48,209: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:54:48,210: root: INFO: Current backtesting datetime 2021-01-23 09:29:00-05:00 +2024-04-13 03:54:48,211: root: INFO: Current backtesting datetime 2021-01-23 09:29:00-05:00 +2024-04-13 03:54:48,212: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:54:48,212: root: INFO: Current backtesting datetime 2021-01-25 08:30:00-05:00 +2024-04-13 03:54:48,213: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:54:48,214: root: INFO: Current backtesting datetime 2021-01-25 09:30:00-05:00 +2024-04-13 03:54:48,214: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:54:48,215: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:48 +2024-04-13 03:54:48,215: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:48,216: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:48,216: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:48,216: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:48,216: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:56,714: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:56,715: root: INFO: Current backtesting datetime 2021-01-25 16:00:00-05:00 +2024-04-13 03:54:56,715: root: INFO: Current backtesting datetime 2021-01-26 09:30:00-05:00 +2024-04-13 03:54:56,716: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:56 +2024-04-13 03:54:56,716: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:56,717: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:56,717: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:56,717: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:56,718: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:54:58,277: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:54:58,278: root: INFO: Current backtesting datetime 2021-01-26 16:00:00-05:00 +2024-04-13 03:54:58,279: root: INFO: Current backtesting datetime 2021-01-27 09:30:00-05:00 +2024-04-13 03:54:58,279: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:54:58 +2024-04-13 03:54:58,279: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:58,280: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:54:58,280: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:54:58,281: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:54:58,281: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:00,165: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:00,165: root: INFO: Current backtesting datetime 2021-01-27 16:00:00-05:00 +2024-04-13 03:55:00,166: root: INFO: Current backtesting datetime 2021-01-28 09:30:00-05:00 +2024-04-13 03:55:00,166: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:00 +2024-04-13 03:55:00,166: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:00,167: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:00,167: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:00,168: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:00,168: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:01,353: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:01,354: root: INFO: Current backtesting datetime 2021-01-28 16:00:00-05:00 +2024-04-13 03:55:01,354: root: INFO: Current backtesting datetime 2021-01-29 09:30:00-05:00 +2024-04-13 03:55:01,355: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:01 +2024-04-13 03:55:01,355: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:01,355: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:01,356: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:01,356: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:01,356: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:03,414: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:03,415: root: INFO: Current backtesting datetime 2021-01-29 16:00:00-05:00 +2024-04-13 03:55:03,415: root: INFO: Current backtesting datetime 2021-01-30 09:30:00-05:00 +2024-04-13 03:55:03,415: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:03,416: root: INFO: Current backtesting datetime 2021-01-30 09:29:00-05:00 +2024-04-13 03:55:03,418: root: INFO: Current backtesting datetime 2021-01-30 09:29:00-05:00 +2024-04-13 03:55:03,418: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:03,419: root: INFO: Current backtesting datetime 2021-02-01 08:30:00-05:00 +2024-04-13 03:55:03,419: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:03,420: root: INFO: Current backtesting datetime 2021-02-01 09:30:00-05:00 +2024-04-13 03:55:03,420: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:03,421: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:03 +2024-04-13 03:55:03,421: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:03,422: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:03,422: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:03,423: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:03,423: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:04,965: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:04,966: root: INFO: Current backtesting datetime 2021-02-01 16:00:00-05:00 +2024-04-13 03:55:04,967: root: INFO: Current backtesting datetime 2021-02-02 09:30:00-05:00 +2024-04-13 03:55:04,967: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:04 +2024-04-13 03:55:04,967: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:04,968: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:04,968: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:04,969: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:04,969: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:06,296: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:06,297: root: INFO: Current backtesting datetime 2021-02-02 16:00:00-05:00 +2024-04-13 03:55:06,297: root: INFO: Current backtesting datetime 2021-02-03 09:30:00-05:00 +2024-04-13 03:55:06,298: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:06 +2024-04-13 03:55:06,298: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:06,299: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:06,299: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:06,300: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:06,300: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:08,007: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:08,008: root: INFO: Current backtesting datetime 2021-02-03 16:00:00-05:00 +2024-04-13 03:55:08,008: root: INFO: Current backtesting datetime 2021-02-04 09:30:00-05:00 +2024-04-13 03:55:08,009: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:08 +2024-04-13 03:55:08,009: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:08,010: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:08,010: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:08,010: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:08,010: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:10,625: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:10,626: root: INFO: Current backtesting datetime 2021-02-04 16:00:00-05:00 +2024-04-13 03:55:10,627: root: INFO: Current backtesting datetime 2021-02-05 09:30:00-05:00 +2024-04-13 03:55:10,627: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:10 +2024-04-13 03:55:10,627: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:10,628: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:10,629: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:10,629: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:10,629: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:11,466: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:11,467: root: INFO: Current backtesting datetime 2021-02-05 16:00:00-05:00 +2024-04-13 03:55:11,467: root: INFO: Current backtesting datetime 2021-02-06 09:30:00-05:00 +2024-04-13 03:55:11,468: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:11,469: root: INFO: Current backtesting datetime 2021-02-06 09:29:00-05:00 +2024-04-13 03:55:11,470: root: INFO: Current backtesting datetime 2021-02-06 09:29:00-05:00 +2024-04-13 03:55:11,470: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:11,471: root: INFO: Current backtesting datetime 2021-02-08 08:30:00-05:00 +2024-04-13 03:55:11,472: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:11,473: root: INFO: Current backtesting datetime 2021-02-08 09:30:00-05:00 +2024-04-13 03:55:11,473: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:11,474: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:11 +2024-04-13 03:55:11,474: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:11,475: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:11,475: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:11,475: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:11,475: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:11,937: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:11,938: root: INFO: Current backtesting datetime 2021-02-08 16:00:00-05:00 +2024-04-13 03:55:11,938: root: INFO: Current backtesting datetime 2021-02-09 09:30:00-05:00 +2024-04-13 03:55:11,938: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:11 +2024-04-13 03:55:11,939: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:11,939: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:11,940: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:11,940: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:11,941: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:12,378: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:12,378: root: INFO: Current backtesting datetime 2021-02-09 16:00:00-05:00 +2024-04-13 03:55:12,378: root: INFO: Current backtesting datetime 2021-02-10 09:30:00-05:00 +2024-04-13 03:55:12,379: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:12 +2024-04-13 03:55:12,379: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:12,379: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:12,380: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:12,380: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:12,380: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:12,868: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:12,869: root: INFO: Current backtesting datetime 2021-02-10 16:00:00-05:00 +2024-04-13 03:55:12,869: root: INFO: Current backtesting datetime 2021-02-11 09:30:00-05:00 +2024-04-13 03:55:12,870: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:12 +2024-04-13 03:55:12,870: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:12,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:12,872: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:12,873: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:12,873: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:13,405: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:13,406: root: INFO: Current backtesting datetime 2021-02-11 16:00:00-05:00 +2024-04-13 03:55:13,406: root: INFO: Current backtesting datetime 2021-02-12 09:30:00-05:00 +2024-04-13 03:55:13,407: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:13 +2024-04-13 03:55:13,407: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:13,408: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:13,408: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:13,409: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:13,409: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:13,903: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:13,904: root: INFO: Current backtesting datetime 2021-02-12 16:00:00-05:00 +2024-04-13 03:55:13,904: root: INFO: Current backtesting datetime 2021-02-13 09:30:00-05:00 +2024-04-13 03:55:13,905: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:13,906: root: INFO: Current backtesting datetime 2021-02-13 09:29:00-05:00 +2024-04-13 03:55:13,907: root: INFO: Current backtesting datetime 2021-02-13 09:29:00-05:00 +2024-04-13 03:55:13,908: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:13,909: root: INFO: Current backtesting datetime 2021-02-16 08:30:00-05:00 +2024-04-13 03:55:13,909: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:13,910: root: INFO: Current backtesting datetime 2021-02-16 09:30:00-05:00 +2024-04-13 03:55:13,910: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:13,912: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:13 +2024-04-13 03:55:13,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:13,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:13,913: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:13,913: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:13,913: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:14,352: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:14,353: root: INFO: Current backtesting datetime 2021-02-16 16:00:00-05:00 +2024-04-13 03:55:14,353: root: INFO: Current backtesting datetime 2021-02-17 09:30:00-05:00 +2024-04-13 03:55:14,354: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:14 +2024-04-13 03:55:14,354: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:14,355: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:14,355: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:14,355: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:14,355: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:14,849: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:14,850: root: INFO: Current backtesting datetime 2021-02-17 16:00:00-05:00 +2024-04-13 03:55:14,850: root: INFO: Current backtesting datetime 2021-02-18 09:30:00-05:00 +2024-04-13 03:55:14,851: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:14 +2024-04-13 03:55:14,851: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:14,852: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:14,852: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:14,852: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:14,852: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:15,303: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:15,304: root: INFO: Current backtesting datetime 2021-02-18 16:00:00-05:00 +2024-04-13 03:55:15,304: root: INFO: Current backtesting datetime 2021-02-19 09:30:00-05:00 +2024-04-13 03:55:15,305: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:15 +2024-04-13 03:55:15,305: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:15,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:15,306: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:15,306: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:15,306: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:15,771: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:15,773: root: INFO: Current backtesting datetime 2021-02-19 16:00:00-05:00 +2024-04-13 03:55:15,773: root: INFO: Current backtesting datetime 2021-02-20 09:30:00-05:00 +2024-04-13 03:55:15,773: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:15,775: root: INFO: Current backtesting datetime 2021-02-20 09:29:00-05:00 +2024-04-13 03:55:15,776: root: INFO: Current backtesting datetime 2021-02-20 09:29:00-05:00 +2024-04-13 03:55:15,776: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:15,777: root: INFO: Current backtesting datetime 2021-02-22 08:30:00-05:00 +2024-04-13 03:55:15,777: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:15,778: root: INFO: Current backtesting datetime 2021-02-22 09:30:00-05:00 +2024-04-13 03:55:15,778: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:15,779: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:15 +2024-04-13 03:55:15,779: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:15,780: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:15,780: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:15,781: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:15,781: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:16,045: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:16,046: root: INFO: Current backtesting datetime 2021-02-22 16:00:00-05:00 +2024-04-13 03:55:16,046: root: INFO: Current backtesting datetime 2021-02-23 09:30:00-05:00 +2024-04-13 03:55:16,046: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:16 +2024-04-13 03:55:16,046: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:16,047: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:16,047: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:16,048: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:16,048: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:16,751: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:16,752: root: INFO: Current backtesting datetime 2021-02-23 16:00:00-05:00 +2024-04-13 03:55:16,752: root: INFO: Current backtesting datetime 2021-02-24 09:30:00-05:00 +2024-04-13 03:55:16,753: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:16 +2024-04-13 03:55:16,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:16,754: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:16,754: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:16,754: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:16,754: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:17,101: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:17,102: root: INFO: Current backtesting datetime 2021-02-24 16:00:00-05:00 +2024-04-13 03:55:17,102: root: INFO: Current backtesting datetime 2021-02-25 09:30:00-05:00 +2024-04-13 03:55:17,103: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:17 +2024-04-13 03:55:17,103: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:17,104: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:17,104: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:17,104: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:17,104: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:17,740: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:17,741: root: INFO: Current backtesting datetime 2021-02-25 16:00:00-05:00 +2024-04-13 03:55:17,741: root: INFO: Current backtesting datetime 2021-02-26 09:30:00-05:00 +2024-04-13 03:55:17,742: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:17 +2024-04-13 03:55:17,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:17,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:17,743: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:17,744: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:17,744: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:18,016: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:18,017: root: INFO: Current backtesting datetime 2021-02-26 16:00:00-05:00 +2024-04-13 03:55:18,017: root: INFO: Current backtesting datetime 2021-02-27 09:30:00-05:00 +2024-04-13 03:55:18,018: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:18,019: root: INFO: Current backtesting datetime 2021-02-27 09:29:00-05:00 +2024-04-13 03:55:18,021: root: INFO: Current backtesting datetime 2021-02-27 09:29:00-05:00 +2024-04-13 03:55:18,021: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:18,022: root: INFO: Current backtesting datetime 2021-03-01 08:30:00-05:00 +2024-04-13 03:55:18,023: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:18,024: root: INFO: Current backtesting datetime 2021-03-01 09:30:00-05:00 +2024-04-13 03:55:18,024: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:18,026: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:18 +2024-04-13 03:55:18,026: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:18,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:18,027: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:18,028: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:18,028: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:18,696: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:18,697: root: INFO: Current backtesting datetime 2021-03-01 16:00:00-05:00 +2024-04-13 03:55:18,697: root: INFO: Current backtesting datetime 2021-03-02 09:30:00-05:00 +2024-04-13 03:55:18,698: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:18 +2024-04-13 03:55:18,698: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:18,699: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:18,699: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:18,699: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:18,700: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:18,941: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:18,942: root: INFO: Current backtesting datetime 2021-03-02 16:00:00-05:00 +2024-04-13 03:55:18,942: root: INFO: Current backtesting datetime 2021-03-03 09:30:00-05:00 +2024-04-13 03:55:18,943: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:18 +2024-04-13 03:55:18,943: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:18,944: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:18,944: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:18,944: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:18,944: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:19,414: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:19,415: root: INFO: Current backtesting datetime 2021-03-03 16:00:00-05:00 +2024-04-13 03:55:19,415: root: INFO: Current backtesting datetime 2021-03-04 09:30:00-05:00 +2024-04-13 03:55:19,416: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:19 +2024-04-13 03:55:19,416: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:19,417: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:19,417: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:19,417: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:19,418: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:19,855: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:19,856: root: INFO: Current backtesting datetime 2021-03-04 16:00:00-05:00 +2024-04-13 03:55:19,856: root: INFO: Current backtesting datetime 2021-03-05 09:30:00-05:00 +2024-04-13 03:55:19,857: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:19 +2024-04-13 03:55:19,857: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:19,858: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:19,858: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:19,859: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:19,859: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:20,265: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:20,266: root: INFO: Current backtesting datetime 2021-03-05 16:00:00-05:00 +2024-04-13 03:55:20,266: root: INFO: Current backtesting datetime 2021-03-06 09:30:00-05:00 +2024-04-13 03:55:20,266: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:20,268: root: INFO: Current backtesting datetime 2021-03-06 09:29:00-05:00 +2024-04-13 03:55:20,269: root: INFO: Current backtesting datetime 2021-03-06 09:29:00-05:00 +2024-04-13 03:55:20,269: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:20,270: root: INFO: Current backtesting datetime 2021-03-08 08:30:00-05:00 +2024-04-13 03:55:20,270: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:20,271: root: INFO: Current backtesting datetime 2021-03-08 09:30:00-05:00 +2024-04-13 03:55:20,272: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:20,273: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:20 +2024-04-13 03:55:20,273: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:20,274: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:20,274: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:20,274: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:20,274: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:20,723: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:20,724: root: INFO: Current backtesting datetime 2021-03-08 16:00:00-05:00 +2024-04-13 03:55:20,724: root: INFO: Current backtesting datetime 2021-03-09 09:30:00-05:00 +2024-04-13 03:55:20,725: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:20 +2024-04-13 03:55:20,725: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:20,725: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:20,726: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:20,726: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:20,726: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:20,966: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:20,966: root: INFO: Current backtesting datetime 2021-03-09 16:00:00-05:00 +2024-04-13 03:55:20,967: root: INFO: Current backtesting datetime 2021-03-10 09:30:00-05:00 +2024-04-13 03:55:20,967: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:20 +2024-04-13 03:55:20,967: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:20,968: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:20,968: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:20,969: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:20,969: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:21,430: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:21,431: root: INFO: Current backtesting datetime 2021-03-10 16:00:00-05:00 +2024-04-13 03:55:21,432: root: INFO: Current backtesting datetime 2021-03-11 09:30:00-05:00 +2024-04-13 03:55:21,432: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:21 +2024-04-13 03:55:21,432: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:21,433: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:21,433: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:21,434: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:21,434: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:21,893: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:21,894: root: INFO: Current backtesting datetime 2021-03-11 16:00:00-05:00 +2024-04-13 03:55:21,894: root: INFO: Current backtesting datetime 2021-03-12 09:30:00-05:00 +2024-04-13 03:55:21,894: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:21 +2024-04-13 03:55:21,895: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:21,895: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:21,896: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:21,896: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:21,896: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:22,474: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:22,475: root: INFO: Current backtesting datetime 2021-03-12 16:00:00-05:00 +2024-04-13 03:55:22,475: root: INFO: Current backtesting datetime 2021-03-13 09:30:00-05:00 +2024-04-13 03:55:22,475: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:22,477: root: INFO: Current backtesting datetime 2021-03-13 09:29:00-05:00 +2024-04-13 03:55:22,478: root: INFO: Current backtesting datetime 2021-03-13 09:29:00-05:00 +2024-04-13 03:55:22,478: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:22,479: root: INFO: Current backtesting datetime 2021-03-15 07:30:00-05:00 +2024-04-13 03:55:22,479: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:22,480: root: INFO: Current backtesting datetime 2021-03-15 08:30:00-05:00 +2024-04-13 03:55:22,480: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:22,481: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:22 +2024-04-13 03:55:22,481: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:22,482: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:22,482: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:22,483: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:22,483: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:22,938: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:22,939: root: INFO: Current backtesting datetime 2021-03-15 15:00:00-05:00 +2024-04-13 03:55:22,939: root: INFO: Current backtesting datetime 2021-03-16 08:30:00-05:00 +2024-04-13 03:55:22,940: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:22 +2024-04-13 03:55:22,940: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:22,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:22,941: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:22,941: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:22,941: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:23,370: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:23,371: root: INFO: Current backtesting datetime 2021-03-16 15:00:00-05:00 +2024-04-13 03:55:23,372: root: INFO: Current backtesting datetime 2021-03-17 08:30:00-05:00 +2024-04-13 03:55:23,372: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:23 +2024-04-13 03:55:23,372: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:23,373: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:23,373: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:23,374: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:23,374: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:23,824: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:23,825: root: INFO: Current backtesting datetime 2021-03-17 15:00:00-05:00 +2024-04-13 03:55:23,826: root: INFO: Current backtesting datetime 2021-03-18 08:30:00-05:00 +2024-04-13 03:55:23,826: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:23 +2024-04-13 03:55:23,826: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:23,827: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:23,827: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:23,828: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:23,828: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:24,075: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:24,076: root: INFO: Current backtesting datetime 2021-03-18 15:00:00-05:00 +2024-04-13 03:55:24,076: root: INFO: Current backtesting datetime 2021-03-19 08:30:00-05:00 +2024-04-13 03:55:24,076: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:24 +2024-04-13 03:55:24,076: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:24,077: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:24,077: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:24,078: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:24,078: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:24,792: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:24,793: root: INFO: Current backtesting datetime 2021-03-19 15:00:00-05:00 +2024-04-13 03:55:24,794: root: INFO: Current backtesting datetime 2021-03-20 08:30:00-05:00 +2024-04-13 03:55:24,794: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:24,796: root: INFO: Current backtesting datetime 2021-03-20 08:29:00-05:00 +2024-04-13 03:55:24,797: root: INFO: Current backtesting datetime 2021-03-20 08:29:00-05:00 +2024-04-13 03:55:24,797: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:24,798: root: INFO: Current backtesting datetime 2021-03-22 07:30:00-05:00 +2024-04-13 03:55:24,798: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:24,799: root: INFO: Current backtesting datetime 2021-03-22 08:30:00-05:00 +2024-04-13 03:55:24,799: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:24,800: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:24 +2024-04-13 03:55:24,800: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:24,801: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:24,801: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:24,802: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:24,802: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:25,045: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:25,046: root: INFO: Current backtesting datetime 2021-03-22 15:00:00-05:00 +2024-04-13 03:55:25,046: root: INFO: Current backtesting datetime 2021-03-23 08:30:00-05:00 +2024-04-13 03:55:25,047: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:25 +2024-04-13 03:55:25,047: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:25,048: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:25,048: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:25,048: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:25,048: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:25,683: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:25,684: root: INFO: Current backtesting datetime 2021-03-23 15:00:00-05:00 +2024-04-13 03:55:25,684: root: INFO: Current backtesting datetime 2021-03-24 08:30:00-05:00 +2024-04-13 03:55:25,685: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:25 +2024-04-13 03:55:25,685: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:25,686: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:25,686: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:25,687: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:25,687: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:25,922: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:25,923: root: INFO: Current backtesting datetime 2021-03-24 15:00:00-05:00 +2024-04-13 03:55:25,923: root: INFO: Current backtesting datetime 2021-03-25 08:30:00-05:00 +2024-04-13 03:55:25,923: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:25 +2024-04-13 03:55:25,924: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:25,924: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:25,925: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:25,925: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:25,925: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:26,345: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:26,346: root: INFO: Current backtesting datetime 2021-03-25 15:00:00-05:00 +2024-04-13 03:55:26,346: root: INFO: Current backtesting datetime 2021-03-26 08:30:00-05:00 +2024-04-13 03:55:26,347: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:26 +2024-04-13 03:55:26,347: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:26,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:26,348: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:26,349: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:26,349: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:26,811: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:26,812: root: INFO: Current backtesting datetime 2021-03-26 15:00:00-05:00 +2024-04-13 03:55:26,812: root: INFO: Current backtesting datetime 2021-03-27 08:30:00-05:00 +2024-04-13 03:55:26,813: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:26,814: root: INFO: Current backtesting datetime 2021-03-27 08:29:00-05:00 +2024-04-13 03:55:26,815: root: INFO: Current backtesting datetime 2021-03-27 08:29:00-05:00 +2024-04-13 03:55:26,815: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:26,816: root: INFO: Current backtesting datetime 2021-03-29 07:30:00-05:00 +2024-04-13 03:55:26,816: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:26,817: root: INFO: Current backtesting datetime 2021-03-29 08:30:00-05:00 +2024-04-13 03:55:26,817: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:26,818: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:26 +2024-04-13 03:55:26,818: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:26,819: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:26,819: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:26,820: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:26,820: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:27,075: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:27,076: root: INFO: Current backtesting datetime 2021-03-29 15:00:00-05:00 +2024-04-13 03:55:27,077: root: INFO: Current backtesting datetime 2021-03-30 08:30:00-05:00 +2024-04-13 03:55:27,077: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:27 +2024-04-13 03:55:27,077: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:27,078: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:27,078: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:27,079: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:27,079: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:27,793: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:27,795: root: INFO: Current backtesting datetime 2021-03-30 15:00:00-05:00 +2024-04-13 03:55:27,795: root: INFO: Current backtesting datetime 2021-03-31 08:30:00-05:00 +2024-04-13 03:55:27,796: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:27 +2024-04-13 03:55:27,796: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:27,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:27,797: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:27,798: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:27,798: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:28,039: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:28,040: root: INFO: Current backtesting datetime 2021-03-31 15:00:00-05:00 +2024-04-13 03:55:28,040: root: INFO: Current backtesting datetime 2021-04-01 08:30:00-05:00 +2024-04-13 03:55:28,041: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:28 +2024-04-13 03:55:28,041: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:28,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:28,042: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:28,042: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:28,042: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:28,731: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:28,732: root: INFO: Current backtesting datetime 2021-04-01 15:00:00-05:00 +2024-04-13 03:55:28,732: root: INFO: Current backtesting datetime 2021-04-02 08:30:00-05:00 +2024-04-13 03:55:28,733: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:28,734: root: INFO: Current backtesting datetime 2021-04-02 08:29:00-05:00 +2024-04-13 03:55:28,735: root: INFO: Current backtesting datetime 2021-04-02 08:29:00-05:00 +2024-04-13 03:55:28,735: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:28,736: root: INFO: Current backtesting datetime 2021-04-05 07:30:00-05:00 +2024-04-13 03:55:28,736: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:28,737: root: INFO: Current backtesting datetime 2021-04-05 08:30:00-05:00 +2024-04-13 03:55:28,737: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:28,738: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:28 +2024-04-13 03:55:28,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:28,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:28,740: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:28,740: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:28,740: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:28,989: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:28,989: root: INFO: Current backtesting datetime 2021-04-05 15:00:00-05:00 +2024-04-13 03:55:28,990: root: INFO: Current backtesting datetime 2021-04-06 08:30:00-05:00 +2024-04-13 03:55:28,990: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:28 +2024-04-13 03:55:28,990: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:28,991: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:28,992: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:28,992: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:28,992: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:29,671: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:29,672: root: INFO: Current backtesting datetime 2021-04-06 15:00:00-05:00 +2024-04-13 03:55:29,672: root: INFO: Current backtesting datetime 2021-04-07 08:30:00-05:00 +2024-04-13 03:55:29,673: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:29 +2024-04-13 03:55:29,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:29,674: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:29,674: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:29,674: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:29,675: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:29,910: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:29,911: root: INFO: Current backtesting datetime 2021-04-07 15:00:00-05:00 +2024-04-13 03:55:29,911: root: INFO: Current backtesting datetime 2021-04-08 08:30:00-05:00 +2024-04-13 03:55:29,911: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:29 +2024-04-13 03:55:29,911: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:29,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:29,912: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:29,913: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:29,913: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:30,326: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:30,327: root: INFO: Current backtesting datetime 2021-04-08 15:00:00-05:00 +2024-04-13 03:55:30,327: root: INFO: Current backtesting datetime 2021-04-09 08:30:00-05:00 +2024-04-13 03:55:30,328: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:30 +2024-04-13 03:55:30,328: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:30,329: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:30,329: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:30,329: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:30,330: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:30,795: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:30,796: root: INFO: Current backtesting datetime 2021-04-09 15:00:00-05:00 +2024-04-13 03:55:30,796: root: INFO: Current backtesting datetime 2021-04-10 08:30:00-05:00 +2024-04-13 03:55:30,796: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:30,798: root: INFO: Current backtesting datetime 2021-04-10 08:29:00-05:00 +2024-04-13 03:55:30,799: root: INFO: Current backtesting datetime 2021-04-10 08:29:00-05:00 +2024-04-13 03:55:30,799: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:30,800: root: INFO: Current backtesting datetime 2021-04-12 07:30:00-05:00 +2024-04-13 03:55:30,800: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:30,801: root: INFO: Current backtesting datetime 2021-04-12 08:30:00-05:00 +2024-04-13 03:55:30,801: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:30,802: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:30 +2024-04-13 03:55:30,802: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:30,803: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:30,803: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:30,804: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:30,804: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:31,032: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:31,033: root: INFO: Current backtesting datetime 2021-04-12 15:00:00-05:00 +2024-04-13 03:55:31,033: root: INFO: Current backtesting datetime 2021-04-13 08:30:00-05:00 +2024-04-13 03:55:31,033: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:31 +2024-04-13 03:55:31,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:31,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:31,035: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:31,035: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:31,035: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:31,708: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:31,709: root: INFO: Current backtesting datetime 2021-04-13 15:00:00-05:00 +2024-04-13 03:55:31,710: root: INFO: Current backtesting datetime 2021-04-14 08:30:00-05:00 +2024-04-13 03:55:31,710: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:31 +2024-04-13 03:55:31,710: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:31,711: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:31,711: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:31,712: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:31,712: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:31,939: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:31,940: root: INFO: Current backtesting datetime 2021-04-14 15:00:00-05:00 +2024-04-13 03:55:31,940: root: INFO: Current backtesting datetime 2021-04-15 08:30:00-05:00 +2024-04-13 03:55:31,940: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:31 +2024-04-13 03:55:31,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:31,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:31,942: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:31,942: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:31,942: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:32,348: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:32,349: root: INFO: Current backtesting datetime 2021-04-15 15:00:00-05:00 +2024-04-13 03:55:32,349: root: INFO: Current backtesting datetime 2021-04-16 08:30:00-05:00 +2024-04-13 03:55:32,349: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:32 +2024-04-13 03:55:32,350: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:32,350: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:32,351: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:32,351: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:32,351: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:32,894: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:32,895: root: INFO: Current backtesting datetime 2021-04-16 15:00:00-05:00 +2024-04-13 03:55:32,895: root: INFO: Current backtesting datetime 2021-04-17 08:30:00-05:00 +2024-04-13 03:55:32,896: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:32,897: root: INFO: Current backtesting datetime 2021-04-17 08:29:00-05:00 +2024-04-13 03:55:32,898: root: INFO: Current backtesting datetime 2021-04-17 08:29:00-05:00 +2024-04-13 03:55:32,898: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:32,898: root: INFO: Current backtesting datetime 2021-04-19 07:30:00-05:00 +2024-04-13 03:55:32,900: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:32,901: root: INFO: Current backtesting datetime 2021-04-19 08:30:00-05:00 +2024-04-13 03:55:32,901: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:32,902: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:32 +2024-04-13 03:55:32,902: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:32,903: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:32,903: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:32,903: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:32,904: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:33,355: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:33,356: root: INFO: Current backtesting datetime 2021-04-19 15:00:00-05:00 +2024-04-13 03:55:33,356: root: INFO: Current backtesting datetime 2021-04-20 08:30:00-05:00 +2024-04-13 03:55:33,356: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:33 +2024-04-13 03:55:33,357: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:33,357: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:33,358: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:33,358: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:33,358: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:33,786: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:33,787: root: INFO: Current backtesting datetime 2021-04-20 15:00:00-05:00 +2024-04-13 03:55:33,787: root: INFO: Current backtesting datetime 2021-04-21 08:30:00-05:00 +2024-04-13 03:55:33,787: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:33 +2024-04-13 03:55:33,788: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:33,788: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:33,789: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:33,789: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:33,789: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:34,015: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:34,016: root: INFO: Current backtesting datetime 2021-04-21 15:00:00-05:00 +2024-04-13 03:55:34,016: root: INFO: Current backtesting datetime 2021-04-22 08:30:00-05:00 +2024-04-13 03:55:34,016: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:34 +2024-04-13 03:55:34,016: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:34,019: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:34,019: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:34,019: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:34,019: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:34,640: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:34,641: root: INFO: Current backtesting datetime 2021-04-22 15:00:00-05:00 +2024-04-13 03:55:34,641: root: INFO: Current backtesting datetime 2021-04-23 08:30:00-05:00 +2024-04-13 03:55:34,642: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:34 +2024-04-13 03:55:34,642: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:34,643: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:34,643: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:34,643: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:34,643: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:34,964: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:34,965: root: INFO: Current backtesting datetime 2021-04-23 15:00:00-05:00 +2024-04-13 03:55:34,965: root: INFO: Current backtesting datetime 2021-04-24 08:30:00-05:00 +2024-04-13 03:55:34,966: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:34,967: root: INFO: Current backtesting datetime 2021-04-24 08:29:00-05:00 +2024-04-13 03:55:34,969: root: INFO: Current backtesting datetime 2021-04-24 08:29:00-05:00 +2024-04-13 03:55:34,969: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:34,970: root: INFO: Current backtesting datetime 2021-04-26 07:30:00-05:00 +2024-04-13 03:55:34,970: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:34,971: root: INFO: Current backtesting datetime 2021-04-26 08:30:00-05:00 +2024-04-13 03:55:34,971: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:34,972: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:34 +2024-04-13 03:55:34,973: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:34,973: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:34,974: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:34,974: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:34,974: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:35,545: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:35,546: root: INFO: Current backtesting datetime 2021-04-26 15:00:00-05:00 +2024-04-13 03:55:35,547: root: INFO: Current backtesting datetime 2021-04-27 08:30:00-05:00 +2024-04-13 03:55:35,547: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:35 +2024-04-13 03:55:35,547: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:35,548: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:35,548: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:35,549: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:35,549: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:36,967: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:36,968: root: INFO: Current backtesting datetime 2021-04-27 15:00:00-05:00 +2024-04-13 03:55:36,969: root: INFO: Current backtesting datetime 2021-04-28 08:30:00-05:00 +2024-04-13 03:55:36,969: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:36 +2024-04-13 03:55:36,969: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:36,970: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:36,970: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:36,971: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:36,971: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:38,754: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:38,755: root: INFO: Current backtesting datetime 2021-04-28 15:00:00-05:00 +2024-04-13 03:55:38,755: root: INFO: Current backtesting datetime 2021-04-29 08:30:00-05:00 +2024-04-13 03:55:38,755: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:38 +2024-04-13 03:55:38,755: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:38,756: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:38,756: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:38,757: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:38,757: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:40,022: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:40,023: root: INFO: Current backtesting datetime 2021-04-29 15:00:00-05:00 +2024-04-13 03:55:40,023: root: INFO: Current backtesting datetime 2021-04-30 08:30:00-05:00 +2024-04-13 03:55:40,024: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:40 +2024-04-13 03:55:40,024: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:40,024: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:40,025: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:40,025: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:40,025: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:41,308: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:41,309: root: INFO: Current backtesting datetime 2021-04-30 15:00:00-05:00 +2024-04-13 03:55:41,310: root: INFO: Current backtesting datetime 2021-05-01 08:30:00-05:00 +2024-04-13 03:55:41,310: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:41,311: root: INFO: Current backtesting datetime 2021-05-01 08:29:00-05:00 +2024-04-13 03:55:41,312: root: INFO: Current backtesting datetime 2021-05-01 08:29:00-05:00 +2024-04-13 03:55:41,312: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:41,313: root: INFO: Current backtesting datetime 2021-05-03 07:30:00-05:00 +2024-04-13 03:55:41,314: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:41,315: root: INFO: Current backtesting datetime 2021-05-03 08:30:00-05:00 +2024-04-13 03:55:41,315: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:41,316: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:41 +2024-04-13 03:55:41,316: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:41,317: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:41,317: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:41,317: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:41,317: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:42,709: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:42,710: root: INFO: Current backtesting datetime 2021-05-03 15:00:00-05:00 +2024-04-13 03:55:42,710: root: INFO: Current backtesting datetime 2021-05-04 08:30:00-05:00 +2024-04-13 03:55:42,711: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:42 +2024-04-13 03:55:42,711: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:42,712: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:42,712: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:42,712: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:42,712: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:43,955: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:43,956: root: INFO: Current backtesting datetime 2021-05-04 15:00:00-05:00 +2024-04-13 03:55:43,956: root: INFO: Current backtesting datetime 2021-05-05 08:30:00-05:00 +2024-04-13 03:55:43,956: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:43 +2024-04-13 03:55:43,957: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:43,957: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:43,958: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:43,958: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:43,958: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:45,651: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:45,652: root: INFO: Current backtesting datetime 2021-05-05 15:00:00-05:00 +2024-04-13 03:55:45,653: root: INFO: Current backtesting datetime 2021-05-06 08:30:00-05:00 +2024-04-13 03:55:45,653: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:45 +2024-04-13 03:55:45,653: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:45,654: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:45,654: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:45,655: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:45,655: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:47,424: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:47,425: root: INFO: Current backtesting datetime 2021-05-06 15:00:00-05:00 +2024-04-13 03:55:47,425: root: INFO: Current backtesting datetime 2021-05-07 08:30:00-05:00 +2024-04-13 03:55:47,425: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:47 +2024-04-13 03:55:47,426: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:47,426: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:47,427: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:47,427: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:47,427: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:48,570: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:48,571: root: INFO: Current backtesting datetime 2021-05-07 15:00:00-05:00 +2024-04-13 03:55:48,572: root: INFO: Current backtesting datetime 2021-05-08 08:30:00-05:00 +2024-04-13 03:55:48,572: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:48,574: root: INFO: Current backtesting datetime 2021-05-08 08:29:00-05:00 +2024-04-13 03:55:48,575: root: INFO: Current backtesting datetime 2021-05-08 08:29:00-05:00 +2024-04-13 03:55:48,575: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:48,576: root: INFO: Current backtesting datetime 2021-05-10 07:30:00-05:00 +2024-04-13 03:55:48,576: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:48,577: root: INFO: Current backtesting datetime 2021-05-10 08:30:00-05:00 +2024-04-13 03:55:48,577: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:48,578: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:48 +2024-04-13 03:55:48,578: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:48,579: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:48,579: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:48,580: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:48,580: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:50,282: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:50,283: root: INFO: Current backtesting datetime 2021-05-10 15:00:00-05:00 +2024-04-13 03:55:50,283: root: INFO: Current backtesting datetime 2021-05-11 08:30:00-05:00 +2024-04-13 03:55:50,283: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:50 +2024-04-13 03:55:50,283: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:50,284: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:50,284: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:50,285: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:50,285: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:51,196: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:51,197: root: INFO: Current backtesting datetime 2021-05-11 15:00:00-05:00 +2024-04-13 03:55:51,198: root: INFO: Current backtesting datetime 2021-05-12 08:30:00-05:00 +2024-04-13 03:55:51,198: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:51 +2024-04-13 03:55:51,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:51,199: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:51,199: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:51,200: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:51,200: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:52,175: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:52,176: root: INFO: Current backtesting datetime 2021-05-12 15:00:00-05:00 +2024-04-13 03:55:52,176: root: INFO: Current backtesting datetime 2021-05-13 08:30:00-05:00 +2024-04-13 03:55:52,176: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:52 +2024-04-13 03:55:52,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:52,177: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:52,178: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:52,178: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:52,178: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:53,203: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:53,204: root: INFO: Current backtesting datetime 2021-05-13 15:00:00-05:00 +2024-04-13 03:55:53,204: root: INFO: Current backtesting datetime 2021-05-14 08:30:00-05:00 +2024-04-13 03:55:53,205: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:53 +2024-04-13 03:55:53,205: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:53,206: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:53,206: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:53,207: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:53,207: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:54,035: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:54,036: root: INFO: Current backtesting datetime 2021-05-14 15:00:00-05:00 +2024-04-13 03:55:54,037: root: INFO: Current backtesting datetime 2021-05-15 08:30:00-05:00 +2024-04-13 03:55:54,037: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:55:54,039: root: INFO: Current backtesting datetime 2021-05-15 08:29:00-05:00 +2024-04-13 03:55:54,040: root: INFO: Current backtesting datetime 2021-05-15 08:29:00-05:00 +2024-04-13 03:55:54,040: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:55:54,041: root: INFO: Current backtesting datetime 2021-05-17 07:30:00-05:00 +2024-04-13 03:55:54,042: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:55:54,043: root: INFO: Current backtesting datetime 2021-05-17 08:30:00-05:00 +2024-04-13 03:55:54,043: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:55:54,044: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:54 +2024-04-13 03:55:54,044: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:54,045: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:54,045: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:54,045: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:54,045: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:57,212: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:57,213: root: INFO: Current backtesting datetime 2021-05-17 15:00:00-05:00 +2024-04-13 03:55:57,213: root: INFO: Current backtesting datetime 2021-05-18 08:30:00-05:00 +2024-04-13 03:55:57,214: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:57 +2024-04-13 03:55:57,214: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:57,215: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:57,215: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:57,215: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:57,215: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:55:58,795: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:55:58,796: root: INFO: Current backtesting datetime 2021-05-18 15:00:00-05:00 +2024-04-13 03:55:58,796: root: INFO: Current backtesting datetime 2021-05-19 08:30:00-05:00 +2024-04-13 03:55:58,796: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:55:58 +2024-04-13 03:55:58,796: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:58,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:55:58,797: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:55:58,798: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:55:58,798: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:00,029: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:00,030: root: INFO: Current backtesting datetime 2021-05-19 15:00:00-05:00 +2024-04-13 03:56:00,030: root: INFO: Current backtesting datetime 2021-05-20 08:30:00-05:00 +2024-04-13 03:56:00,031: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:00 +2024-04-13 03:56:00,031: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:00,032: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:00,032: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:00,032: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:00,032: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:01,253: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:01,255: root: INFO: Current backtesting datetime 2021-05-20 15:00:00-05:00 +2024-04-13 03:56:01,255: root: INFO: Current backtesting datetime 2021-05-21 08:30:00-05:00 +2024-04-13 03:56:01,255: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:01 +2024-04-13 03:56:01,256: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:01,257: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:01,257: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:01,257: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:01,257: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:02,321: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:02,322: root: INFO: Current backtesting datetime 2021-05-21 15:00:00-05:00 +2024-04-13 03:56:02,323: root: INFO: Current backtesting datetime 2021-05-22 08:30:00-05:00 +2024-04-13 03:56:02,323: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:56:02,324: root: INFO: Current backtesting datetime 2021-05-22 08:29:00-05:00 +2024-04-13 03:56:02,326: root: INFO: Current backtesting datetime 2021-05-22 08:29:00-05:00 +2024-04-13 03:56:02,326: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:56:02,327: root: INFO: Current backtesting datetime 2021-05-24 07:30:00-05:00 +2024-04-13 03:56:02,327: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:56:02,328: root: INFO: Current backtesting datetime 2021-05-24 08:30:00-05:00 +2024-04-13 03:56:02,328: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:56:02,330: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:02 +2024-04-13 03:56:02,330: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:02,331: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:02,331: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:02,331: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:02,331: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:03,853: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:03,854: root: INFO: Current backtesting datetime 2021-05-24 15:00:00-05:00 +2024-04-13 03:56:03,854: root: INFO: Current backtesting datetime 2021-05-25 08:30:00-05:00 +2024-04-13 03:56:03,854: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:03 +2024-04-13 03:56:03,855: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:03,855: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:03,856: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:03,856: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:03,856: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:05,363: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:05,364: root: INFO: Current backtesting datetime 2021-05-25 15:00:00-05:00 +2024-04-13 03:56:05,364: root: INFO: Current backtesting datetime 2021-05-26 08:30:00-05:00 +2024-04-13 03:56:05,364: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:05 +2024-04-13 03:56:05,364: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:05,365: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:05,365: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:05,366: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:05,366: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:06,801: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:06,802: root: INFO: Current backtesting datetime 2021-05-26 15:00:00-05:00 +2024-04-13 03:56:06,802: root: INFO: Current backtesting datetime 2021-05-27 08:30:00-05:00 +2024-04-13 03:56:06,803: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:06 +2024-04-13 03:56:06,803: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:06,803: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:06,804: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:06,804: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:06,804: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:07,790: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:07,791: root: INFO: Current backtesting datetime 2021-05-27 15:00:00-05:00 +2024-04-13 03:56:07,791: root: INFO: Current backtesting datetime 2021-05-28 08:30:00-05:00 +2024-04-13 03:56:07,792: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:07 +2024-04-13 03:56:07,792: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:07,792: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:07,793: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:07,793: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:07,793: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:09,851: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:09,852: root: INFO: Current backtesting datetime 2021-05-28 15:00:00-05:00 +2024-04-13 03:56:09,852: root: INFO: Current backtesting datetime 2021-05-29 08:30:00-05:00 +2024-04-13 03:56:09,852: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:56:09,855: root: INFO: Current backtesting datetime 2021-05-29 08:29:00-05:00 +2024-04-13 03:56:09,856: root: INFO: Current backtesting datetime 2021-05-29 08:29:00-05:00 +2024-04-13 03:56:09,856: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:56:09,857: root: INFO: Current backtesting datetime 2021-06-01 07:30:00-05:00 +2024-04-13 03:56:09,857: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:56:09,857: root: INFO: Current backtesting datetime 2021-06-01 08:30:00-05:00 +2024-04-13 03:56:09,857: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:56:09,859: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:09 +2024-04-13 03:56:09,859: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:09,860: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:09,860: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:09,860: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:09,860: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:11,346: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:11,347: root: INFO: Current backtesting datetime 2021-06-01 15:00:00-05:00 +2024-04-13 03:56:11,347: root: INFO: Current backtesting datetime 2021-06-02 08:30:00-05:00 +2024-04-13 03:56:11,348: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:11 +2024-04-13 03:56:11,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:11,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:11,349: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:11,349: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:11,349: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:13,158: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:13,159: root: INFO: Current backtesting datetime 2021-06-02 15:00:00-05:00 +2024-04-13 03:56:13,159: root: INFO: Current backtesting datetime 2021-06-03 08:30:00-05:00 +2024-04-13 03:56:13,160: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:13 +2024-04-13 03:56:13,160: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:13,161: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:13,161: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:13,161: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:13,161: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:15,152: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:15,153: root: INFO: Current backtesting datetime 2021-06-03 15:00:00-05:00 +2024-04-13 03:56:15,153: root: INFO: Current backtesting datetime 2021-06-04 08:30:00-05:00 +2024-04-13 03:56:15,154: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:15 +2024-04-13 03:56:15,154: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:15,155: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:15,155: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:15,155: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:15,155: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:16,914: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:16,915: root: INFO: Current backtesting datetime 2021-06-04 15:00:00-05:00 +2024-04-13 03:56:16,915: root: INFO: Current backtesting datetime 2021-06-05 08:30:00-05:00 +2024-04-13 03:56:16,916: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:56:16,917: root: INFO: Current backtesting datetime 2021-06-05 08:29:00-05:00 +2024-04-13 03:56:16,918: root: INFO: Current backtesting datetime 2021-06-05 08:29:00-05:00 +2024-04-13 03:56:16,918: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:56:16,919: root: INFO: Current backtesting datetime 2021-06-07 07:30:00-05:00 +2024-04-13 03:56:16,920: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:56:16,920: root: INFO: Current backtesting datetime 2021-06-07 08:30:00-05:00 +2024-04-13 03:56:16,920: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:56:16,921: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:16 +2024-04-13 03:56:16,922: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:16,922: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:16,923: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:16,923: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:16,923: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:18,196: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:18,197: root: INFO: Current backtesting datetime 2021-06-07 15:00:00-05:00 +2024-04-13 03:56:18,197: root: INFO: Current backtesting datetime 2021-06-08 08:30:00-05:00 +2024-04-13 03:56:18,198: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:18 +2024-04-13 03:56:18,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:18,199: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:18,199: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:18,199: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:18,200: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:19,174: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:19,175: root: INFO: Current backtesting datetime 2021-06-08 15:00:00-05:00 +2024-04-13 03:56:19,176: root: INFO: Current backtesting datetime 2021-06-09 08:30:00-05:00 +2024-04-13 03:56:19,176: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:19 +2024-04-13 03:56:19,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:19,177: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:19,178: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:19,178: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:19,178: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:20,586: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:20,587: root: INFO: Current backtesting datetime 2021-06-09 15:00:00-05:00 +2024-04-13 03:56:20,587: root: INFO: Current backtesting datetime 2021-06-10 08:30:00-05:00 +2024-04-13 03:56:20,588: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:20 +2024-04-13 03:56:20,588: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:20,589: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:20,589: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:20,589: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:20,589: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:22,365: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:22,366: root: INFO: Current backtesting datetime 2021-06-10 15:00:00-05:00 +2024-04-13 03:56:22,366: root: INFO: Current backtesting datetime 2021-06-11 08:30:00-05:00 +2024-04-13 03:56:22,367: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:22 +2024-04-13 03:56:22,367: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:22,368: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:22,368: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:22,369: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:22,369: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:25,162: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:25,163: root: INFO: Current backtesting datetime 2021-06-11 15:00:00-05:00 +2024-04-13 03:56:25,164: root: INFO: Current backtesting datetime 2021-06-12 08:30:00-05:00 +2024-04-13 03:56:25,164: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:56:25,166: root: INFO: Current backtesting datetime 2021-06-12 08:29:00-05:00 +2024-04-13 03:56:25,167: root: INFO: Current backtesting datetime 2021-06-12 08:29:00-05:00 +2024-04-13 03:56:25,167: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:56:25,168: root: INFO: Current backtesting datetime 2021-06-14 07:30:00-05:00 +2024-04-13 03:56:25,168: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:56:25,169: root: INFO: Current backtesting datetime 2021-06-14 08:30:00-05:00 +2024-04-13 03:56:25,169: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:56:25,170: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:25 +2024-04-13 03:56:25,171: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:25,171: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:25,172: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:25,172: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:25,172: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:28,656: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:28,657: root: INFO: Current backtesting datetime 2021-06-14 15:00:00-05:00 +2024-04-13 03:56:28,657: root: INFO: Current backtesting datetime 2021-06-15 08:30:00-05:00 +2024-04-13 03:56:28,657: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:28 +2024-04-13 03:56:28,658: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:28,658: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:28,658: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:28,659: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:28,659: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:32,064: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:32,065: root: INFO: Current backtesting datetime 2021-06-15 15:00:00-05:00 +2024-04-13 03:56:32,065: root: INFO: Current backtesting datetime 2021-06-16 08:30:00-05:00 +2024-04-13 03:56:32,066: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:32 +2024-04-13 03:56:32,066: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:32,067: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:32,067: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:32,067: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:32,068: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:37,632: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:37,633: root: INFO: Current backtesting datetime 2021-06-16 15:00:00-05:00 +2024-04-13 03:56:37,633: root: INFO: Current backtesting datetime 2021-06-17 08:30:00-05:00 +2024-04-13 03:56:37,633: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:37 +2024-04-13 03:56:37,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:37,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:37,635: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:37,635: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:37,635: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:39,623: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:39,624: root: INFO: Current backtesting datetime 2021-06-17 15:00:00-05:00 +2024-04-13 03:56:39,624: root: INFO: Current backtesting datetime 2021-06-18 08:30:00-05:00 +2024-04-13 03:56:39,625: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:39 +2024-04-13 03:56:39,625: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:39,626: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:39,626: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:39,627: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:39,627: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:46,888: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:46,889: root: INFO: Current backtesting datetime 2021-06-18 15:00:00-05:00 +2024-04-13 03:56:46,890: root: INFO: Current backtesting datetime 2021-06-19 08:30:00-05:00 +2024-04-13 03:56:46,890: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:56:46,892: root: INFO: Current backtesting datetime 2021-06-19 08:29:00-05:00 +2024-04-13 03:56:46,893: root: INFO: Current backtesting datetime 2021-06-19 08:29:00-05:00 +2024-04-13 03:56:46,893: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:56:46,894: root: INFO: Current backtesting datetime 2021-06-21 07:30:00-05:00 +2024-04-13 03:56:46,894: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:56:46,895: root: INFO: Current backtesting datetime 2021-06-21 08:30:00-05:00 +2024-04-13 03:56:46,895: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:56:46,896: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:46 +2024-04-13 03:56:46,896: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:46,897: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:46,897: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:46,898: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:46,898: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:50,929: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:50,930: root: INFO: Current backtesting datetime 2021-06-21 15:00:00-05:00 +2024-04-13 03:56:50,930: root: INFO: Current backtesting datetime 2021-06-22 08:30:00-05:00 +2024-04-13 03:56:50,931: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:50 +2024-04-13 03:56:50,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:50,932: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:50,932: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:50,933: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:50,933: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:56:59,378: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:56:59,379: root: INFO: Current backtesting datetime 2021-06-22 15:00:00-05:00 +2024-04-13 03:56:59,380: root: INFO: Current backtesting datetime 2021-06-23 08:30:00-05:00 +2024-04-13 03:56:59,380: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:56:59 +2024-04-13 03:56:59,380: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:59,381: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:56:59,381: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:56:59,382: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:56:59,382: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:07,646: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:07,647: root: INFO: Current backtesting datetime 2021-06-23 15:00:00-05:00 +2024-04-13 03:57:07,647: root: INFO: Current backtesting datetime 2021-06-24 08:30:00-05:00 +2024-04-13 03:57:07,648: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:07 +2024-04-13 03:57:07,648: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:07,649: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:07,649: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:07,650: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:07,650: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:10,396: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:10,397: root: INFO: Current backtesting datetime 2021-06-24 15:00:00-05:00 +2024-04-13 03:57:10,398: root: INFO: Current backtesting datetime 2021-06-25 08:30:00-05:00 +2024-04-13 03:57:10,398: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:10 +2024-04-13 03:57:10,398: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:10,399: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:10,399: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:10,400: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:10,400: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:13,455: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:13,456: root: INFO: Current backtesting datetime 2021-06-25 15:00:00-05:00 +2024-04-13 03:57:13,456: root: INFO: Current backtesting datetime 2021-06-26 08:30:00-05:00 +2024-04-13 03:57:13,457: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:57:13,458: root: INFO: Current backtesting datetime 2021-06-26 08:29:00-05:00 +2024-04-13 03:57:13,460: root: INFO: Current backtesting datetime 2021-06-26 08:29:00-05:00 +2024-04-13 03:57:13,460: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:57:13,461: root: INFO: Current backtesting datetime 2021-06-28 07:30:00-05:00 +2024-04-13 03:57:13,461: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:57:13,462: root: INFO: Current backtesting datetime 2021-06-28 08:30:00-05:00 +2024-04-13 03:57:13,462: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:57:13,463: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:13 +2024-04-13 03:57:13,463: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:13,464: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:13,464: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:13,465: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:13,465: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:15,581: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:15,582: root: INFO: Current backtesting datetime 2021-06-28 15:00:00-05:00 +2024-04-13 03:57:15,583: root: INFO: Current backtesting datetime 2021-06-29 08:30:00-05:00 +2024-04-13 03:57:15,583: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:15 +2024-04-13 03:57:15,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:15,584: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:15,584: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:15,585: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:15,585: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:17,428: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:17,429: root: INFO: Current backtesting datetime 2021-06-29 15:00:00-05:00 +2024-04-13 03:57:17,429: root: INFO: Current backtesting datetime 2021-06-30 08:30:00-05:00 +2024-04-13 03:57:17,430: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:17 +2024-04-13 03:57:17,430: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:17,430: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:17,431: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:17,431: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:17,431: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:20,207: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:20,208: root: INFO: Current backtesting datetime 2021-06-30 15:00:00-05:00 +2024-04-13 03:57:20,208: root: INFO: Current backtesting datetime 2021-07-01 08:30:00-05:00 +2024-04-13 03:57:20,209: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:20 +2024-04-13 03:57:20,209: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:20,210: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:20,210: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:20,211: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:20,211: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:21,984: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:21,985: root: INFO: Current backtesting datetime 2021-07-01 15:00:00-05:00 +2024-04-13 03:57:21,986: root: INFO: Current backtesting datetime 2021-07-02 08:30:00-05:00 +2024-04-13 03:57:21,986: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:21 +2024-04-13 03:57:21,986: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:21,987: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:21,988: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:21,988: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:21,988: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:24,502: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:24,503: root: INFO: Current backtesting datetime 2021-07-02 15:00:00-05:00 +2024-04-13 03:57:24,503: root: INFO: Current backtesting datetime 2021-07-03 08:30:00-05:00 +2024-04-13 03:57:24,504: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:57:24,505: root: INFO: Current backtesting datetime 2021-07-03 08:29:00-05:00 +2024-04-13 03:57:24,506: root: INFO: Current backtesting datetime 2021-07-03 08:29:00-05:00 +2024-04-13 03:57:24,507: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:57:24,507: root: INFO: Current backtesting datetime 2021-07-06 07:30:00-05:00 +2024-04-13 03:57:24,508: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:57:24,509: root: INFO: Current backtesting datetime 2021-07-06 08:30:00-05:00 +2024-04-13 03:57:24,509: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:57:24,510: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:24 +2024-04-13 03:57:24,510: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:24,511: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:24,511: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:24,512: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:24,512: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:26,318: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:26,319: root: INFO: Current backtesting datetime 2021-07-06 15:00:00-05:00 +2024-04-13 03:57:26,319: root: INFO: Current backtesting datetime 2021-07-07 08:30:00-05:00 +2024-04-13 03:57:26,320: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:26 +2024-04-13 03:57:26,320: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:26,321: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:26,321: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:26,322: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:26,322: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:30,378: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:30,379: root: INFO: Current backtesting datetime 2021-07-07 15:00:00-05:00 +2024-04-13 03:57:30,379: root: INFO: Current backtesting datetime 2021-07-08 08:30:00-05:00 +2024-04-13 03:57:30,379: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:30 +2024-04-13 03:57:30,380: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:30,380: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:30,381: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:30,381: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:30,381: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:34,200: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:34,201: root: INFO: Current backtesting datetime 2021-07-08 15:00:00-05:00 +2024-04-13 03:57:34,201: root: INFO: Current backtesting datetime 2021-07-09 08:30:00-05:00 +2024-04-13 03:57:34,202: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:34 +2024-04-13 03:57:34,202: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:34,203: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:34,203: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:34,204: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:34,204: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:43,367: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:43,368: root: INFO: Current backtesting datetime 2021-07-09 15:00:00-05:00 +2024-04-13 03:57:43,368: root: INFO: Current backtesting datetime 2021-07-10 08:30:00-05:00 +2024-04-13 03:57:43,369: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:57:43,371: root: INFO: Current backtesting datetime 2021-07-10 08:29:00-05:00 +2024-04-13 03:57:43,371: root: INFO: Current backtesting datetime 2021-07-10 08:29:00-05:00 +2024-04-13 03:57:43,371: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:57:43,372: root: INFO: Current backtesting datetime 2021-07-12 07:30:00-05:00 +2024-04-13 03:57:43,373: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:57:43,374: root: INFO: Current backtesting datetime 2021-07-12 08:30:00-05:00 +2024-04-13 03:57:43,374: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:57:43,376: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:43 +2024-04-13 03:57:43,376: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:43,376: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:43,376: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:43,376: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:43,376: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:45,842: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:45,843: root: INFO: Current backtesting datetime 2021-07-12 15:00:00-05:00 +2024-04-13 03:57:45,843: root: INFO: Current backtesting datetime 2021-07-13 08:30:00-05:00 +2024-04-13 03:57:45,844: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:45 +2024-04-13 03:57:45,844: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:45,845: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:45,845: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:45,845: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:45,845: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:46,655: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:46,656: root: INFO: Current backtesting datetime 2021-07-13 15:00:00-05:00 +2024-04-13 03:57:46,656: root: INFO: Current backtesting datetime 2021-07-14 08:30:00-05:00 +2024-04-13 03:57:46,656: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:46 +2024-04-13 03:57:46,657: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:46,657: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:46,658: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:46,658: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:46,658: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:47,318: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:47,319: root: INFO: Current backtesting datetime 2021-07-14 15:00:00-05:00 +2024-04-13 03:57:47,319: root: INFO: Current backtesting datetime 2021-07-15 08:30:00-05:00 +2024-04-13 03:57:47,320: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:47 +2024-04-13 03:57:47,320: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:47,321: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:47,321: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:47,322: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:47,322: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:47,765: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:47,766: root: INFO: Current backtesting datetime 2021-07-15 15:00:00-05:00 +2024-04-13 03:57:47,766: root: INFO: Current backtesting datetime 2021-07-16 08:30:00-05:00 +2024-04-13 03:57:47,767: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:47 +2024-04-13 03:57:47,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:47,768: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:47,768: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:47,768: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:47,769: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:48,085: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:48,086: root: INFO: Current backtesting datetime 2021-07-16 15:00:00-05:00 +2024-04-13 03:57:48,086: root: INFO: Current backtesting datetime 2021-07-17 08:30:00-05:00 +2024-04-13 03:57:48,087: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:57:48,088: root: INFO: Current backtesting datetime 2021-07-17 08:29:00-05:00 +2024-04-13 03:57:48,089: root: INFO: Current backtesting datetime 2021-07-17 08:29:00-05:00 +2024-04-13 03:57:48,089: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:57:48,090: root: INFO: Current backtesting datetime 2021-07-19 07:30:00-05:00 +2024-04-13 03:57:48,091: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:57:48,092: root: INFO: Current backtesting datetime 2021-07-19 08:30:00-05:00 +2024-04-13 03:57:48,092: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:57:48,093: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:48 +2024-04-13 03:57:48,093: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:48,094: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:48,094: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:48,094: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:48,094: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:48,775: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:48,776: root: INFO: Current backtesting datetime 2021-07-19 15:00:00-05:00 +2024-04-13 03:57:48,777: root: INFO: Current backtesting datetime 2021-07-20 08:30:00-05:00 +2024-04-13 03:57:48,777: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:48 +2024-04-13 03:57:48,777: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:48,778: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:48,778: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:48,779: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:48,779: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:49,075: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:49,076: root: INFO: Current backtesting datetime 2021-07-20 15:00:00-05:00 +2024-04-13 03:57:49,076: root: INFO: Current backtesting datetime 2021-07-21 08:30:00-05:00 +2024-04-13 03:57:49,077: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:49 +2024-04-13 03:57:49,077: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:49,078: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:49,078: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:49,078: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:49,078: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:49,770: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:49,771: root: INFO: Current backtesting datetime 2021-07-21 15:00:00-05:00 +2024-04-13 03:57:49,772: root: INFO: Current backtesting datetime 2021-07-22 08:30:00-05:00 +2024-04-13 03:57:49,772: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:49 +2024-04-13 03:57:49,772: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:49,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:49,773: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:49,774: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:49,774: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:50,031: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:50,032: root: INFO: Current backtesting datetime 2021-07-22 15:00:00-05:00 +2024-04-13 03:57:50,033: root: INFO: Current backtesting datetime 2021-07-23 08:30:00-05:00 +2024-04-13 03:57:50,033: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:50 +2024-04-13 03:57:50,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:50,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:50,034: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:50,035: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:50,035: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:50,701: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:50,702: root: INFO: Current backtesting datetime 2021-07-23 15:00:00-05:00 +2024-04-13 03:57:50,702: root: INFO: Current backtesting datetime 2021-07-24 08:30:00-05:00 +2024-04-13 03:57:50,703: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:57:50,704: root: INFO: Current backtesting datetime 2021-07-24 08:29:00-05:00 +2024-04-13 03:57:50,706: root: INFO: Current backtesting datetime 2021-07-24 08:29:00-05:00 +2024-04-13 03:57:50,706: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:57:50,706: root: INFO: Current backtesting datetime 2021-07-26 07:30:00-05:00 +2024-04-13 03:57:50,707: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:57:50,708: root: INFO: Current backtesting datetime 2021-07-26 08:30:00-05:00 +2024-04-13 03:57:50,708: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:57:50,709: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:50 +2024-04-13 03:57:50,709: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:50,710: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:50,710: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:50,711: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:50,711: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:50,982: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:50,983: root: INFO: Current backtesting datetime 2021-07-26 15:00:00-05:00 +2024-04-13 03:57:50,983: root: INFO: Current backtesting datetime 2021-07-27 08:30:00-05:00 +2024-04-13 03:57:50,984: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:50 +2024-04-13 03:57:50,984: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:50,984: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:50,985: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:50,985: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:50,985: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:51,434: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:51,435: root: INFO: Current backtesting datetime 2021-07-27 15:00:00-05:00 +2024-04-13 03:57:51,435: root: INFO: Current backtesting datetime 2021-07-28 08:30:00-05:00 +2024-04-13 03:57:51,436: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:51 +2024-04-13 03:57:51,436: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:51,437: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:51,437: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:51,437: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:51,437: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:51,930: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:51,931: root: INFO: Current backtesting datetime 2021-07-28 15:00:00-05:00 +2024-04-13 03:57:51,931: root: INFO: Current backtesting datetime 2021-07-29 08:30:00-05:00 +2024-04-13 03:57:51,932: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:51 +2024-04-13 03:57:51,932: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:51,933: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:51,933: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:51,934: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:51,934: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:52,532: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:52,533: root: INFO: Current backtesting datetime 2021-07-29 15:00:00-05:00 +2024-04-13 03:57:52,534: root: INFO: Current backtesting datetime 2021-07-30 08:30:00-05:00 +2024-04-13 03:57:52,534: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:52 +2024-04-13 03:57:52,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:52,535: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:52,535: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:52,536: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:52,536: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:53,011: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:53,012: root: INFO: Current backtesting datetime 2021-07-30 15:00:00-05:00 +2024-04-13 03:57:53,012: root: INFO: Current backtesting datetime 2021-07-31 08:30:00-05:00 +2024-04-13 03:57:53,013: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:57:53,015: root: INFO: Current backtesting datetime 2021-07-31 08:29:00-05:00 +2024-04-13 03:57:53,016: root: INFO: Current backtesting datetime 2021-07-31 08:29:00-05:00 +2024-04-13 03:57:53,016: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:57:53,017: root: INFO: Current backtesting datetime 2021-08-02 07:30:00-05:00 +2024-04-13 03:57:53,017: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:57:53,018: root: INFO: Current backtesting datetime 2021-08-02 08:30:00-05:00 +2024-04-13 03:57:53,018: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:57:53,020: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:53 +2024-04-13 03:57:53,020: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:53,021: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:53,021: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:53,022: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:53,022: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:53,787: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:53,788: root: INFO: Current backtesting datetime 2021-08-02 15:00:00-05:00 +2024-04-13 03:57:53,789: root: INFO: Current backtesting datetime 2021-08-03 08:30:00-05:00 +2024-04-13 03:57:53,789: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:53 +2024-04-13 03:57:53,789: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:53,790: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:53,790: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:53,791: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:53,791: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:54,060: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:54,061: root: INFO: Current backtesting datetime 2021-08-03 15:00:00-05:00 +2024-04-13 03:57:54,062: root: INFO: Current backtesting datetime 2021-08-04 08:30:00-05:00 +2024-04-13 03:57:54,062: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:54 +2024-04-13 03:57:54,062: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:54,063: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:54,063: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:54,064: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:54,064: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:54,748: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:54,749: root: INFO: Current backtesting datetime 2021-08-04 15:00:00-05:00 +2024-04-13 03:57:54,749: root: INFO: Current backtesting datetime 2021-08-05 08:30:00-05:00 +2024-04-13 03:57:54,750: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:54 +2024-04-13 03:57:54,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:54,751: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:54,751: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:54,751: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:54,751: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:54,989: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:54,989: root: INFO: Current backtesting datetime 2021-08-05 15:00:00-05:00 +2024-04-13 03:57:54,990: root: INFO: Current backtesting datetime 2021-08-06 08:30:00-05:00 +2024-04-13 03:57:54,990: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:54 +2024-04-13 03:57:54,990: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:54,991: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:54,991: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:54,992: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:54,992: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:55,716: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:55,717: root: INFO: Current backtesting datetime 2021-08-06 15:00:00-05:00 +2024-04-13 03:57:55,718: root: INFO: Current backtesting datetime 2021-08-07 08:30:00-05:00 +2024-04-13 03:57:55,718: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:57:55,720: root: INFO: Current backtesting datetime 2021-08-07 08:29:00-05:00 +2024-04-13 03:57:55,721: root: INFO: Current backtesting datetime 2021-08-07 08:29:00-05:00 +2024-04-13 03:57:55,721: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:57:55,722: root: INFO: Current backtesting datetime 2021-08-09 07:30:00-05:00 +2024-04-13 03:57:55,722: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:57:55,723: root: INFO: Current backtesting datetime 2021-08-09 08:30:00-05:00 +2024-04-13 03:57:55,723: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:57:55,724: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:55 +2024-04-13 03:57:55,724: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:55,725: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:55,725: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:55,726: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:55,726: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:55,977: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:55,977: root: INFO: Current backtesting datetime 2021-08-09 15:00:00-05:00 +2024-04-13 03:57:55,978: root: INFO: Current backtesting datetime 2021-08-10 08:30:00-05:00 +2024-04-13 03:57:55,978: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:55 +2024-04-13 03:57:55,978: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:55,979: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:55,979: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:55,980: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:55,980: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:56,446: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:56,447: root: INFO: Current backtesting datetime 2021-08-10 15:00:00-05:00 +2024-04-13 03:57:56,447: root: INFO: Current backtesting datetime 2021-08-11 08:30:00-05:00 +2024-04-13 03:57:56,448: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:56 +2024-04-13 03:57:56,448: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:56,448: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:56,449: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:56,449: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:56,449: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:56,913: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:56,914: root: INFO: Current backtesting datetime 2021-08-11 15:00:00-05:00 +2024-04-13 03:57:56,914: root: INFO: Current backtesting datetime 2021-08-12 08:30:00-05:00 +2024-04-13 03:57:56,915: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:56 +2024-04-13 03:57:56,915: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:56,916: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:56,916: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:56,916: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:56,916: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:57,380: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:57,381: root: INFO: Current backtesting datetime 2021-08-12 15:00:00-05:00 +2024-04-13 03:57:57,382: root: INFO: Current backtesting datetime 2021-08-13 08:30:00-05:00 +2024-04-13 03:57:57,382: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:57 +2024-04-13 03:57:57,382: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:57,383: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:57,383: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:57,384: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:57,384: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:57,821: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:57,822: root: INFO: Current backtesting datetime 2021-08-13 15:00:00-05:00 +2024-04-13 03:57:57,823: root: INFO: Current backtesting datetime 2021-08-14 08:30:00-05:00 +2024-04-13 03:57:57,823: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:57:57,825: root: INFO: Current backtesting datetime 2021-08-14 08:29:00-05:00 +2024-04-13 03:57:57,826: root: INFO: Current backtesting datetime 2021-08-14 08:29:00-05:00 +2024-04-13 03:57:57,826: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:57:57,827: root: INFO: Current backtesting datetime 2021-08-16 07:30:00-05:00 +2024-04-13 03:57:57,827: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:57:57,828: root: INFO: Current backtesting datetime 2021-08-16 08:30:00-05:00 +2024-04-13 03:57:57,828: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:57:57,829: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:57 +2024-04-13 03:57:57,830: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:57,830: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:57,831: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:57,831: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:57,831: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:58,395: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:58,396: root: INFO: Current backtesting datetime 2021-08-16 15:00:00-05:00 +2024-04-13 03:57:58,396: root: INFO: Current backtesting datetime 2021-08-17 08:30:00-05:00 +2024-04-13 03:57:58,397: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:58 +2024-04-13 03:57:58,397: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:58,398: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:58,398: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:58,399: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:58,399: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:58,889: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:58,890: root: INFO: Current backtesting datetime 2021-08-17 15:00:00-05:00 +2024-04-13 03:57:58,890: root: INFO: Current backtesting datetime 2021-08-18 08:30:00-05:00 +2024-04-13 03:57:58,891: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:58 +2024-04-13 03:57:58,891: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:58,891: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:58,892: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:58,892: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:58,892: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:59,340: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:59,341: root: INFO: Current backtesting datetime 2021-08-18 15:00:00-05:00 +2024-04-13 03:57:59,342: root: INFO: Current backtesting datetime 2021-08-19 08:30:00-05:00 +2024-04-13 03:57:59,342: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:59 +2024-04-13 03:57:59,342: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:59,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:59,343: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:59,344: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:59,344: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:57:59,789: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:57:59,790: root: INFO: Current backtesting datetime 2021-08-19 15:00:00-05:00 +2024-04-13 03:57:59,790: root: INFO: Current backtesting datetime 2021-08-20 08:30:00-05:00 +2024-04-13 03:57:59,791: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:57:59 +2024-04-13 03:57:59,791: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:59,792: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:57:59,792: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:57:59,792: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:57:59,792: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:00,034: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:00,035: root: INFO: Current backtesting datetime 2021-08-20 15:00:00-05:00 +2024-04-13 03:58:00,035: root: INFO: Current backtesting datetime 2021-08-21 08:30:00-05:00 +2024-04-13 03:58:00,035: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:58:00,037: root: INFO: Current backtesting datetime 2021-08-21 08:29:00-05:00 +2024-04-13 03:58:00,038: root: INFO: Current backtesting datetime 2021-08-21 08:29:00-05:00 +2024-04-13 03:58:00,038: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:58:00,039: root: INFO: Current backtesting datetime 2021-08-23 07:30:00-05:00 +2024-04-13 03:58:00,039: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:58:00,040: root: INFO: Current backtesting datetime 2021-08-23 08:30:00-05:00 +2024-04-13 03:58:00,040: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:58:00,041: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:00 +2024-04-13 03:58:00,041: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:00,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:00,042: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:00,043: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:00,043: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:00,712: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:00,713: root: INFO: Current backtesting datetime 2021-08-23 15:00:00-05:00 +2024-04-13 03:58:00,714: root: INFO: Current backtesting datetime 2021-08-24 08:30:00-05:00 +2024-04-13 03:58:00,714: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:00 +2024-04-13 03:58:00,714: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:00,715: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:00,715: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:00,716: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:00,716: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:00,949: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:00,950: root: INFO: Current backtesting datetime 2021-08-24 15:00:00-05:00 +2024-04-13 03:58:00,951: root: INFO: Current backtesting datetime 2021-08-25 08:30:00-05:00 +2024-04-13 03:58:00,951: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:00 +2024-04-13 03:58:00,951: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:00,952: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:00,952: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:00,953: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:00,953: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:01,371: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:01,372: root: INFO: Current backtesting datetime 2021-08-25 15:00:00-05:00 +2024-04-13 03:58:01,372: root: INFO: Current backtesting datetime 2021-08-26 08:30:00-05:00 +2024-04-13 03:58:01,372: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:01 +2024-04-13 03:58:01,372: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:01,373: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:01,373: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:01,373: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:01,374: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:01,807: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:01,808: root: INFO: Current backtesting datetime 2021-08-26 15:00:00-05:00 +2024-04-13 03:58:01,809: root: INFO: Current backtesting datetime 2021-08-27 08:30:00-05:00 +2024-04-13 03:58:01,809: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:01 +2024-04-13 03:58:01,809: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:01,810: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:01,810: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:01,811: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:01,811: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:02,050: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:02,052: root: INFO: Current backtesting datetime 2021-08-27 15:00:00-05:00 +2024-04-13 03:58:02,052: root: INFO: Current backtesting datetime 2021-08-28 08:30:00-05:00 +2024-04-13 03:58:02,052: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:58:02,054: root: INFO: Current backtesting datetime 2021-08-28 08:29:00-05:00 +2024-04-13 03:58:02,055: root: INFO: Current backtesting datetime 2021-08-28 08:29:00-05:00 +2024-04-13 03:58:02,055: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:58:02,056: root: INFO: Current backtesting datetime 2021-08-30 07:30:00-05:00 +2024-04-13 03:58:02,056: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:58:02,057: root: INFO: Current backtesting datetime 2021-08-30 08:30:00-05:00 +2024-04-13 03:58:02,057: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:58:02,058: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:02 +2024-04-13 03:58:02,058: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:02,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:02,059: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:02,060: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:02,060: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:02,740: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:02,741: root: INFO: Current backtesting datetime 2021-08-30 15:00:00-05:00 +2024-04-13 03:58:02,741: root: INFO: Current backtesting datetime 2021-08-31 08:30:00-05:00 +2024-04-13 03:58:02,742: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:02 +2024-04-13 03:58:02,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:02,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:02,743: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:02,743: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:02,743: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:02,992: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:02,993: root: INFO: Current backtesting datetime 2021-08-31 15:00:00-05:00 +2024-04-13 03:58:02,994: root: INFO: Current backtesting datetime 2021-09-01 08:30:00-05:00 +2024-04-13 03:58:02,994: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:02 +2024-04-13 03:58:02,994: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:02,995: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:02,995: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:02,996: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:02,996: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:06,453: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:06,454: root: INFO: Current backtesting datetime 2021-09-01 15:00:00-05:00 +2024-04-13 03:58:06,454: root: INFO: Current backtesting datetime 2021-09-02 08:30:00-05:00 +2024-04-13 03:58:06,455: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:06 +2024-04-13 03:58:06,455: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:06,456: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:06,456: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:06,456: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:06,456: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:10,309: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:10,310: root: INFO: Current backtesting datetime 2021-09-02 15:00:00-05:00 +2024-04-13 03:58:10,310: root: INFO: Current backtesting datetime 2021-09-03 08:30:00-05:00 +2024-04-13 03:58:10,311: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:10 +2024-04-13 03:58:10,311: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:10,312: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:10,312: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:10,312: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:10,313: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:16,051: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:16,052: root: INFO: Current backtesting datetime 2021-09-03 15:00:00-05:00 +2024-04-13 03:58:16,052: root: INFO: Current backtesting datetime 2021-09-04 08:30:00-05:00 +2024-04-13 03:58:16,053: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:58:16,054: root: INFO: Current backtesting datetime 2021-09-04 08:29:00-05:00 +2024-04-13 03:58:16,056: root: INFO: Current backtesting datetime 2021-09-04 08:29:00-05:00 +2024-04-13 03:58:16,056: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:58:16,056: root: INFO: Current backtesting datetime 2021-09-07 07:30:00-05:00 +2024-04-13 03:58:16,057: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:58:16,058: root: INFO: Current backtesting datetime 2021-09-07 08:30:00-05:00 +2024-04-13 03:58:16,058: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:58:16,059: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:16 +2024-04-13 03:58:16,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:16,060: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:16,060: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:16,061: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:16,061: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:23,259: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:23,260: root: INFO: Current backtesting datetime 2021-09-07 15:00:00-05:00 +2024-04-13 03:58:23,260: root: INFO: Current backtesting datetime 2021-09-08 08:30:00-05:00 +2024-04-13 03:58:23,261: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:23 +2024-04-13 03:58:23,261: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:23,262: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:23,262: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:23,262: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:23,262: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:31,882: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:31,883: root: INFO: Current backtesting datetime 2021-09-08 15:00:00-05:00 +2024-04-13 03:58:31,884: root: INFO: Current backtesting datetime 2021-09-09 08:30:00-05:00 +2024-04-13 03:58:31,884: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:31 +2024-04-13 03:58:31,884: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:31,885: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:31,885: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:31,886: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:31,886: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:37,113: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:37,114: root: INFO: Current backtesting datetime 2021-09-09 15:00:00-05:00 +2024-04-13 03:58:37,114: root: INFO: Current backtesting datetime 2021-09-10 08:30:00-05:00 +2024-04-13 03:58:37,114: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:37 +2024-04-13 03:58:37,114: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:37,115: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:37,115: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:37,116: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:37,116: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:44,079: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:44,080: root: INFO: Current backtesting datetime 2021-09-10 15:00:00-05:00 +2024-04-13 03:58:44,080: root: INFO: Current backtesting datetime 2021-09-11 08:30:00-05:00 +2024-04-13 03:58:44,081: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:58:44,082: root: INFO: Current backtesting datetime 2021-09-11 08:29:00-05:00 +2024-04-13 03:58:44,083: root: INFO: Current backtesting datetime 2021-09-11 08:29:00-05:00 +2024-04-13 03:58:44,083: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:58:44,084: root: INFO: Current backtesting datetime 2021-09-13 07:30:00-05:00 +2024-04-13 03:58:44,085: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:58:44,086: root: INFO: Current backtesting datetime 2021-09-13 08:30:00-05:00 +2024-04-13 03:58:44,086: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:58:44,087: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:44 +2024-04-13 03:58:44,087: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:44,088: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:44,088: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:44,088: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:44,089: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:49,165: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:49,166: root: INFO: Current backtesting datetime 2021-09-13 15:00:00-05:00 +2024-04-13 03:58:49,167: root: INFO: Current backtesting datetime 2021-09-14 08:30:00-05:00 +2024-04-13 03:58:49,167: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:49 +2024-04-13 03:58:49,167: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:49,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:49,168: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:49,169: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:49,169: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:58:54,801: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:58:54,802: root: INFO: Current backtesting datetime 2021-09-14 15:00:00-05:00 +2024-04-13 03:58:54,802: root: INFO: Current backtesting datetime 2021-09-15 08:30:00-05:00 +2024-04-13 03:58:54,803: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:58:54 +2024-04-13 03:58:54,803: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:54,803: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:58:54,804: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:58:54,804: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:58:54,804: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:00,382: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:00,383: root: INFO: Current backtesting datetime 2021-09-15 15:00:00-05:00 +2024-04-13 03:59:00,384: root: INFO: Current backtesting datetime 2021-09-16 08:30:00-05:00 +2024-04-13 03:59:00,384: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:00 +2024-04-13 03:59:00,384: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:00,385: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:00,385: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:00,386: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:00,386: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:05,160: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:05,161: root: INFO: Current backtesting datetime 2021-09-16 15:00:00-05:00 +2024-04-13 03:59:05,161: root: INFO: Current backtesting datetime 2021-09-17 08:30:00-05:00 +2024-04-13 03:59:05,162: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:05 +2024-04-13 03:59:05,162: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:05,163: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:05,163: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:05,163: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:05,164: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:10,524: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:10,525: root: INFO: Current backtesting datetime 2021-09-17 15:00:00-05:00 +2024-04-13 03:59:10,525: root: INFO: Current backtesting datetime 2021-09-18 08:30:00-05:00 +2024-04-13 03:59:10,526: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:59:10,527: root: INFO: Current backtesting datetime 2021-09-18 08:29:00-05:00 +2024-04-13 03:59:10,528: root: INFO: Current backtesting datetime 2021-09-18 08:29:00-05:00 +2024-04-13 03:59:10,528: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:59:10,529: root: INFO: Current backtesting datetime 2021-09-20 07:30:00-05:00 +2024-04-13 03:59:10,530: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:59:10,531: root: INFO: Current backtesting datetime 2021-09-20 08:30:00-05:00 +2024-04-13 03:59:10,531: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:59:10,532: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:10 +2024-04-13 03:59:10,532: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:10,533: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:10,533: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:10,534: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:10,534: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:17,392: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:17,393: root: INFO: Current backtesting datetime 2021-09-20 15:00:00-05:00 +2024-04-13 03:59:17,393: root: INFO: Current backtesting datetime 2021-09-21 08:30:00-05:00 +2024-04-13 03:59:17,394: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:17 +2024-04-13 03:59:17,394: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:17,394: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:17,395: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:17,395: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:17,395: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:19,848: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:19,849: root: INFO: Current backtesting datetime 2021-09-21 15:00:00-05:00 +2024-04-13 03:59:19,849: root: INFO: Current backtesting datetime 2021-09-22 08:30:00-05:00 +2024-04-13 03:59:19,850: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:19 +2024-04-13 03:59:19,850: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:19,851: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:19,851: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:19,851: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:19,852: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:22,241: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:22,242: root: INFO: Current backtesting datetime 2021-09-22 15:00:00-05:00 +2024-04-13 03:59:22,243: root: INFO: Current backtesting datetime 2021-09-23 08:30:00-05:00 +2024-04-13 03:59:22,243: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:22 +2024-04-13 03:59:22,243: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:22,244: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:22,244: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:22,245: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:22,245: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:23,766: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:23,768: root: INFO: Current backtesting datetime 2021-09-23 15:00:00-05:00 +2024-04-13 03:59:23,768: root: INFO: Current backtesting datetime 2021-09-24 08:30:00-05:00 +2024-04-13 03:59:23,768: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:23 +2024-04-13 03:59:23,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:23,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:23,770: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:23,770: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:23,770: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:25,085: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:25,085: root: INFO: Current backtesting datetime 2021-09-24 15:00:00-05:00 +2024-04-13 03:59:25,086: root: INFO: Current backtesting datetime 2021-09-25 08:30:00-05:00 +2024-04-13 03:59:25,086: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:59:25,088: root: INFO: Current backtesting datetime 2021-09-25 08:29:00-05:00 +2024-04-13 03:59:25,089: root: INFO: Current backtesting datetime 2021-09-25 08:29:00-05:00 +2024-04-13 03:59:25,089: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:59:25,090: root: INFO: Current backtesting datetime 2021-09-27 07:30:00-05:00 +2024-04-13 03:59:25,090: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:59:25,091: root: INFO: Current backtesting datetime 2021-09-27 08:30:00-05:00 +2024-04-13 03:59:25,091: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:59:25,092: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:25 +2024-04-13 03:59:25,092: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:25,093: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:25,093: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:25,094: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:25,094: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:26,719: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:26,720: root: INFO: Current backtesting datetime 2021-09-27 15:00:00-05:00 +2024-04-13 03:59:26,720: root: INFO: Current backtesting datetime 2021-09-28 08:30:00-05:00 +2024-04-13 03:59:26,721: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:26 +2024-04-13 03:59:26,721: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:26,722: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:26,722: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:26,723: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:26,723: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:28,666: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:28,667: root: INFO: Current backtesting datetime 2021-09-28 15:00:00-05:00 +2024-04-13 03:59:28,668: root: INFO: Current backtesting datetime 2021-09-29 08:30:00-05:00 +2024-04-13 03:59:28,668: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:28 +2024-04-13 03:59:28,668: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:28,669: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:28,670: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:28,670: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:28,670: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:34,284: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:34,285: root: INFO: Current backtesting datetime 2021-09-29 15:00:00-05:00 +2024-04-13 03:59:34,285: root: INFO: Current backtesting datetime 2021-09-30 08:30:00-05:00 +2024-04-13 03:59:34,286: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:34 +2024-04-13 03:59:34,286: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:34,287: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:34,287: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:34,287: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:34,287: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:40,603: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:40,604: root: INFO: Current backtesting datetime 2021-09-30 15:00:00-05:00 +2024-04-13 03:59:40,604: root: INFO: Current backtesting datetime 2021-10-01 08:30:00-05:00 +2024-04-13 03:59:40,605: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:40 +2024-04-13 03:59:40,605: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:40,606: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:40,606: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:40,606: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:40,606: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:43,604: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:43,605: root: INFO: Current backtesting datetime 2021-10-01 15:00:00-05:00 +2024-04-13 03:59:43,606: root: INFO: Current backtesting datetime 2021-10-02 08:30:00-05:00 +2024-04-13 03:59:43,606: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 03:59:43,608: root: INFO: Current backtesting datetime 2021-10-02 08:29:00-05:00 +2024-04-13 03:59:43,609: root: INFO: Current backtesting datetime 2021-10-02 08:29:00-05:00 +2024-04-13 03:59:43,609: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 03:59:43,610: root: INFO: Current backtesting datetime 2021-10-04 07:30:00-05:00 +2024-04-13 03:59:43,610: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 03:59:43,611: root: INFO: Current backtesting datetime 2021-10-04 08:30:00-05:00 +2024-04-13 03:59:43,611: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 03:59:43,612: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:43 +2024-04-13 03:59:43,612: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:43,613: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:43,614: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:43,614: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:43,614: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:49,507: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:49,508: root: INFO: Current backtesting datetime 2021-10-04 15:00:00-05:00 +2024-04-13 03:59:49,508: root: INFO: Current backtesting datetime 2021-10-05 08:30:00-05:00 +2024-04-13 03:59:49,509: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:49 +2024-04-13 03:59:49,509: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:49,510: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:49,510: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:49,510: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:49,510: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 03:59:58,502: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 03:59:58,503: root: INFO: Current backtesting datetime 2021-10-05 15:00:00-05:00 +2024-04-13 03:59:58,503: root: INFO: Current backtesting datetime 2021-10-06 08:30:00-05:00 +2024-04-13 03:59:58,505: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 03:59:58 +2024-04-13 03:59:58,505: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:58,506: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 03:59:58,506: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 03:59:58,506: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 03:59:58,506: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:04,483: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:04,484: root: INFO: Current backtesting datetime 2021-10-06 15:00:00-05:00 +2024-04-13 04:00:04,484: root: INFO: Current backtesting datetime 2021-10-07 08:30:00-05:00 +2024-04-13 04:00:04,485: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:04 +2024-04-13 04:00:04,485: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:04,485: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:04,486: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:04,486: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:04,486: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:10,388: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:10,389: root: INFO: Current backtesting datetime 2021-10-07 15:00:00-05:00 +2024-04-13 04:00:10,390: root: INFO: Current backtesting datetime 2021-10-08 08:30:00-05:00 +2024-04-13 04:00:10,390: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:10 +2024-04-13 04:00:10,390: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:10,391: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:10,391: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:10,392: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:10,392: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:14,190: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:14,191: root: INFO: Current backtesting datetime 2021-10-08 15:00:00-05:00 +2024-04-13 04:00:14,191: root: INFO: Current backtesting datetime 2021-10-09 08:30:00-05:00 +2024-04-13 04:00:14,191: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:00:14,193: root: INFO: Current backtesting datetime 2021-10-09 08:29:00-05:00 +2024-04-13 04:00:14,194: root: INFO: Current backtesting datetime 2021-10-09 08:29:00-05:00 +2024-04-13 04:00:14,194: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:00:14,195: root: INFO: Current backtesting datetime 2021-10-11 07:30:00-05:00 +2024-04-13 04:00:14,195: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:00:14,196: root: INFO: Current backtesting datetime 2021-10-11 08:30:00-05:00 +2024-04-13 04:00:14,196: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:00:14,197: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:14 +2024-04-13 04:00:14,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:14,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:14,199: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:14,199: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:14,199: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:17,860: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:17,861: root: INFO: Current backtesting datetime 2021-10-11 15:00:00-05:00 +2024-04-13 04:00:17,862: root: INFO: Current backtesting datetime 2021-10-12 08:30:00-05:00 +2024-04-13 04:00:17,862: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:17 +2024-04-13 04:00:17,862: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:17,863: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:17,863: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:17,864: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:17,864: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:20,167: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:20,168: root: INFO: Current backtesting datetime 2021-10-12 15:00:00-05:00 +2024-04-13 04:00:20,168: root: INFO: Current backtesting datetime 2021-10-13 08:30:00-05:00 +2024-04-13 04:00:20,168: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:20 +2024-04-13 04:00:20,169: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:20,169: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:20,170: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:20,170: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:20,170: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:23,225: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:23,226: root: INFO: Current backtesting datetime 2021-10-13 15:00:00-05:00 +2024-04-13 04:00:23,226: root: INFO: Current backtesting datetime 2021-10-14 08:30:00-05:00 +2024-04-13 04:00:23,227: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:23 +2024-04-13 04:00:23,227: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:23,228: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:23,228: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:23,228: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:23,228: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:25,350: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:25,351: root: INFO: Current backtesting datetime 2021-10-14 15:00:00-05:00 +2024-04-13 04:00:25,352: root: INFO: Current backtesting datetime 2021-10-15 08:30:00-05:00 +2024-04-13 04:00:25,352: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:25 +2024-04-13 04:00:25,352: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:25,353: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:25,353: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:25,354: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:25,354: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:28,864: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:28,865: root: INFO: Current backtesting datetime 2021-10-15 15:00:00-05:00 +2024-04-13 04:00:28,865: root: INFO: Current backtesting datetime 2021-10-16 08:30:00-05:00 +2024-04-13 04:00:28,866: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:00:28,867: root: INFO: Current backtesting datetime 2021-10-16 08:29:00-05:00 +2024-04-13 04:00:28,868: root: INFO: Current backtesting datetime 2021-10-16 08:29:00-05:00 +2024-04-13 04:00:28,868: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:00:28,869: root: INFO: Current backtesting datetime 2021-10-18 07:30:00-05:00 +2024-04-13 04:00:28,870: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:00:28,871: root: INFO: Current backtesting datetime 2021-10-18 08:30:00-05:00 +2024-04-13 04:00:28,871: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:00:28,872: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:28 +2024-04-13 04:00:28,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:28,873: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:28,873: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:28,873: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:28,873: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:34,896: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:34,897: root: INFO: Current backtesting datetime 2021-10-18 15:00:00-05:00 +2024-04-13 04:00:34,897: root: INFO: Current backtesting datetime 2021-10-19 08:30:00-05:00 +2024-04-13 04:00:34,897: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:34 +2024-04-13 04:00:34,898: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:34,898: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:34,899: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:34,899: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:34,899: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:39,241: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:39,242: root: INFO: Current backtesting datetime 2021-10-19 15:00:00-05:00 +2024-04-13 04:00:39,242: root: INFO: Current backtesting datetime 2021-10-20 08:30:00-05:00 +2024-04-13 04:00:39,243: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:39 +2024-04-13 04:00:39,243: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:39,244: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:39,244: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:39,244: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:39,245: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:45,657: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:45,658: root: INFO: Current backtesting datetime 2021-10-20 15:00:00-05:00 +2024-04-13 04:00:45,658: root: INFO: Current backtesting datetime 2021-10-21 08:30:00-05:00 +2024-04-13 04:00:45,658: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:45 +2024-04-13 04:00:45,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:45,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:45,660: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:45,660: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:45,660: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:00:52,012: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:00:52,013: root: INFO: Current backtesting datetime 2021-10-21 15:00:00-05:00 +2024-04-13 04:00:52,013: root: INFO: Current backtesting datetime 2021-10-22 08:30:00-05:00 +2024-04-13 04:00:52,013: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:00:52 +2024-04-13 04:00:52,014: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:52,014: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:00:52,015: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:00:52,015: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:00:52,015: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:07,551: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:07,552: root: INFO: Current backtesting datetime 2021-10-22 15:00:00-05:00 +2024-04-13 04:01:07,552: root: INFO: Current backtesting datetime 2021-10-23 08:30:00-05:00 +2024-04-13 04:01:07,553: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:01:07,554: root: INFO: Current backtesting datetime 2021-10-23 08:29:00-05:00 +2024-04-13 04:01:07,555: root: INFO: Current backtesting datetime 2021-10-23 08:29:00-05:00 +2024-04-13 04:01:07,556: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:01:07,556: root: INFO: Current backtesting datetime 2021-10-25 07:30:00-05:00 +2024-04-13 04:01:07,557: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:01:07,558: root: INFO: Current backtesting datetime 2021-10-25 08:30:00-05:00 +2024-04-13 04:01:07,558: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:01:07,559: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:07 +2024-04-13 04:01:07,559: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:07,560: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:07,560: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:07,561: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:07,561: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:11,218: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:11,219: root: INFO: Current backtesting datetime 2021-10-25 15:00:00-05:00 +2024-04-13 04:01:11,220: root: INFO: Current backtesting datetime 2021-10-26 08:30:00-05:00 +2024-04-13 04:01:11,220: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:11 +2024-04-13 04:01:11,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:11,221: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:11,221: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:11,222: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:11,222: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:17,000: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:17,001: root: INFO: Current backtesting datetime 2021-10-26 15:00:00-05:00 +2024-04-13 04:01:17,001: root: INFO: Current backtesting datetime 2021-10-27 08:30:00-05:00 +2024-04-13 04:01:17,002: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:17 +2024-04-13 04:01:17,002: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:17,002: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:17,003: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:17,003: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:17,003: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:21,804: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:21,805: root: INFO: Current backtesting datetime 2021-10-27 15:00:00-05:00 +2024-04-13 04:01:21,806: root: INFO: Current backtesting datetime 2021-10-28 08:30:00-05:00 +2024-04-13 04:01:21,806: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:21 +2024-04-13 04:01:21,806: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:21,807: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:21,807: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:21,808: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:21,808: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:24,348: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:24,349: root: INFO: Current backtesting datetime 2021-10-28 15:00:00-05:00 +2024-04-13 04:01:24,350: root: INFO: Current backtesting datetime 2021-10-29 08:30:00-05:00 +2024-04-13 04:01:24,350: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:24 +2024-04-13 04:01:24,350: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:24,351: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:24,351: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:24,352: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:24,352: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:27,886: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:27,887: root: INFO: Current backtesting datetime 2021-10-29 15:00:00-05:00 +2024-04-13 04:01:27,888: root: INFO: Current backtesting datetime 2021-10-30 08:30:00-05:00 +2024-04-13 04:01:27,888: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:01:27,890: root: INFO: Current backtesting datetime 2021-10-30 08:29:00-05:00 +2024-04-13 04:01:27,891: root: INFO: Current backtesting datetime 2021-10-30 08:29:00-05:00 +2024-04-13 04:01:27,891: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:01:27,892: root: INFO: Current backtesting datetime 2021-11-01 07:30:00-05:00 +2024-04-13 04:01:27,892: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:01:27,893: root: INFO: Current backtesting datetime 2021-11-01 08:30:00-05:00 +2024-04-13 04:01:27,893: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:01:27,894: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:27 +2024-04-13 04:01:27,894: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:27,895: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:27,895: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:27,896: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:27,896: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:31,702: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:31,703: root: INFO: Current backtesting datetime 2021-11-01 15:00:00-05:00 +2024-04-13 04:01:31,704: root: INFO: Current backtesting datetime 2021-11-02 08:30:00-05:00 +2024-04-13 04:01:31,704: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:31 +2024-04-13 04:01:31,704: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:31,705: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:31,705: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:31,706: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:31,706: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:33,900: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:33,901: root: INFO: Current backtesting datetime 2021-11-02 15:00:00-05:00 +2024-04-13 04:01:33,901: root: INFO: Current backtesting datetime 2021-11-03 08:30:00-05:00 +2024-04-13 04:01:33,902: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:33 +2024-04-13 04:01:33,902: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:33,903: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:33,903: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:33,904: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:33,904: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:36,917: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:36,918: root: INFO: Current backtesting datetime 2021-11-03 15:00:00-05:00 +2024-04-13 04:01:36,918: root: INFO: Current backtesting datetime 2021-11-04 08:30:00-05:00 +2024-04-13 04:01:36,918: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:36 +2024-04-13 04:01:36,918: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:36,919: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:36,919: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:36,919: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:36,919: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:40,377: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:40,378: root: INFO: Current backtesting datetime 2021-11-04 15:00:00-05:00 +2024-04-13 04:01:40,378: root: INFO: Current backtesting datetime 2021-11-05 08:30:00-05:00 +2024-04-13 04:01:40,379: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:40 +2024-04-13 04:01:40,379: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:40,379: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:40,380: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:40,380: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:40,380: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:45,000: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:45,001: root: INFO: Current backtesting datetime 2021-11-05 15:00:00-05:00 +2024-04-13 04:01:45,002: root: INFO: Current backtesting datetime 2021-11-06 08:30:00-05:00 +2024-04-13 04:01:45,002: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:01:45,004: root: INFO: Current backtesting datetime 2021-11-06 08:29:00-05:00 +2024-04-13 04:01:45,005: root: INFO: Current backtesting datetime 2021-11-06 08:29:00-05:00 +2024-04-13 04:01:45,005: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:01:45,006: root: INFO: Current backtesting datetime 2021-11-08 08:30:00-05:00 +2024-04-13 04:01:45,006: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:01:45,007: root: INFO: Current backtesting datetime 2021-11-08 09:30:00-05:00 +2024-04-13 04:01:45,007: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:01:45,008: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:45 +2024-04-13 04:01:45,008: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:45,009: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:45,010: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:45,010: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:45,010: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:49,425: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:49,426: root: INFO: Current backtesting datetime 2021-11-08 16:00:00-05:00 +2024-04-13 04:01:49,426: root: INFO: Current backtesting datetime 2021-11-09 09:30:00-05:00 +2024-04-13 04:01:49,426: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:49 +2024-04-13 04:01:49,427: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:49,427: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:49,428: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:49,428: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:49,428: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:54,482: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:54,483: root: INFO: Current backtesting datetime 2021-11-09 16:00:00-05:00 +2024-04-13 04:01:54,483: root: INFO: Current backtesting datetime 2021-11-10 09:30:00-05:00 +2024-04-13 04:01:54,484: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:54 +2024-04-13 04:01:54,484: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:54,485: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:54,485: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:54,486: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:54,486: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:01:58,919: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:01:58,920: root: INFO: Current backtesting datetime 2021-11-10 16:00:00-05:00 +2024-04-13 04:01:58,921: root: INFO: Current backtesting datetime 2021-11-11 09:30:00-05:00 +2024-04-13 04:01:58,921: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:01:58 +2024-04-13 04:01:58,921: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:58,922: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:01:58,922: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:01:58,923: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:01:58,923: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:04,073: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:04,074: root: INFO: Current backtesting datetime 2021-11-11 16:00:00-05:00 +2024-04-13 04:02:04,074: root: INFO: Current backtesting datetime 2021-11-12 09:30:00-05:00 +2024-04-13 04:02:04,074: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:04 +2024-04-13 04:02:04,074: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:04,074: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:04,076: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:04,076: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:04,076: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:08,523: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:08,524: root: INFO: Current backtesting datetime 2021-11-12 16:00:00-05:00 +2024-04-13 04:02:08,524: root: INFO: Current backtesting datetime 2021-11-13 09:30:00-05:00 +2024-04-13 04:02:08,525: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:02:08,526: root: INFO: Current backtesting datetime 2021-11-13 09:29:00-05:00 +2024-04-13 04:02:08,527: root: INFO: Current backtesting datetime 2021-11-13 09:29:00-05:00 +2024-04-13 04:02:08,527: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:02:08,528: root: INFO: Current backtesting datetime 2021-11-15 08:30:00-05:00 +2024-04-13 04:02:08,529: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:02:08,530: root: INFO: Current backtesting datetime 2021-11-15 09:30:00-05:00 +2024-04-13 04:02:08,530: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:02:08,531: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:08 +2024-04-13 04:02:08,531: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:08,532: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:08,532: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:08,532: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:08,532: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:14,349: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:14,350: root: INFO: Current backtesting datetime 2021-11-15 16:00:00-05:00 +2024-04-13 04:02:14,351: root: INFO: Current backtesting datetime 2021-11-16 09:30:00-05:00 +2024-04-13 04:02:14,351: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:14 +2024-04-13 04:02:14,351: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:14,352: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:14,352: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:14,353: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:14,353: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:30,926: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:30,927: root: INFO: Current backtesting datetime 2021-11-16 16:00:00-05:00 +2024-04-13 04:02:30,927: root: INFO: Current backtesting datetime 2021-11-17 09:30:00-05:00 +2024-04-13 04:02:30,928: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:30 +2024-04-13 04:02:30,928: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:30,928: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:30,929: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:30,929: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:30,929: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:36,426: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:36,427: root: INFO: Current backtesting datetime 2021-11-17 16:00:00-05:00 +2024-04-13 04:02:36,428: root: INFO: Current backtesting datetime 2021-11-18 09:30:00-05:00 +2024-04-13 04:02:36,428: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:36 +2024-04-13 04:02:36,428: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:36,429: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:36,429: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:36,430: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:36,430: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:37,982: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:37,983: root: INFO: Current backtesting datetime 2021-11-18 16:00:00-05:00 +2024-04-13 04:02:37,983: root: INFO: Current backtesting datetime 2021-11-19 09:30:00-05:00 +2024-04-13 04:02:37,984: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:37 +2024-04-13 04:02:37,984: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:37,985: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:37,985: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:37,985: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:37,985: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:40,473: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:40,474: root: INFO: Current backtesting datetime 2021-11-19 16:00:00-05:00 +2024-04-13 04:02:40,474: root: INFO: Current backtesting datetime 2021-11-20 09:30:00-05:00 +2024-04-13 04:02:40,475: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:02:40,476: root: INFO: Current backtesting datetime 2021-11-20 09:29:00-05:00 +2024-04-13 04:02:40,478: root: INFO: Current backtesting datetime 2021-11-20 09:29:00-05:00 +2024-04-13 04:02:40,478: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:02:40,479: root: INFO: Current backtesting datetime 2021-11-22 08:30:00-05:00 +2024-04-13 04:02:40,479: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:02:40,480: root: INFO: Current backtesting datetime 2021-11-22 09:30:00-05:00 +2024-04-13 04:02:40,480: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:02:40,481: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:40 +2024-04-13 04:02:40,481: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:40,482: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:40,482: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:40,483: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:40,483: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:41,938: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:41,939: root: INFO: Current backtesting datetime 2021-11-22 16:00:00-05:00 +2024-04-13 04:02:41,939: root: INFO: Current backtesting datetime 2021-11-23 09:30:00-05:00 +2024-04-13 04:02:41,940: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:41 +2024-04-13 04:02:41,940: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:41,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:41,941: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:41,942: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:41,942: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:43,409: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:43,410: root: INFO: Current backtesting datetime 2021-11-23 16:00:00-05:00 +2024-04-13 04:02:43,410: root: INFO: Current backtesting datetime 2021-11-24 09:30:00-05:00 +2024-04-13 04:02:43,411: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:43 +2024-04-13 04:02:43,411: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:43,411: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:43,412: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:43,412: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:43,412: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:47,243: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:47,244: root: INFO: Current backtesting datetime 2021-11-24 16:00:00-05:00 +2024-04-13 04:02:47,244: root: INFO: Current backtesting datetime 2021-11-25 09:30:00-05:00 +2024-04-13 04:02:47,245: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:02:47,246: root: INFO: Current backtesting datetime 2021-11-25 09:29:00-05:00 +2024-04-13 04:02:47,247: root: INFO: Current backtesting datetime 2021-11-25 09:29:00-05:00 +2024-04-13 04:02:47,247: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:02:47,248: root: INFO: Current backtesting datetime 2021-11-26 08:30:00-05:00 +2024-04-13 04:02:47,249: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:02:47,250: root: INFO: Current backtesting datetime 2021-11-26 09:30:00-05:00 +2024-04-13 04:02:47,250: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:02:47,251: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:47 +2024-04-13 04:02:47,251: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:47,252: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:47,252: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:47,252: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:47,252: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:02:52,074: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:02:52,075: root: INFO: Current backtesting datetime 2021-11-26 13:00:00-05:00 +2024-04-13 04:02:52,075: root: INFO: Current backtesting datetime 2021-11-27 09:30:00-05:00 +2024-04-13 04:02:52,075: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:02:52,077: root: INFO: Current backtesting datetime 2021-11-27 09:29:00-05:00 +2024-04-13 04:02:52,078: root: INFO: Current backtesting datetime 2021-11-27 09:29:00-05:00 +2024-04-13 04:02:52,078: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:02:52,079: root: INFO: Current backtesting datetime 2021-11-29 08:30:00-05:00 +2024-04-13 04:02:52,079: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:02:52,080: root: INFO: Current backtesting datetime 2021-11-29 09:30:00-05:00 +2024-04-13 04:02:52,080: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:02:52,081: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:02:52 +2024-04-13 04:02:52,081: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:52,082: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:02:52,082: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:02:52,083: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:02:52,083: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:10,007: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:10,008: root: INFO: Current backtesting datetime 2021-11-29 16:00:00-05:00 +2024-04-13 04:03:10,009: root: INFO: Current backtesting datetime 2021-11-30 09:30:00-05:00 +2024-04-13 04:03:10,009: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:10 +2024-04-13 04:03:10,009: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:10,010: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:10,010: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:10,011: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:10,011: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:13,045: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:13,046: root: INFO: Current backtesting datetime 2021-11-30 16:00:00-05:00 +2024-04-13 04:03:13,047: root: INFO: Current backtesting datetime 2021-12-01 09:30:00-05:00 +2024-04-13 04:03:13,047: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:13 +2024-04-13 04:03:13,047: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:13,048: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:13,048: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:13,049: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:13,049: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:15,747: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:15,748: root: INFO: Current backtesting datetime 2021-12-01 16:00:00-05:00 +2024-04-13 04:03:15,748: root: INFO: Current backtesting datetime 2021-12-02 09:30:00-05:00 +2024-04-13 04:03:15,749: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:15 +2024-04-13 04:03:15,749: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:15,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:15,750: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:15,751: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:15,751: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:19,055: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:19,056: root: INFO: Current backtesting datetime 2021-12-02 16:00:00-05:00 +2024-04-13 04:03:19,056: root: INFO: Current backtesting datetime 2021-12-03 09:30:00-05:00 +2024-04-13 04:03:19,057: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:19 +2024-04-13 04:03:19,057: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:19,057: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:19,058: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:19,058: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:19,058: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:26,785: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:26,786: root: INFO: Current backtesting datetime 2021-12-03 16:00:00-05:00 +2024-04-13 04:03:26,787: root: INFO: Current backtesting datetime 2021-12-04 09:30:00-05:00 +2024-04-13 04:03:26,787: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:03:26,788: root: INFO: Current backtesting datetime 2021-12-04 09:29:00-05:00 +2024-04-13 04:03:26,790: root: INFO: Current backtesting datetime 2021-12-04 09:29:00-05:00 +2024-04-13 04:03:26,790: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:03:26,791: root: INFO: Current backtesting datetime 2021-12-06 08:30:00-05:00 +2024-04-13 04:03:26,791: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:03:26,792: root: INFO: Current backtesting datetime 2021-12-06 09:30:00-05:00 +2024-04-13 04:03:26,792: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:03:26,793: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:26 +2024-04-13 04:03:26,793: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:26,794: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:26,794: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:26,795: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:26,795: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:33,514: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:33,515: root: INFO: Current backtesting datetime 2021-12-06 16:00:00-05:00 +2024-04-13 04:03:33,515: root: INFO: Current backtesting datetime 2021-12-07 09:30:00-05:00 +2024-04-13 04:03:33,516: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:33 +2024-04-13 04:03:33,516: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:33,517: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:33,517: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:33,518: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:33,518: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:38,770: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:38,771: root: INFO: Current backtesting datetime 2021-12-07 16:00:00-05:00 +2024-04-13 04:03:38,772: root: INFO: Current backtesting datetime 2021-12-08 09:30:00-05:00 +2024-04-13 04:03:38,772: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:38 +2024-04-13 04:03:38,772: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:38,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:38,773: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:38,774: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:38,774: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:41,934: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:41,935: root: INFO: Current backtesting datetime 2021-12-08 16:00:00-05:00 +2024-04-13 04:03:41,935: root: INFO: Current backtesting datetime 2021-12-09 09:30:00-05:00 +2024-04-13 04:03:41,935: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:41 +2024-04-13 04:03:41,936: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:41,936: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:41,937: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:41,937: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:41,937: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:43,716: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:43,717: root: INFO: Current backtesting datetime 2021-12-09 16:00:00-05:00 +2024-04-13 04:03:43,717: root: INFO: Current backtesting datetime 2021-12-10 09:30:00-05:00 +2024-04-13 04:03:43,718: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:43 +2024-04-13 04:03:43,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:43,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:43,719: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:43,719: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:43,719: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:46,497: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:46,498: root: INFO: Current backtesting datetime 2021-12-10 16:00:00-05:00 +2024-04-13 04:03:46,498: root: INFO: Current backtesting datetime 2021-12-11 09:30:00-05:00 +2024-04-13 04:03:46,499: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:03:46,500: root: INFO: Current backtesting datetime 2021-12-11 09:29:00-05:00 +2024-04-13 04:03:46,501: root: INFO: Current backtesting datetime 2021-12-11 09:29:00-05:00 +2024-04-13 04:03:46,502: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:03:46,502: root: INFO: Current backtesting datetime 2021-12-13 08:30:00-05:00 +2024-04-13 04:03:46,503: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:03:46,504: root: INFO: Current backtesting datetime 2021-12-13 09:30:00-05:00 +2024-04-13 04:03:46,504: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:03:46,505: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:46 +2024-04-13 04:03:46,505: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:46,506: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:46,506: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:46,506: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:46,506: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:47,749: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:47,750: root: INFO: Current backtesting datetime 2021-12-13 16:00:00-05:00 +2024-04-13 04:03:47,750: root: INFO: Current backtesting datetime 2021-12-14 09:30:00-05:00 +2024-04-13 04:03:47,751: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:47 +2024-04-13 04:03:47,751: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:47,752: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:47,752: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:47,753: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:47,753: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:49,297: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:49,297: root: INFO: Current backtesting datetime 2021-12-14 16:00:00-05:00 +2024-04-13 04:03:49,298: root: INFO: Current backtesting datetime 2021-12-15 09:30:00-05:00 +2024-04-13 04:03:49,298: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:49 +2024-04-13 04:03:49,298: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:49,299: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:49,299: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:49,300: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:49,300: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:50,895: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:50,896: root: INFO: Current backtesting datetime 2021-12-15 16:00:00-05:00 +2024-04-13 04:03:50,896: root: INFO: Current backtesting datetime 2021-12-16 09:30:00-05:00 +2024-04-13 04:03:50,897: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:50 +2024-04-13 04:03:50,897: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:50,898: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:50,898: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:50,898: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:50,898: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:52,929: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:52,930: root: INFO: Current backtesting datetime 2021-12-16 16:00:00-05:00 +2024-04-13 04:03:52,930: root: INFO: Current backtesting datetime 2021-12-17 09:30:00-05:00 +2024-04-13 04:03:52,931: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:52 +2024-04-13 04:03:52,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:52,932: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:52,932: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:52,932: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:52,932: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:54,981: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:54,982: root: INFO: Current backtesting datetime 2021-12-17 16:00:00-05:00 +2024-04-13 04:03:54,983: root: INFO: Current backtesting datetime 2021-12-18 09:30:00-05:00 +2024-04-13 04:03:54,983: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:03:54,985: root: INFO: Current backtesting datetime 2021-12-18 09:29:00-05:00 +2024-04-13 04:03:54,986: root: INFO: Current backtesting datetime 2021-12-18 09:29:00-05:00 +2024-04-13 04:03:54,986: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:03:54,987: root: INFO: Current backtesting datetime 2021-12-20 08:30:00-05:00 +2024-04-13 04:03:54,987: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:03:54,988: root: INFO: Current backtesting datetime 2021-12-20 09:30:00-05:00 +2024-04-13 04:03:54,988: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:03:54,989: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:54 +2024-04-13 04:03:54,989: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:54,990: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:54,990: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:54,991: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:54,991: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:56,437: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:56,439: root: INFO: Current backtesting datetime 2021-12-20 16:00:00-05:00 +2024-04-13 04:03:56,439: root: INFO: Current backtesting datetime 2021-12-21 09:30:00-05:00 +2024-04-13 04:03:56,439: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:56 +2024-04-13 04:03:56,439: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:56,440: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:56,441: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:56,441: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:56,441: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:57,725: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:57,727: root: INFO: Current backtesting datetime 2021-12-21 16:00:00-05:00 +2024-04-13 04:03:57,727: root: INFO: Current backtesting datetime 2021-12-22 09:30:00-05:00 +2024-04-13 04:03:57,727: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:57 +2024-04-13 04:03:57,728: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:57,728: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:57,729: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:57,729: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:57,729: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:58,572: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:58,573: root: INFO: Current backtesting datetime 2021-12-22 16:00:00-05:00 +2024-04-13 04:03:58,573: root: INFO: Current backtesting datetime 2021-12-23 09:30:00-05:00 +2024-04-13 04:03:58,573: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:58 +2024-04-13 04:03:58,573: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:58,574: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:58,574: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:58,575: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:58,575: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:03:59,278: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:03:59,279: root: INFO: Current backtesting datetime 2021-12-23 16:00:00-05:00 +2024-04-13 04:03:59,279: root: INFO: Current backtesting datetime 2021-12-24 09:30:00-05:00 +2024-04-13 04:03:59,280: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:03:59,281: root: INFO: Current backtesting datetime 2021-12-24 09:29:00-05:00 +2024-04-13 04:03:59,282: root: INFO: Current backtesting datetime 2021-12-24 09:29:00-05:00 +2024-04-13 04:03:59,282: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:03:59,283: root: INFO: Current backtesting datetime 2021-12-27 08:30:00-05:00 +2024-04-13 04:03:59,284: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:03:59,285: root: INFO: Current backtesting datetime 2021-12-27 09:30:00-05:00 +2024-04-13 04:03:59,285: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:03:59,286: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:03:59 +2024-04-13 04:03:59,286: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:59,287: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:03:59,287: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:03:59,288: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:03:59,288: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:00,219: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:00,220: root: INFO: Current backtesting datetime 2021-12-27 16:00:00-05:00 +2024-04-13 04:04:00,221: root: INFO: Current backtesting datetime 2021-12-28 09:30:00-05:00 +2024-04-13 04:04:00,221: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:00 +2024-04-13 04:04:00,221: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:00,222: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:00,222: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:00,223: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:00,223: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:01,101: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:01,102: root: INFO: Current backtesting datetime 2021-12-28 16:00:00-05:00 +2024-04-13 04:04:01,103: root: INFO: Current backtesting datetime 2021-12-29 09:30:00-05:00 +2024-04-13 04:04:01,103: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:01 +2024-04-13 04:04:01,103: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:01,104: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:01,104: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:01,105: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:01,105: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:04,155: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:04,156: root: INFO: Current backtesting datetime 2021-12-29 16:00:00-05:00 +2024-04-13 04:04:04,156: root: INFO: Current backtesting datetime 2021-12-30 09:30:00-05:00 +2024-04-13 04:04:04,157: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:04 +2024-04-13 04:04:04,157: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:04,158: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:04,158: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:04,159: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:04,159: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:05,360: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:05,361: root: INFO: Current backtesting datetime 2021-12-30 16:00:00-05:00 +2024-04-13 04:04:05,361: root: INFO: Current backtesting datetime 2021-12-31 09:30:00-05:00 +2024-04-13 04:04:05,362: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:05 +2024-04-13 04:04:05,362: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:05,363: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:05,363: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:05,364: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:05,364: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:06,407: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:06,408: root: INFO: Current backtesting datetime 2021-12-31 16:00:00-05:00 +2024-04-13 04:04:06,408: root: INFO: Current backtesting datetime 2022-01-01 09:30:00-05:00 +2024-04-13 04:04:06,409: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:04:06,410: root: INFO: Current backtesting datetime 2022-01-01 09:29:00-05:00 +2024-04-13 04:04:06,411: root: INFO: Current backtesting datetime 2022-01-01 09:29:00-05:00 +2024-04-13 04:04:06,411: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:04:06,412: root: INFO: Current backtesting datetime 2022-01-03 08:30:00-05:00 +2024-04-13 04:04:06,413: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:04:06,414: root: INFO: Current backtesting datetime 2022-01-03 09:30:00-05:00 +2024-04-13 04:04:06,414: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:04:06,415: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:06 +2024-04-13 04:04:06,415: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:06,416: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:06,416: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:06,416: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:06,416: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:09,513: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:09,514: root: INFO: Current backtesting datetime 2022-01-03 16:00:00-05:00 +2024-04-13 04:04:09,515: root: INFO: Current backtesting datetime 2022-01-04 09:30:00-05:00 +2024-04-13 04:04:09,515: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:09 +2024-04-13 04:04:09,515: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:09,516: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:09,516: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:09,517: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:09,517: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:10,700: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:10,701: root: INFO: Current backtesting datetime 2022-01-04 16:00:00-05:00 +2024-04-13 04:04:10,702: root: INFO: Current backtesting datetime 2022-01-05 09:30:00-05:00 +2024-04-13 04:04:10,702: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:10 +2024-04-13 04:04:10,702: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:10,703: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:10,703: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:10,704: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:10,704: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:11,492: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:11,493: root: INFO: Current backtesting datetime 2022-01-05 16:00:00-05:00 +2024-04-13 04:04:11,494: root: INFO: Current backtesting datetime 2022-01-06 09:30:00-05:00 +2024-04-13 04:04:11,494: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:11 +2024-04-13 04:04:11,494: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:11,495: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:11,495: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:11,496: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:11,496: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:12,385: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:12,386: root: INFO: Current backtesting datetime 2022-01-06 16:00:00-05:00 +2024-04-13 04:04:12,387: root: INFO: Current backtesting datetime 2022-01-07 09:30:00-05:00 +2024-04-13 04:04:12,387: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:12 +2024-04-13 04:04:12,387: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:12,388: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:12,388: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:12,389: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:12,389: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:14,934: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:14,935: root: INFO: Current backtesting datetime 2022-01-07 16:00:00-05:00 +2024-04-13 04:04:14,935: root: INFO: Current backtesting datetime 2022-01-08 09:30:00-05:00 +2024-04-13 04:04:14,936: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:04:14,937: root: INFO: Current backtesting datetime 2022-01-08 09:29:00-05:00 +2024-04-13 04:04:14,938: root: INFO: Current backtesting datetime 2022-01-08 09:29:00-05:00 +2024-04-13 04:04:14,938: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:04:14,939: root: INFO: Current backtesting datetime 2022-01-10 08:30:00-05:00 +2024-04-13 04:04:14,940: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:04:14,941: root: INFO: Current backtesting datetime 2022-01-10 09:30:00-05:00 +2024-04-13 04:04:14,941: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:04:14,942: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:14 +2024-04-13 04:04:14,942: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:14,943: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:14,943: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:14,944: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:14,944: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:15,856: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:15,857: root: INFO: Current backtesting datetime 2022-01-10 16:00:00-05:00 +2024-04-13 04:04:15,857: root: INFO: Current backtesting datetime 2022-01-11 09:30:00-05:00 +2024-04-13 04:04:15,857: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:15 +2024-04-13 04:04:15,857: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:15,858: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:15,858: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:15,859: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:15,859: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:17,152: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:17,153: root: INFO: Current backtesting datetime 2022-01-11 16:00:00-05:00 +2024-04-13 04:04:17,153: root: INFO: Current backtesting datetime 2022-01-12 09:30:00-05:00 +2024-04-13 04:04:17,153: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:17 +2024-04-13 04:04:17,153: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:17,154: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:17,155: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:17,155: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:17,155: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:18,982: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:18,983: root: INFO: Current backtesting datetime 2022-01-12 16:00:00-05:00 +2024-04-13 04:04:18,983: root: INFO: Current backtesting datetime 2022-01-13 09:30:00-05:00 +2024-04-13 04:04:18,983: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:18 +2024-04-13 04:04:18,983: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:18,984: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:18,984: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:18,985: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:18,985: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:20,689: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:20,690: root: INFO: Current backtesting datetime 2022-01-13 16:00:00-05:00 +2024-04-13 04:04:20,690: root: INFO: Current backtesting datetime 2022-01-14 09:30:00-05:00 +2024-04-13 04:04:20,690: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:20 +2024-04-13 04:04:20,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:20,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:20,692: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:20,692: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:20,692: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:30,596: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:30,597: root: INFO: Current backtesting datetime 2022-01-14 16:00:00-05:00 +2024-04-13 04:04:30,597: root: INFO: Current backtesting datetime 2022-01-15 09:30:00-05:00 +2024-04-13 04:04:30,598: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:04:30,599: root: INFO: Current backtesting datetime 2022-01-15 09:29:00-05:00 +2024-04-13 04:04:30,601: root: INFO: Current backtesting datetime 2022-01-15 09:29:00-05:00 +2024-04-13 04:04:30,601: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:04:30,602: root: INFO: Current backtesting datetime 2022-01-18 08:30:00-05:00 +2024-04-13 04:04:30,602: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:04:30,603: root: INFO: Current backtesting datetime 2022-01-18 09:30:00-05:00 +2024-04-13 04:04:30,603: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:04:30,604: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:30 +2024-04-13 04:04:30,604: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:30,605: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:30,605: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:30,606: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:30,606: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:32,748: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:32,749: root: INFO: Current backtesting datetime 2022-01-18 16:00:00-05:00 +2024-04-13 04:04:32,749: root: INFO: Current backtesting datetime 2022-01-19 09:30:00-05:00 +2024-04-13 04:04:32,750: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:32 +2024-04-13 04:04:32,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:32,751: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:32,751: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:32,752: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:32,752: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:35,207: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:35,208: root: INFO: Current backtesting datetime 2022-01-19 16:00:00-05:00 +2024-04-13 04:04:35,208: root: INFO: Current backtesting datetime 2022-01-20 09:30:00-05:00 +2024-04-13 04:04:35,208: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:35 +2024-04-13 04:04:35,208: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:35,209: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:35,209: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:35,210: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:35,210: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:38,995: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:38,996: root: INFO: Current backtesting datetime 2022-01-20 16:00:00-05:00 +2024-04-13 04:04:38,996: root: INFO: Current backtesting datetime 2022-01-21 09:30:00-05:00 +2024-04-13 04:04:38,997: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:38 +2024-04-13 04:04:38,997: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:38,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:38,998: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:38,998: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:38,998: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:04:56,651: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:04:56,652: root: INFO: Current backtesting datetime 2022-01-21 16:00:00-05:00 +2024-04-13 04:04:56,652: root: INFO: Current backtesting datetime 2022-01-22 09:30:00-05:00 +2024-04-13 04:04:56,653: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:04:56,654: root: INFO: Current backtesting datetime 2022-01-22 09:29:00-05:00 +2024-04-13 04:04:56,655: root: INFO: Current backtesting datetime 2022-01-22 09:29:00-05:00 +2024-04-13 04:04:56,655: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:04:56,656: root: INFO: Current backtesting datetime 2022-01-24 08:30:00-05:00 +2024-04-13 04:04:56,657: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:04:56,658: root: INFO: Current backtesting datetime 2022-01-24 09:30:00-05:00 +2024-04-13 04:04:56,658: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:04:56,659: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:04:56 +2024-04-13 04:04:56,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:56,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:04:56,660: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:04:56,660: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:04:56,660: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:05:06,418: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:05:06,419: root: INFO: Current backtesting datetime 2022-01-24 16:00:00-05:00 +2024-04-13 04:05:06,419: root: INFO: Current backtesting datetime 2022-01-25 09:30:00-05:00 +2024-04-13 04:05:06,420: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:05:06 +2024-04-13 04:05:06,420: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:05:06,421: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:05:06,421: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:05:06,422: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:05:06,422: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:05:32,661: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:05:32,662: root: INFO: Current backtesting datetime 2022-01-25 16:00:00-05:00 +2024-04-13 04:05:32,662: root: INFO: Current backtesting datetime 2022-01-26 09:30:00-05:00 +2024-04-13 04:05:32,663: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:05:32 +2024-04-13 04:05:32,663: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:05:32,664: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:05:32,664: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:05:32,664: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:05:32,665: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:05:37,956: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:05:37,957: root: INFO: Current backtesting datetime 2022-01-26 16:00:00-05:00 +2024-04-13 04:05:37,957: root: INFO: Current backtesting datetime 2022-01-27 09:30:00-05:00 +2024-04-13 04:05:37,958: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:05:37 +2024-04-13 04:05:37,958: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:05:37,959: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:05:37,959: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:05:37,960: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:05:37,960: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:05:59,065: alpaca.trading.stream: WARNING: trading stream websocket error, restarting connection: no close frame received or sent +2024-04-13 04:05:59,077: alpaca.trading.stream: INFO: starting trading websocket connection +2024-04-13 04:05:59,566: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:05:59,567: root: INFO: Current backtesting datetime 2022-01-27 16:00:00-05:00 +2024-04-13 04:05:59,568: root: INFO: Current backtesting datetime 2022-01-28 09:30:00-05:00 +2024-04-13 04:05:59,568: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:05:59 +2024-04-13 04:05:59,568: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:05:59,569: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:05:59,569: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:05:59,570: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:05:59,570: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:00,082: alpaca.trading.stream: INFO: connected to: BaseURL.TRADING_STREAM_PAPER +2024-04-13 04:06:08,033: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:08,034: root: INFO: Current backtesting datetime 2022-01-28 16:00:00-05:00 +2024-04-13 04:06:08,034: root: INFO: Current backtesting datetime 2022-01-29 09:30:00-05:00 +2024-04-13 04:06:08,035: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:06:08,036: root: INFO: Current backtesting datetime 2022-01-29 09:29:00-05:00 +2024-04-13 04:06:08,038: root: INFO: Current backtesting datetime 2022-01-29 09:29:00-05:00 +2024-04-13 04:06:08,038: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:06:08,038: root: INFO: Current backtesting datetime 2022-01-31 08:30:00-05:00 +2024-04-13 04:06:08,039: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:06:08,040: root: INFO: Current backtesting datetime 2022-01-31 09:30:00-05:00 +2024-04-13 04:06:08,040: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:06:08,041: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:08 +2024-04-13 04:06:08,041: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:08,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:08,042: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:08,043: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:08,043: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:16,143: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:16,144: root: INFO: Current backtesting datetime 2022-01-31 16:00:00-05:00 +2024-04-13 04:06:16,145: root: INFO: Current backtesting datetime 2022-02-01 09:30:00-05:00 +2024-04-13 04:06:16,145: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:16 +2024-04-13 04:06:16,145: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:16,146: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:16,146: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:16,147: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:16,147: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:19,919: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:19,920: root: INFO: Current backtesting datetime 2022-02-01 16:00:00-05:00 +2024-04-13 04:06:19,920: root: INFO: Current backtesting datetime 2022-02-02 09:30:00-05:00 +2024-04-13 04:06:19,920: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:19 +2024-04-13 04:06:19,920: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:19,921: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:19,921: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:19,922: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:19,922: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:28,087: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:28,088: root: INFO: Current backtesting datetime 2022-02-02 16:00:00-05:00 +2024-04-13 04:06:28,088: root: INFO: Current backtesting datetime 2022-02-03 09:30:00-05:00 +2024-04-13 04:06:28,088: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:28 +2024-04-13 04:06:28,089: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:28,089: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:28,090: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:28,090: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:28,090: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:32,716: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:32,717: root: INFO: Current backtesting datetime 2022-02-03 16:00:00-05:00 +2024-04-13 04:06:32,717: root: INFO: Current backtesting datetime 2022-02-04 09:30:00-05:00 +2024-04-13 04:06:32,718: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:32 +2024-04-13 04:06:32,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:32,719: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:32,719: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:32,719: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:32,719: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:33,964: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:33,965: root: INFO: Current backtesting datetime 2022-02-04 16:00:00-05:00 +2024-04-13 04:06:33,965: root: INFO: Current backtesting datetime 2022-02-05 09:30:00-05:00 +2024-04-13 04:06:33,965: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:06:33,967: root: INFO: Current backtesting datetime 2022-02-05 09:29:00-05:00 +2024-04-13 04:06:33,968: root: INFO: Current backtesting datetime 2022-02-05 09:29:00-05:00 +2024-04-13 04:06:33,968: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:06:33,969: root: INFO: Current backtesting datetime 2022-02-07 08:30:00-05:00 +2024-04-13 04:06:33,970: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:06:33,970: root: INFO: Current backtesting datetime 2022-02-07 09:30:00-05:00 +2024-04-13 04:06:33,970: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:06:33,971: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:33 +2024-04-13 04:06:33,972: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:33,972: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:33,973: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:33,973: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:33,973: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:36,314: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:36,315: root: INFO: Current backtesting datetime 2022-02-07 16:00:00-05:00 +2024-04-13 04:06:36,315: root: INFO: Current backtesting datetime 2022-02-08 09:30:00-05:00 +2024-04-13 04:06:36,316: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:36 +2024-04-13 04:06:36,316: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:36,317: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:36,317: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:36,318: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:36,318: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:38,372: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:38,373: root: INFO: Current backtesting datetime 2022-02-08 16:00:00-05:00 +2024-04-13 04:06:38,374: root: INFO: Current backtesting datetime 2022-02-09 09:30:00-05:00 +2024-04-13 04:06:38,374: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:38 +2024-04-13 04:06:38,374: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:38,375: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:38,375: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:38,376: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:38,376: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:39,830: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:39,831: root: INFO: Current backtesting datetime 2022-02-09 16:00:00-05:00 +2024-04-13 04:06:39,831: root: INFO: Current backtesting datetime 2022-02-10 09:30:00-05:00 +2024-04-13 04:06:39,832: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:39 +2024-04-13 04:06:39,832: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:39,834: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:39,834: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:39,834: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:39,834: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:41,863: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:41,864: root: INFO: Current backtesting datetime 2022-02-10 16:00:00-05:00 +2024-04-13 04:06:41,864: root: INFO: Current backtesting datetime 2022-02-11 09:30:00-05:00 +2024-04-13 04:06:41,865: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:41 +2024-04-13 04:06:41,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:41,866: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:41,866: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:41,867: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:41,867: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:42,891: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:42,892: root: INFO: Current backtesting datetime 2022-02-11 16:00:00-05:00 +2024-04-13 04:06:42,893: root: INFO: Current backtesting datetime 2022-02-12 09:30:00-05:00 +2024-04-13 04:06:42,893: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:06:42,895: root: INFO: Current backtesting datetime 2022-02-12 09:29:00-05:00 +2024-04-13 04:06:42,896: root: INFO: Current backtesting datetime 2022-02-12 09:29:00-05:00 +2024-04-13 04:06:42,896: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:06:42,897: root: INFO: Current backtesting datetime 2022-02-14 08:30:00-05:00 +2024-04-13 04:06:42,897: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:06:42,898: root: INFO: Current backtesting datetime 2022-02-14 09:30:00-05:00 +2024-04-13 04:06:42,898: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:06:42,899: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:42 +2024-04-13 04:06:42,900: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:42,900: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:42,901: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:42,901: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:42,901: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:43,945: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:43,946: root: INFO: Current backtesting datetime 2022-02-14 16:00:00-05:00 +2024-04-13 04:06:43,946: root: INFO: Current backtesting datetime 2022-02-15 09:30:00-05:00 +2024-04-13 04:06:43,946: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:43 +2024-04-13 04:06:43,947: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:43,947: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:43,947: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:43,948: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:43,948: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:45,512: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:45,513: root: INFO: Current backtesting datetime 2022-02-15 16:00:00-05:00 +2024-04-13 04:06:45,514: root: INFO: Current backtesting datetime 2022-02-16 09:30:00-05:00 +2024-04-13 04:06:45,514: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:45 +2024-04-13 04:06:45,514: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:45,515: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:45,515: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:45,516: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:45,516: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:46,951: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:46,952: root: INFO: Current backtesting datetime 2022-02-16 16:00:00-05:00 +2024-04-13 04:06:46,952: root: INFO: Current backtesting datetime 2022-02-17 09:30:00-05:00 +2024-04-13 04:06:46,953: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:46 +2024-04-13 04:06:46,953: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:46,954: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:46,954: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:46,954: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:46,954: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:48,084: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:48,085: root: INFO: Current backtesting datetime 2022-02-17 16:00:00-05:00 +2024-04-13 04:06:48,085: root: INFO: Current backtesting datetime 2022-02-18 09:30:00-05:00 +2024-04-13 04:06:48,086: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:48 +2024-04-13 04:06:48,086: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:48,087: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:48,087: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:48,087: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:48,087: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:49,420: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:49,421: root: INFO: Current backtesting datetime 2022-02-18 16:00:00-05:00 +2024-04-13 04:06:49,421: root: INFO: Current backtesting datetime 2022-02-19 09:30:00-05:00 +2024-04-13 04:06:49,421: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:06:49,424: root: INFO: Current backtesting datetime 2022-02-19 09:29:00-05:00 +2024-04-13 04:06:49,425: root: INFO: Current backtesting datetime 2022-02-19 09:29:00-05:00 +2024-04-13 04:06:49,425: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:06:49,426: root: INFO: Current backtesting datetime 2022-02-22 08:30:00-05:00 +2024-04-13 04:06:49,426: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:06:49,427: root: INFO: Current backtesting datetime 2022-02-22 09:30:00-05:00 +2024-04-13 04:06:49,427: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:06:49,428: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:49 +2024-04-13 04:06:49,429: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:49,429: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:49,430: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:49,430: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:49,430: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:51,190: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:51,191: root: INFO: Current backtesting datetime 2022-02-22 16:00:00-05:00 +2024-04-13 04:06:51,191: root: INFO: Current backtesting datetime 2022-02-23 09:30:00-05:00 +2024-04-13 04:06:51,192: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:51 +2024-04-13 04:06:51,192: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:51,193: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:51,193: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:51,193: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:51,193: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:53,201: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:53,202: root: INFO: Current backtesting datetime 2022-02-23 16:00:00-05:00 +2024-04-13 04:06:53,202: root: INFO: Current backtesting datetime 2022-02-24 09:30:00-05:00 +2024-04-13 04:06:53,203: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:53 +2024-04-13 04:06:53,203: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:53,204: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:53,204: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:53,205: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:53,205: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:54,516: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:54,517: root: INFO: Current backtesting datetime 2022-02-24 16:00:00-05:00 +2024-04-13 04:06:54,517: root: INFO: Current backtesting datetime 2022-02-25 09:30:00-05:00 +2024-04-13 04:06:54,518: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:54 +2024-04-13 04:06:54,518: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:54,519: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:54,519: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:54,519: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:54,520: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:55,381: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:55,382: root: INFO: Current backtesting datetime 2022-02-25 16:00:00-05:00 +2024-04-13 04:06:55,383: root: INFO: Current backtesting datetime 2022-02-26 09:30:00-05:00 +2024-04-13 04:06:55,383: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:06:55,384: root: INFO: Current backtesting datetime 2022-02-26 09:29:00-05:00 +2024-04-13 04:06:55,386: root: INFO: Current backtesting datetime 2022-02-26 09:29:00-05:00 +2024-04-13 04:06:55,386: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:06:55,387: root: INFO: Current backtesting datetime 2022-02-28 08:30:00-05:00 +2024-04-13 04:06:55,387: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:06:55,388: root: INFO: Current backtesting datetime 2022-02-28 09:30:00-05:00 +2024-04-13 04:06:55,388: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:06:55,389: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:55 +2024-04-13 04:06:55,389: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:55,390: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:55,390: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:55,391: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:55,391: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:56,695: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:56,696: root: INFO: Current backtesting datetime 2022-02-28 16:00:00-05:00 +2024-04-13 04:06:56,697: root: INFO: Current backtesting datetime 2022-03-01 09:30:00-05:00 +2024-04-13 04:06:56,697: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:56 +2024-04-13 04:06:56,697: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:56,698: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:56,698: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:56,699: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:56,699: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:58,449: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:58,450: root: INFO: Current backtesting datetime 2022-03-01 16:00:00-05:00 +2024-04-13 04:06:58,450: root: INFO: Current backtesting datetime 2022-03-02 09:30:00-05:00 +2024-04-13 04:06:58,451: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:58 +2024-04-13 04:06:58,451: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:58,452: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:58,452: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:58,452: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:58,453: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:06:59,504: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:06:59,505: root: INFO: Current backtesting datetime 2022-03-02 16:00:00-05:00 +2024-04-13 04:06:59,506: root: INFO: Current backtesting datetime 2022-03-03 09:30:00-05:00 +2024-04-13 04:06:59,506: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:06:59 +2024-04-13 04:06:59,506: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:59,507: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:06:59,507: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:06:59,508: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:06:59,508: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:00,884: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:00,885: root: INFO: Current backtesting datetime 2022-03-03 16:00:00-05:00 +2024-04-13 04:07:00,885: root: INFO: Current backtesting datetime 2022-03-04 09:30:00-05:00 +2024-04-13 04:07:00,886: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:00 +2024-04-13 04:07:00,886: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:00,887: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:00,887: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:00,887: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:00,887: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:02,572: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:02,573: root: INFO: Current backtesting datetime 2022-03-04 16:00:00-05:00 +2024-04-13 04:07:02,573: root: INFO: Current backtesting datetime 2022-03-05 09:30:00-05:00 +2024-04-13 04:07:02,573: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:07:02,575: root: INFO: Current backtesting datetime 2022-03-05 09:29:00-05:00 +2024-04-13 04:07:02,576: root: INFO: Current backtesting datetime 2022-03-05 09:29:00-05:00 +2024-04-13 04:07:02,576: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:07:02,577: root: INFO: Current backtesting datetime 2022-03-07 08:30:00-05:00 +2024-04-13 04:07:02,577: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:07:02,578: root: INFO: Current backtesting datetime 2022-03-07 09:30:00-05:00 +2024-04-13 04:07:02,578: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:07:02,579: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:02 +2024-04-13 04:07:02,579: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:02,580: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:02,581: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:02,581: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:02,581: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:04,079: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:04,080: root: INFO: Current backtesting datetime 2022-03-07 16:00:00-05:00 +2024-04-13 04:07:04,081: root: INFO: Current backtesting datetime 2022-03-08 09:30:00-05:00 +2024-04-13 04:07:04,081: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:04 +2024-04-13 04:07:04,081: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:04,082: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:04,082: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:04,083: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:04,083: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:05,229: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:05,230: root: INFO: Current backtesting datetime 2022-03-08 16:00:00-05:00 +2024-04-13 04:07:05,230: root: INFO: Current backtesting datetime 2022-03-09 09:30:00-05:00 +2024-04-13 04:07:05,230: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:05 +2024-04-13 04:07:05,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:05,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:05,232: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:05,232: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:05,232: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:07,170: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:07,171: root: INFO: Current backtesting datetime 2022-03-09 16:00:00-05:00 +2024-04-13 04:07:07,172: root: INFO: Current backtesting datetime 2022-03-10 09:30:00-05:00 +2024-04-13 04:07:07,172: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:07 +2024-04-13 04:07:07,172: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:07,173: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:07,174: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:07,174: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:07,174: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:09,232: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:09,233: root: INFO: Current backtesting datetime 2022-03-10 16:00:00-05:00 +2024-04-13 04:07:09,233: root: INFO: Current backtesting datetime 2022-03-11 09:30:00-05:00 +2024-04-13 04:07:09,234: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:09 +2024-04-13 04:07:09,234: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:09,235: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:09,235: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:09,235: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:09,235: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:11,764: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:11,764: root: INFO: Current backtesting datetime 2022-03-11 16:00:00-05:00 +2024-04-13 04:07:11,765: root: INFO: Current backtesting datetime 2022-03-12 09:30:00-05:00 +2024-04-13 04:07:11,765: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:07:11,767: root: INFO: Current backtesting datetime 2022-03-12 09:29:00-05:00 +2024-04-13 04:07:11,768: root: INFO: Current backtesting datetime 2022-03-12 09:29:00-05:00 +2024-04-13 04:07:11,768: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:07:11,769: root: INFO: Current backtesting datetime 2022-03-14 07:30:00-05:00 +2024-04-13 04:07:11,769: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:07:11,771: root: INFO: Current backtesting datetime 2022-03-14 08:30:00-05:00 +2024-04-13 04:07:11,771: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:07:11,772: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:11 +2024-04-13 04:07:11,772: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:11,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:11,773: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:11,773: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:11,773: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:13,995: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:13,996: root: INFO: Current backtesting datetime 2022-03-14 15:00:00-05:00 +2024-04-13 04:07:13,996: root: INFO: Current backtesting datetime 2022-03-15 08:30:00-05:00 +2024-04-13 04:07:13,997: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:13 +2024-04-13 04:07:13,997: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:13,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:13,998: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:13,998: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:13,999: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:15,408: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:15,409: root: INFO: Current backtesting datetime 2022-03-15 15:00:00-05:00 +2024-04-13 04:07:15,410: root: INFO: Current backtesting datetime 2022-03-16 08:30:00-05:00 +2024-04-13 04:07:15,410: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:15 +2024-04-13 04:07:15,410: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:15,411: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:15,412: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:15,412: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:15,412: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:18,049: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:18,050: root: INFO: Current backtesting datetime 2022-03-16 15:00:00-05:00 +2024-04-13 04:07:18,050: root: INFO: Current backtesting datetime 2022-03-17 08:30:00-05:00 +2024-04-13 04:07:18,050: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:18 +2024-04-13 04:07:18,051: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:18,051: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:18,052: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:18,052: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:18,052: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:19,573: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:19,574: root: INFO: Current backtesting datetime 2022-03-17 15:00:00-05:00 +2024-04-13 04:07:19,574: root: INFO: Current backtesting datetime 2022-03-18 08:30:00-05:00 +2024-04-13 04:07:19,574: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:19 +2024-04-13 04:07:19,574: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:19,575: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:19,575: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:19,576: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:19,576: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:20,147: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:20,148: root: INFO: Current backtesting datetime 2022-03-18 15:00:00-05:00 +2024-04-13 04:07:20,148: root: INFO: Current backtesting datetime 2022-03-19 08:30:00-05:00 +2024-04-13 04:07:20,149: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:07:20,150: root: INFO: Current backtesting datetime 2022-03-19 08:29:00-05:00 +2024-04-13 04:07:20,151: root: INFO: Current backtesting datetime 2022-03-19 08:29:00-05:00 +2024-04-13 04:07:20,151: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:07:20,152: root: INFO: Current backtesting datetime 2022-03-21 07:30:00-05:00 +2024-04-13 04:07:20,153: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:07:20,154: root: INFO: Current backtesting datetime 2022-03-21 08:30:00-05:00 +2024-04-13 04:07:20,154: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:07:20,155: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:20 +2024-04-13 04:07:20,155: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:20,156: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:20,156: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:20,157: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:20,157: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:20,812: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:20,813: root: INFO: Current backtesting datetime 2022-03-21 15:00:00-05:00 +2024-04-13 04:07:20,813: root: INFO: Current backtesting datetime 2022-03-22 08:30:00-05:00 +2024-04-13 04:07:20,814: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:20 +2024-04-13 04:07:20,814: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:20,814: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:20,815: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:20,815: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:20,815: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:21,557: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:21,558: root: INFO: Current backtesting datetime 2022-03-22 15:00:00-05:00 +2024-04-13 04:07:21,558: root: INFO: Current backtesting datetime 2022-03-23 08:30:00-05:00 +2024-04-13 04:07:21,558: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:21 +2024-04-13 04:07:21,559: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:21,559: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:21,560: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:21,560: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:21,560: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:24,025: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:24,026: root: INFO: Current backtesting datetime 2022-03-23 15:00:00-05:00 +2024-04-13 04:07:24,026: root: INFO: Current backtesting datetime 2022-03-24 08:30:00-05:00 +2024-04-13 04:07:24,026: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:24 +2024-04-13 04:07:24,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:24,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:24,028: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:24,028: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:24,028: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:25,437: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:25,438: root: INFO: Current backtesting datetime 2022-03-24 15:00:00-05:00 +2024-04-13 04:07:25,438: root: INFO: Current backtesting datetime 2022-03-25 08:30:00-05:00 +2024-04-13 04:07:25,438: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:25 +2024-04-13 04:07:25,439: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:25,439: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:25,440: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:25,440: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:25,440: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:28,930: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:28,931: root: INFO: Current backtesting datetime 2022-03-25 15:00:00-05:00 +2024-04-13 04:07:28,931: root: INFO: Current backtesting datetime 2022-03-26 08:30:00-05:00 +2024-04-13 04:07:28,931: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:07:28,933: root: INFO: Current backtesting datetime 2022-03-26 08:29:00-05:00 +2024-04-13 04:07:28,934: root: INFO: Current backtesting datetime 2022-03-26 08:29:00-05:00 +2024-04-13 04:07:28,934: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:07:28,935: root: INFO: Current backtesting datetime 2022-03-28 07:30:00-05:00 +2024-04-13 04:07:28,935: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:07:28,936: root: INFO: Current backtesting datetime 2022-03-28 08:30:00-05:00 +2024-04-13 04:07:28,936: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:07:28,937: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:28 +2024-04-13 04:07:28,938: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:28,938: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:28,939: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:28,939: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:28,939: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:37,446: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:37,447: root: INFO: Current backtesting datetime 2022-03-28 15:00:00-05:00 +2024-04-13 04:07:37,447: root: INFO: Current backtesting datetime 2022-03-29 08:30:00-05:00 +2024-04-13 04:07:37,447: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:37 +2024-04-13 04:07:37,448: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:37,448: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:37,449: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:37,449: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:37,449: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:48,903: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:48,904: root: INFO: Current backtesting datetime 2022-03-29 15:00:00-05:00 +2024-04-13 04:07:48,904: root: INFO: Current backtesting datetime 2022-03-30 08:30:00-05:00 +2024-04-13 04:07:48,905: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:48 +2024-04-13 04:07:48,905: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:48,906: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:48,906: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:48,907: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:48,907: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:07:53,970: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:07:53,971: root: INFO: Current backtesting datetime 2022-03-30 15:00:00-05:00 +2024-04-13 04:07:53,972: root: INFO: Current backtesting datetime 2022-03-31 08:30:00-05:00 +2024-04-13 04:07:53,972: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:07:53 +2024-04-13 04:07:53,972: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:53,973: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:07:53,973: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:07:53,974: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:07:53,974: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:00,649: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:00,650: root: INFO: Current backtesting datetime 2022-03-31 15:00:00-05:00 +2024-04-13 04:08:00,650: root: INFO: Current backtesting datetime 2022-04-01 08:30:00-05:00 +2024-04-13 04:08:00,651: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:00 +2024-04-13 04:08:00,651: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:00,652: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:00,652: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:00,653: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:00,653: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:05,441: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:05,442: root: INFO: Current backtesting datetime 2022-04-01 15:00:00-05:00 +2024-04-13 04:08:05,442: root: INFO: Current backtesting datetime 2022-04-02 08:30:00-05:00 +2024-04-13 04:08:05,443: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:08:05,444: root: INFO: Current backtesting datetime 2022-04-02 08:29:00-05:00 +2024-04-13 04:08:05,446: root: INFO: Current backtesting datetime 2022-04-02 08:29:00-05:00 +2024-04-13 04:08:05,446: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:08:05,447: root: INFO: Current backtesting datetime 2022-04-04 07:30:00-05:00 +2024-04-13 04:08:05,447: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:08:05,448: root: INFO: Current backtesting datetime 2022-04-04 08:30:00-05:00 +2024-04-13 04:08:05,448: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:08:05,449: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:05 +2024-04-13 04:08:05,449: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:05,450: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:05,450: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:05,451: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:05,451: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:10,323: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:10,324: root: INFO: Current backtesting datetime 2022-04-04 15:00:00-05:00 +2024-04-13 04:08:10,324: root: INFO: Current backtesting datetime 2022-04-05 08:30:00-05:00 +2024-04-13 04:08:10,325: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:10 +2024-04-13 04:08:10,325: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:10,326: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:10,326: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:10,326: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:10,326: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:14,100: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:14,101: root: INFO: Current backtesting datetime 2022-04-05 15:00:00-05:00 +2024-04-13 04:08:14,101: root: INFO: Current backtesting datetime 2022-04-06 08:30:00-05:00 +2024-04-13 04:08:14,102: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:14 +2024-04-13 04:08:14,102: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:14,103: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:14,103: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:14,103: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:14,104: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:15,581: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:15,582: root: INFO: Current backtesting datetime 2022-04-06 15:00:00-05:00 +2024-04-13 04:08:15,582: root: INFO: Current backtesting datetime 2022-04-07 08:30:00-05:00 +2024-04-13 04:08:15,583: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:15 +2024-04-13 04:08:15,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:15,584: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:15,584: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:15,584: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:15,584: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:19,748: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:19,749: root: INFO: Current backtesting datetime 2022-04-07 15:00:00-05:00 +2024-04-13 04:08:19,749: root: INFO: Current backtesting datetime 2022-04-08 08:30:00-05:00 +2024-04-13 04:08:19,750: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:19 +2024-04-13 04:08:19,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:19,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:19,751: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:19,751: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:19,751: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:22,512: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:22,513: root: INFO: Current backtesting datetime 2022-04-08 15:00:00-05:00 +2024-04-13 04:08:22,513: root: INFO: Current backtesting datetime 2022-04-09 08:30:00-05:00 +2024-04-13 04:08:22,514: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:08:22,515: root: INFO: Current backtesting datetime 2022-04-09 08:29:00-05:00 +2024-04-13 04:08:22,516: root: INFO: Current backtesting datetime 2022-04-09 08:29:00-05:00 +2024-04-13 04:08:22,516: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:08:22,517: root: INFO: Current backtesting datetime 2022-04-11 07:30:00-05:00 +2024-04-13 04:08:22,518: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:08:22,519: root: INFO: Current backtesting datetime 2022-04-11 08:30:00-05:00 +2024-04-13 04:08:22,519: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:08:22,520: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:22 +2024-04-13 04:08:22,520: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:22,521: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:22,521: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:22,522: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:22,522: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:25,894: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:25,895: root: INFO: Current backtesting datetime 2022-04-11 15:00:00-05:00 +2024-04-13 04:08:25,895: root: INFO: Current backtesting datetime 2022-04-12 08:30:00-05:00 +2024-04-13 04:08:25,895: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:25 +2024-04-13 04:08:25,896: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:25,896: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:25,897: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:25,897: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:25,897: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:28,813: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:28,814: root: INFO: Current backtesting datetime 2022-04-12 15:00:00-05:00 +2024-04-13 04:08:28,814: root: INFO: Current backtesting datetime 2022-04-13 08:30:00-05:00 +2024-04-13 04:08:28,815: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:28 +2024-04-13 04:08:28,815: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:28,816: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:28,816: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:28,817: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:28,817: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:30,865: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:30,866: root: INFO: Current backtesting datetime 2022-04-13 15:00:00-05:00 +2024-04-13 04:08:30,866: root: INFO: Current backtesting datetime 2022-04-14 08:30:00-05:00 +2024-04-13 04:08:30,867: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:30 +2024-04-13 04:08:30,867: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:30,868: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:30,868: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:30,868: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:30,868: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:33,364: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:33,365: root: INFO: Current backtesting datetime 2022-04-14 15:00:00-05:00 +2024-04-13 04:08:33,365: root: INFO: Current backtesting datetime 2022-04-15 08:30:00-05:00 +2024-04-13 04:08:33,365: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:08:33,367: root: INFO: Current backtesting datetime 2022-04-15 08:29:00-05:00 +2024-04-13 04:08:33,368: root: INFO: Current backtesting datetime 2022-04-15 08:29:00-05:00 +2024-04-13 04:08:33,368: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:08:33,369: root: INFO: Current backtesting datetime 2022-04-18 07:30:00-05:00 +2024-04-13 04:08:33,370: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:08:33,371: root: INFO: Current backtesting datetime 2022-04-18 08:30:00-05:00 +2024-04-13 04:08:33,371: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:08:33,372: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:33 +2024-04-13 04:08:33,372: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:33,373: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:33,373: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:33,373: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:33,373: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:36,242: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:36,243: root: INFO: Current backtesting datetime 2022-04-18 15:00:00-05:00 +2024-04-13 04:08:36,243: root: INFO: Current backtesting datetime 2022-04-19 08:30:00-05:00 +2024-04-13 04:08:36,244: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:36 +2024-04-13 04:08:36,244: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:36,244: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:36,245: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:36,245: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:36,245: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:40,548: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:40,549: root: INFO: Current backtesting datetime 2022-04-19 15:00:00-05:00 +2024-04-13 04:08:40,549: root: INFO: Current backtesting datetime 2022-04-20 08:30:00-05:00 +2024-04-13 04:08:40,550: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:40 +2024-04-13 04:08:40,550: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:40,551: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:40,551: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:40,552: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:40,552: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:45,032: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:45,033: root: INFO: Current backtesting datetime 2022-04-20 15:00:00-05:00 +2024-04-13 04:08:45,033: root: INFO: Current backtesting datetime 2022-04-21 08:30:00-05:00 +2024-04-13 04:08:45,034: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:45 +2024-04-13 04:08:45,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:45,035: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:45,035: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:45,036: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:45,036: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:49,283: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:49,283: root: INFO: Current backtesting datetime 2022-04-21 15:00:00-05:00 +2024-04-13 04:08:49,284: root: INFO: Current backtesting datetime 2022-04-22 08:30:00-05:00 +2024-04-13 04:08:49,284: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:49 +2024-04-13 04:08:49,284: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:49,285: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:49,285: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:49,286: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:49,286: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:08:55,745: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:08:55,746: root: INFO: Current backtesting datetime 2022-04-22 15:00:00-05:00 +2024-04-13 04:08:55,746: root: INFO: Current backtesting datetime 2022-04-23 08:30:00-05:00 +2024-04-13 04:08:55,746: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:08:55,748: root: INFO: Current backtesting datetime 2022-04-23 08:29:00-05:00 +2024-04-13 04:08:55,749: root: INFO: Current backtesting datetime 2022-04-23 08:29:00-05:00 +2024-04-13 04:08:55,749: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:08:55,750: root: INFO: Current backtesting datetime 2022-04-25 07:30:00-05:00 +2024-04-13 04:08:55,750: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:08:55,751: root: INFO: Current backtesting datetime 2022-04-25 08:30:00-05:00 +2024-04-13 04:08:55,751: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:08:55,752: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:08:55 +2024-04-13 04:08:55,752: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:55,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:08:55,753: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:08:55,754: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:08:55,754: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:01,873: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:01,874: root: INFO: Current backtesting datetime 2022-04-25 15:00:00-05:00 +2024-04-13 04:09:01,874: root: INFO: Current backtesting datetime 2022-04-26 08:30:00-05:00 +2024-04-13 04:09:01,875: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:01 +2024-04-13 04:09:01,875: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:01,876: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:01,876: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:01,876: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:01,876: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:05,363: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:05,364: root: INFO: Current backtesting datetime 2022-04-26 15:00:00-05:00 +2024-04-13 04:09:05,364: root: INFO: Current backtesting datetime 2022-04-27 08:30:00-05:00 +2024-04-13 04:09:05,364: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:05 +2024-04-13 04:09:05,364: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:05,365: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:05,366: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:05,366: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:05,366: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:11,229: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:11,230: root: INFO: Current backtesting datetime 2022-04-27 15:00:00-05:00 +2024-04-13 04:09:11,230: root: INFO: Current backtesting datetime 2022-04-28 08:30:00-05:00 +2024-04-13 04:09:11,231: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:11 +2024-04-13 04:09:11,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:11,232: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:11,232: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:11,232: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:11,232: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:13,745: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:13,746: root: INFO: Current backtesting datetime 2022-04-28 15:00:00-05:00 +2024-04-13 04:09:13,746: root: INFO: Current backtesting datetime 2022-04-29 08:30:00-05:00 +2024-04-13 04:09:13,747: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:13 +2024-04-13 04:09:13,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:13,748: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:13,748: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:13,749: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:13,749: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:17,622: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:17,623: root: INFO: Current backtesting datetime 2022-04-29 15:00:00-05:00 +2024-04-13 04:09:17,624: root: INFO: Current backtesting datetime 2022-04-30 08:30:00-05:00 +2024-04-13 04:09:17,624: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:09:17,626: root: INFO: Current backtesting datetime 2022-04-30 08:29:00-05:00 +2024-04-13 04:09:17,627: root: INFO: Current backtesting datetime 2022-04-30 08:29:00-05:00 +2024-04-13 04:09:17,627: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:09:17,628: root: INFO: Current backtesting datetime 2022-05-02 07:30:00-05:00 +2024-04-13 04:09:17,629: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:09:17,629: root: INFO: Current backtesting datetime 2022-05-02 08:30:00-05:00 +2024-04-13 04:09:17,630: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:09:17,631: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:17 +2024-04-13 04:09:17,631: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:17,632: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:17,632: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:17,632: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:17,632: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:21,317: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:21,318: root: INFO: Current backtesting datetime 2022-05-02 15:00:00-05:00 +2024-04-13 04:09:21,319: root: INFO: Current backtesting datetime 2022-05-03 08:30:00-05:00 +2024-04-13 04:09:21,319: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:21 +2024-04-13 04:09:21,319: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:21,320: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:21,320: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:21,321: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:21,321: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:23,692: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:23,693: root: INFO: Current backtesting datetime 2022-05-03 15:00:00-05:00 +2024-04-13 04:09:23,693: root: INFO: Current backtesting datetime 2022-05-04 08:30:00-05:00 +2024-04-13 04:09:23,693: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:23 +2024-04-13 04:09:23,693: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:23,694: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:23,695: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:23,695: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:23,695: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:27,952: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:27,953: root: INFO: Current backtesting datetime 2022-05-04 15:00:00-05:00 +2024-04-13 04:09:27,953: root: INFO: Current backtesting datetime 2022-05-05 08:30:00-05:00 +2024-04-13 04:09:27,954: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:27 +2024-04-13 04:09:27,954: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:27,955: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:27,955: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:27,955: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:27,955: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:38,139: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:38,140: root: INFO: Current backtesting datetime 2022-05-05 15:00:00-05:00 +2024-04-13 04:09:38,140: root: INFO: Current backtesting datetime 2022-05-06 08:30:00-05:00 +2024-04-13 04:09:38,140: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:38 +2024-04-13 04:09:38,140: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:38,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:38,141: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:38,142: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:38,142: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:51,314: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:51,315: root: INFO: Current backtesting datetime 2022-05-06 15:00:00-05:00 +2024-04-13 04:09:51,315: root: INFO: Current backtesting datetime 2022-05-07 08:30:00-05:00 +2024-04-13 04:09:51,315: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:09:51,317: root: INFO: Current backtesting datetime 2022-05-07 08:29:00-05:00 +2024-04-13 04:09:51,318: root: INFO: Current backtesting datetime 2022-05-07 08:29:00-05:00 +2024-04-13 04:09:51,318: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:09:51,319: root: INFO: Current backtesting datetime 2022-05-09 07:30:00-05:00 +2024-04-13 04:09:51,319: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:09:51,320: root: INFO: Current backtesting datetime 2022-05-09 08:30:00-05:00 +2024-04-13 04:09:51,320: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:09:51,321: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:51 +2024-04-13 04:09:51,322: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:51,322: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:51,323: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:51,323: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:51,323: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:54,678: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:54,678: root: INFO: Current backtesting datetime 2022-05-09 15:00:00-05:00 +2024-04-13 04:09:54,679: root: INFO: Current backtesting datetime 2022-05-10 08:30:00-05:00 +2024-04-13 04:09:54,679: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:54 +2024-04-13 04:09:54,679: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:54,680: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:54,681: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:54,681: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:54,681: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:57,835: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:57,836: root: INFO: Current backtesting datetime 2022-05-10 15:00:00-05:00 +2024-04-13 04:09:57,836: root: INFO: Current backtesting datetime 2022-05-11 08:30:00-05:00 +2024-04-13 04:09:57,836: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:57 +2024-04-13 04:09:57,837: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:57,837: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:57,839: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:57,839: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:57,839: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:09:59,679: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:09:59,680: root: INFO: Current backtesting datetime 2022-05-11 15:00:00-05:00 +2024-04-13 04:09:59,681: root: INFO: Current backtesting datetime 2022-05-12 08:30:00-05:00 +2024-04-13 04:09:59,681: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:09:59 +2024-04-13 04:09:59,681: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:59,682: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:09:59,682: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:09:59,683: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:09:59,683: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:01,654: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:01,655: root: INFO: Current backtesting datetime 2022-05-12 15:00:00-05:00 +2024-04-13 04:10:01,655: root: INFO: Current backtesting datetime 2022-05-13 08:30:00-05:00 +2024-04-13 04:10:01,655: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:01 +2024-04-13 04:10:01,656: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:01,656: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:01,657: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:01,657: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:01,657: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:02,449: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:02,450: root: INFO: Current backtesting datetime 2022-05-13 15:00:00-05:00 +2024-04-13 04:10:02,450: root: INFO: Current backtesting datetime 2022-05-14 08:30:00-05:00 +2024-04-13 04:10:02,450: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:10:02,452: root: INFO: Current backtesting datetime 2022-05-14 08:29:00-05:00 +2024-04-13 04:10:02,453: root: INFO: Current backtesting datetime 2022-05-14 08:29:00-05:00 +2024-04-13 04:10:02,453: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:10:02,454: root: INFO: Current backtesting datetime 2022-05-16 07:30:00-05:00 +2024-04-13 04:10:02,454: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:10:02,455: root: INFO: Current backtesting datetime 2022-05-16 08:30:00-05:00 +2024-04-13 04:10:02,455: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:10:02,456: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:02 +2024-04-13 04:10:02,456: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:02,457: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:02,457: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:02,458: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:02,458: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:03,852: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:03,853: root: INFO: Current backtesting datetime 2022-05-16 15:00:00-05:00 +2024-04-13 04:10:03,853: root: INFO: Current backtesting datetime 2022-05-17 08:30:00-05:00 +2024-04-13 04:10:03,854: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:03 +2024-04-13 04:10:03,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:03,855: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:03,855: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:03,855: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:03,855: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:06,180: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:06,181: root: INFO: Current backtesting datetime 2022-05-17 15:00:00-05:00 +2024-04-13 04:10:06,182: root: INFO: Current backtesting datetime 2022-05-18 08:30:00-05:00 +2024-04-13 04:10:06,182: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:06 +2024-04-13 04:10:06,182: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:06,183: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:06,183: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:06,184: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:06,184: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:09,284: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:09,285: root: INFO: Current backtesting datetime 2022-05-18 15:00:00-05:00 +2024-04-13 04:10:09,285: root: INFO: Current backtesting datetime 2022-05-19 08:30:00-05:00 +2024-04-13 04:10:09,286: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:09 +2024-04-13 04:10:09,286: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:09,286: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:09,287: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:09,287: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:09,287: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:11,177: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:11,178: root: INFO: Current backtesting datetime 2022-05-19 15:00:00-05:00 +2024-04-13 04:10:11,178: root: INFO: Current backtesting datetime 2022-05-20 08:30:00-05:00 +2024-04-13 04:10:11,178: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:11 +2024-04-13 04:10:11,178: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:11,179: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:11,180: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:11,180: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:11,180: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:13,917: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:13,918: root: INFO: Current backtesting datetime 2022-05-20 15:00:00-05:00 +2024-04-13 04:10:13,919: root: INFO: Current backtesting datetime 2022-05-21 08:30:00-05:00 +2024-04-13 04:10:13,919: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:10:13,921: root: INFO: Current backtesting datetime 2022-05-21 08:29:00-05:00 +2024-04-13 04:10:13,922: root: INFO: Current backtesting datetime 2022-05-21 08:29:00-05:00 +2024-04-13 04:10:13,922: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:10:13,922: root: INFO: Current backtesting datetime 2022-05-23 07:30:00-05:00 +2024-04-13 04:10:13,923: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:10:13,924: root: INFO: Current backtesting datetime 2022-05-23 08:30:00-05:00 +2024-04-13 04:10:13,924: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:10:13,925: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:13 +2024-04-13 04:10:13,925: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:13,926: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:13,926: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:13,926: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:13,926: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:21,334: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:21,335: root: INFO: Current backtesting datetime 2022-05-23 15:00:00-05:00 +2024-04-13 04:10:21,335: root: INFO: Current backtesting datetime 2022-05-24 08:30:00-05:00 +2024-04-13 04:10:21,336: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:21 +2024-04-13 04:10:21,336: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:21,337: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:21,337: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:21,337: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:21,337: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:25,818: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:25,819: root: INFO: Current backtesting datetime 2022-05-24 15:00:00-05:00 +2024-04-13 04:10:25,819: root: INFO: Current backtesting datetime 2022-05-25 08:30:00-05:00 +2024-04-13 04:10:25,819: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:25 +2024-04-13 04:10:25,819: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:25,820: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:25,821: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:25,821: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:25,821: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:28,496: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:28,497: root: INFO: Current backtesting datetime 2022-05-25 15:00:00-05:00 +2024-04-13 04:10:28,497: root: INFO: Current backtesting datetime 2022-05-26 08:30:00-05:00 +2024-04-13 04:10:28,497: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:28 +2024-04-13 04:10:28,497: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:28,498: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:28,498: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:28,499: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:28,499: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:29,961: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:29,962: root: INFO: Current backtesting datetime 2022-05-26 15:00:00-05:00 +2024-04-13 04:10:29,962: root: INFO: Current backtesting datetime 2022-05-27 08:30:00-05:00 +2024-04-13 04:10:29,963: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:29 +2024-04-13 04:10:29,963: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:29,964: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:29,964: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:29,964: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:29,964: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:30,681: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:30,682: root: INFO: Current backtesting datetime 2022-05-27 15:00:00-05:00 +2024-04-13 04:10:30,682: root: INFO: Current backtesting datetime 2022-05-28 08:30:00-05:00 +2024-04-13 04:10:30,683: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:10:30,684: root: INFO: Current backtesting datetime 2022-05-28 08:29:00-05:00 +2024-04-13 04:10:30,686: root: INFO: Current backtesting datetime 2022-05-28 08:29:00-05:00 +2024-04-13 04:10:30,686: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:10:30,687: root: INFO: Current backtesting datetime 2022-05-31 07:30:00-05:00 +2024-04-13 04:10:30,687: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:10:30,688: root: INFO: Current backtesting datetime 2022-05-31 08:30:00-05:00 +2024-04-13 04:10:30,688: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:10:30,689: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:30 +2024-04-13 04:10:30,689: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:30,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:30,690: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:30,691: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:30,691: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:31,386: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:31,387: root: INFO: Current backtesting datetime 2022-05-31 15:00:00-05:00 +2024-04-13 04:10:31,388: root: INFO: Current backtesting datetime 2022-06-01 08:30:00-05:00 +2024-04-13 04:10:31,388: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:31 +2024-04-13 04:10:31,388: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:31,389: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:31,389: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:31,390: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:31,390: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:31,866: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:31,867: root: INFO: Current backtesting datetime 2022-06-01 15:00:00-05:00 +2024-04-13 04:10:31,867: root: INFO: Current backtesting datetime 2022-06-02 08:30:00-05:00 +2024-04-13 04:10:31,867: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:31 +2024-04-13 04:10:31,868: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:31,868: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:31,869: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:31,869: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:31,869: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:32,387: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:32,388: root: INFO: Current backtesting datetime 2022-06-02 15:00:00-05:00 +2024-04-13 04:10:32,388: root: INFO: Current backtesting datetime 2022-06-03 08:30:00-05:00 +2024-04-13 04:10:32,389: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:32 +2024-04-13 04:10:32,389: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:32,390: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:32,390: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:32,390: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:32,390: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:32,841: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:32,842: root: INFO: Current backtesting datetime 2022-06-03 15:00:00-05:00 +2024-04-13 04:10:32,842: root: INFO: Current backtesting datetime 2022-06-04 08:30:00-05:00 +2024-04-13 04:10:32,843: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:10:32,844: root: INFO: Current backtesting datetime 2022-06-04 08:29:00-05:00 +2024-04-13 04:10:32,846: root: INFO: Current backtesting datetime 2022-06-04 08:29:00-05:00 +2024-04-13 04:10:32,846: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:10:32,846: root: INFO: Current backtesting datetime 2022-06-06 07:30:00-05:00 +2024-04-13 04:10:32,847: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:10:32,848: root: INFO: Current backtesting datetime 2022-06-06 08:30:00-05:00 +2024-04-13 04:10:32,848: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:10:32,849: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:32 +2024-04-13 04:10:32,849: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:32,850: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:32,850: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:32,851: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:32,851: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:33,422: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:33,423: root: INFO: Current backtesting datetime 2022-06-06 15:00:00-05:00 +2024-04-13 04:10:33,423: root: INFO: Current backtesting datetime 2022-06-07 08:30:00-05:00 +2024-04-13 04:10:33,423: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:33 +2024-04-13 04:10:33,424: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:33,424: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:33,425: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:33,425: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:33,425: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:33,906: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:33,907: root: INFO: Current backtesting datetime 2022-06-07 15:00:00-05:00 +2024-04-13 04:10:33,907: root: INFO: Current backtesting datetime 2022-06-08 08:30:00-05:00 +2024-04-13 04:10:33,908: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:33 +2024-04-13 04:10:33,908: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:33,909: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:33,909: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:33,910: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:33,910: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:34,363: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:34,364: root: INFO: Current backtesting datetime 2022-06-08 15:00:00-05:00 +2024-04-13 04:10:34,365: root: INFO: Current backtesting datetime 2022-06-09 08:30:00-05:00 +2024-04-13 04:10:34,365: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:34 +2024-04-13 04:10:34,365: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:34,366: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:34,366: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:34,367: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:34,367: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:34,854: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:34,854: root: INFO: Current backtesting datetime 2022-06-09 15:00:00-05:00 +2024-04-13 04:10:34,855: root: INFO: Current backtesting datetime 2022-06-10 08:30:00-05:00 +2024-04-13 04:10:34,855: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:34 +2024-04-13 04:10:34,855: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:34,856: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:34,856: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:34,857: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:34,857: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:35,290: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:35,291: root: INFO: Current backtesting datetime 2022-06-10 15:00:00-05:00 +2024-04-13 04:10:35,292: root: INFO: Current backtesting datetime 2022-06-11 08:30:00-05:00 +2024-04-13 04:10:35,292: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:10:35,294: root: INFO: Current backtesting datetime 2022-06-11 08:29:00-05:00 +2024-04-13 04:10:35,294: root: INFO: Current backtesting datetime 2022-06-11 08:29:00-05:00 +2024-04-13 04:10:35,294: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:10:35,295: root: INFO: Current backtesting datetime 2022-06-13 07:30:00-05:00 +2024-04-13 04:10:35,295: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:10:35,297: root: INFO: Current backtesting datetime 2022-06-13 08:30:00-05:00 +2024-04-13 04:10:35,297: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:10:35,298: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:35 +2024-04-13 04:10:35,298: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:35,299: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:35,299: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:35,299: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:35,300: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:35,727: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:35,728: root: INFO: Current backtesting datetime 2022-06-13 15:00:00-05:00 +2024-04-13 04:10:35,728: root: INFO: Current backtesting datetime 2022-06-14 08:30:00-05:00 +2024-04-13 04:10:35,729: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:35 +2024-04-13 04:10:35,729: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:35,730: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:35,730: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:35,731: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:35,731: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:35,999: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:35,999: root: INFO: Current backtesting datetime 2022-06-14 15:00:00-05:00 +2024-04-13 04:10:36,000: root: INFO: Current backtesting datetime 2022-06-15 08:30:00-05:00 +2024-04-13 04:10:36,000: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:36 +2024-04-13 04:10:36,000: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:36,001: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:36,002: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:36,002: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:36,002: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:36,845: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:36,846: root: INFO: Current backtesting datetime 2022-06-15 15:00:00-05:00 +2024-04-13 04:10:36,846: root: INFO: Current backtesting datetime 2022-06-16 08:30:00-05:00 +2024-04-13 04:10:36,847: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:36 +2024-04-13 04:10:36,847: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:36,848: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:36,848: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:36,849: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:36,849: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:38,683: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:38,684: root: INFO: Current backtesting datetime 2022-06-16 15:00:00-05:00 +2024-04-13 04:10:38,684: root: INFO: Current backtesting datetime 2022-06-17 08:30:00-05:00 +2024-04-13 04:10:38,685: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:38 +2024-04-13 04:10:38,685: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:38,686: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:38,686: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:38,687: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:38,687: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:40,738: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:40,739: root: INFO: Current backtesting datetime 2022-06-17 15:00:00-05:00 +2024-04-13 04:10:40,739: root: INFO: Current backtesting datetime 2022-06-18 08:30:00-05:00 +2024-04-13 04:10:40,740: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:10:40,741: root: INFO: Current backtesting datetime 2022-06-18 08:29:00-05:00 +2024-04-13 04:10:40,743: root: INFO: Current backtesting datetime 2022-06-18 08:29:00-05:00 +2024-04-13 04:10:40,743: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:10:40,743: root: INFO: Current backtesting datetime 2022-06-21 07:30:00-05:00 +2024-04-13 04:10:40,744: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:10:40,745: root: INFO: Current backtesting datetime 2022-06-21 08:30:00-05:00 +2024-04-13 04:10:40,745: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:10:40,746: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:40 +2024-04-13 04:10:40,746: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:40,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:40,747: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:40,748: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:40,748: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:42,960: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:42,961: root: INFO: Current backtesting datetime 2022-06-21 15:00:00-05:00 +2024-04-13 04:10:42,961: root: INFO: Current backtesting datetime 2022-06-22 08:30:00-05:00 +2024-04-13 04:10:42,962: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:42 +2024-04-13 04:10:42,962: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:42,963: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:42,963: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:42,964: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:42,964: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:45,679: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:45,680: root: INFO: Current backtesting datetime 2022-06-22 15:00:00-05:00 +2024-04-13 04:10:45,681: root: INFO: Current backtesting datetime 2022-06-23 08:30:00-05:00 +2024-04-13 04:10:45,681: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:45 +2024-04-13 04:10:45,681: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:45,682: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:45,682: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:45,683: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:45,683: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:47,539: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:47,540: root: INFO: Current backtesting datetime 2022-06-23 15:00:00-05:00 +2024-04-13 04:10:47,540: root: INFO: Current backtesting datetime 2022-06-24 08:30:00-05:00 +2024-04-13 04:10:47,541: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:47 +2024-04-13 04:10:47,541: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:47,541: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:47,542: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:47,542: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:47,542: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:50,310: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:50,311: root: INFO: Current backtesting datetime 2022-06-24 15:00:00-05:00 +2024-04-13 04:10:50,312: root: INFO: Current backtesting datetime 2022-06-25 08:30:00-05:00 +2024-04-13 04:10:50,312: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:10:50,314: root: INFO: Current backtesting datetime 2022-06-25 08:29:00-05:00 +2024-04-13 04:10:50,315: root: INFO: Current backtesting datetime 2022-06-25 08:29:00-05:00 +2024-04-13 04:10:50,315: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:10:50,315: root: INFO: Current backtesting datetime 2022-06-27 07:30:00-05:00 +2024-04-13 04:10:50,316: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:10:50,317: root: INFO: Current backtesting datetime 2022-06-27 08:30:00-05:00 +2024-04-13 04:10:50,317: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:10:50,318: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:50 +2024-04-13 04:10:50,318: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:50,319: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:50,319: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:50,319: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:50,320: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:53,038: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:53,039: root: INFO: Current backtesting datetime 2022-06-27 15:00:00-05:00 +2024-04-13 04:10:53,039: root: INFO: Current backtesting datetime 2022-06-28 08:30:00-05:00 +2024-04-13 04:10:53,040: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:53 +2024-04-13 04:10:53,040: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:53,041: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:53,041: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:53,041: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:53,041: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:55,481: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:55,482: root: INFO: Current backtesting datetime 2022-06-28 15:00:00-05:00 +2024-04-13 04:10:55,482: root: INFO: Current backtesting datetime 2022-06-29 08:30:00-05:00 +2024-04-13 04:10:55,483: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:55 +2024-04-13 04:10:55,483: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:55,484: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:55,484: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:55,484: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:55,485: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:10:57,682: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:10:57,683: root: INFO: Current backtesting datetime 2022-06-29 15:00:00-05:00 +2024-04-13 04:10:57,683: root: INFO: Current backtesting datetime 2022-06-30 08:30:00-05:00 +2024-04-13 04:10:57,683: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:10:57 +2024-04-13 04:10:57,684: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:57,684: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:10:57,685: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:10:57,685: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:10:57,685: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:01,591: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:01,591: root: INFO: Current backtesting datetime 2022-06-30 15:00:00-05:00 +2024-04-13 04:11:01,592: root: INFO: Current backtesting datetime 2022-07-01 08:30:00-05:00 +2024-04-13 04:11:01,592: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:01 +2024-04-13 04:11:01,592: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:01,593: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:01,593: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:01,594: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:01,594: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:02,764: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:02,765: root: INFO: Current backtesting datetime 2022-07-01 15:00:00-05:00 +2024-04-13 04:11:02,766: root: INFO: Current backtesting datetime 2022-07-02 08:30:00-05:00 +2024-04-13 04:11:02,766: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:02,768: root: INFO: Current backtesting datetime 2022-07-02 08:29:00-05:00 +2024-04-13 04:11:02,769: root: INFO: Current backtesting datetime 2022-07-02 08:29:00-05:00 +2024-04-13 04:11:02,769: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:02,770: root: INFO: Current backtesting datetime 2022-07-05 07:30:00-05:00 +2024-04-13 04:11:02,771: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:02,771: root: INFO: Current backtesting datetime 2022-07-05 08:30:00-05:00 +2024-04-13 04:11:02,771: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:02,773: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:02 +2024-04-13 04:11:02,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:02,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:02,774: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:02,774: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:02,774: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:04,228: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:04,230: root: INFO: Current backtesting datetime 2022-07-05 15:00:00-05:00 +2024-04-13 04:11:04,230: root: INFO: Current backtesting datetime 2022-07-06 08:30:00-05:00 +2024-04-13 04:11:04,231: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:04 +2024-04-13 04:11:04,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:04,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:04,232: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:04,232: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:04,232: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:05,402: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:05,403: root: INFO: Current backtesting datetime 2022-07-06 15:00:00-05:00 +2024-04-13 04:11:05,403: root: INFO: Current backtesting datetime 2022-07-07 08:30:00-05:00 +2024-04-13 04:11:05,404: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:05 +2024-04-13 04:11:05,404: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:05,404: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:05,405: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:05,405: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:05,405: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:07,356: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:07,357: root: INFO: Current backtesting datetime 2022-07-07 15:00:00-05:00 +2024-04-13 04:11:07,358: root: INFO: Current backtesting datetime 2022-07-08 08:30:00-05:00 +2024-04-13 04:11:07,358: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:07 +2024-04-13 04:11:07,358: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:07,359: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:07,359: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:07,360: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:07,360: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:08,758: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:08,759: root: INFO: Current backtesting datetime 2022-07-08 15:00:00-05:00 +2024-04-13 04:11:08,760: root: INFO: Current backtesting datetime 2022-07-09 08:30:00-05:00 +2024-04-13 04:11:08,760: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:08,762: root: INFO: Current backtesting datetime 2022-07-09 08:29:00-05:00 +2024-04-13 04:11:08,763: root: INFO: Current backtesting datetime 2022-07-09 08:29:00-05:00 +2024-04-13 04:11:08,763: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:08,764: root: INFO: Current backtesting datetime 2022-07-11 07:30:00-05:00 +2024-04-13 04:11:08,765: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:08,765: root: INFO: Current backtesting datetime 2022-07-11 08:30:00-05:00 +2024-04-13 04:11:08,766: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:08,767: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:08 +2024-04-13 04:11:08,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:08,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:08,768: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:08,768: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:08,768: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:09,793: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:09,794: root: INFO: Current backtesting datetime 2022-07-11 15:00:00-05:00 +2024-04-13 04:11:09,795: root: INFO: Current backtesting datetime 2022-07-12 08:30:00-05:00 +2024-04-13 04:11:09,795: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:09 +2024-04-13 04:11:09,795: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:09,796: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:09,796: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:09,797: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:09,797: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:11,315: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:11,316: root: INFO: Current backtesting datetime 2022-07-12 15:00:00-05:00 +2024-04-13 04:11:11,316: root: INFO: Current backtesting datetime 2022-07-13 08:30:00-05:00 +2024-04-13 04:11:11,317: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:11 +2024-04-13 04:11:11,317: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:11,318: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:11,318: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:11,318: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:11,319: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:12,393: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:12,394: root: INFO: Current backtesting datetime 2022-07-13 15:00:00-05:00 +2024-04-13 04:11:12,394: root: INFO: Current backtesting datetime 2022-07-14 08:30:00-05:00 +2024-04-13 04:11:12,394: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:12 +2024-04-13 04:11:12,394: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:12,395: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:12,396: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:12,396: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:12,396: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:13,451: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:13,452: root: INFO: Current backtesting datetime 2022-07-14 15:00:00-05:00 +2024-04-13 04:11:13,452: root: INFO: Current backtesting datetime 2022-07-15 08:30:00-05:00 +2024-04-13 04:11:13,452: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:13 +2024-04-13 04:11:13,453: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:13,453: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:13,454: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:13,454: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:13,454: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:15,007: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:15,008: root: INFO: Current backtesting datetime 2022-07-15 15:00:00-05:00 +2024-04-13 04:11:15,009: root: INFO: Current backtesting datetime 2022-07-16 08:30:00-05:00 +2024-04-13 04:11:15,009: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:15,011: root: INFO: Current backtesting datetime 2022-07-16 08:29:00-05:00 +2024-04-13 04:11:15,012: root: INFO: Current backtesting datetime 2022-07-16 08:29:00-05:00 +2024-04-13 04:11:15,012: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:15,013: root: INFO: Current backtesting datetime 2022-07-18 07:30:00-05:00 +2024-04-13 04:11:15,013: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:15,014: root: INFO: Current backtesting datetime 2022-07-18 08:30:00-05:00 +2024-04-13 04:11:15,014: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:15,015: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:15 +2024-04-13 04:11:15,015: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:15,016: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:15,016: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:15,017: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:15,017: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:16,181: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:16,182: root: INFO: Current backtesting datetime 2022-07-18 15:00:00-05:00 +2024-04-13 04:11:16,182: root: INFO: Current backtesting datetime 2022-07-19 08:30:00-05:00 +2024-04-13 04:11:16,182: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:16 +2024-04-13 04:11:16,182: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:16,183: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:16,183: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:16,184: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:16,184: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:17,265: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:17,266: root: INFO: Current backtesting datetime 2022-07-19 15:00:00-05:00 +2024-04-13 04:11:17,267: root: INFO: Current backtesting datetime 2022-07-20 08:30:00-05:00 +2024-04-13 04:11:17,267: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:17 +2024-04-13 04:11:17,267: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:17,268: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:17,268: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:17,269: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:17,269: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:18,252: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:18,253: root: INFO: Current backtesting datetime 2022-07-20 15:00:00-05:00 +2024-04-13 04:11:18,253: root: INFO: Current backtesting datetime 2022-07-21 08:30:00-05:00 +2024-04-13 04:11:18,254: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:18 +2024-04-13 04:11:18,254: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:18,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:18,255: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:18,256: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:18,256: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:19,523: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:19,524: root: INFO: Current backtesting datetime 2022-07-21 15:00:00-05:00 +2024-04-13 04:11:19,525: root: INFO: Current backtesting datetime 2022-07-22 08:30:00-05:00 +2024-04-13 04:11:19,525: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:19 +2024-04-13 04:11:19,525: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:19,526: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:19,526: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:19,527: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:19,527: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:20,747: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:20,748: root: INFO: Current backtesting datetime 2022-07-22 15:00:00-05:00 +2024-04-13 04:11:20,748: root: INFO: Current backtesting datetime 2022-07-23 08:30:00-05:00 +2024-04-13 04:11:20,749: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:20,751: root: INFO: Current backtesting datetime 2022-07-23 08:29:00-05:00 +2024-04-13 04:11:20,752: root: INFO: Current backtesting datetime 2022-07-23 08:29:00-05:00 +2024-04-13 04:11:20,752: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:20,753: root: INFO: Current backtesting datetime 2022-07-25 07:30:00-05:00 +2024-04-13 04:11:20,753: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:20,754: root: INFO: Current backtesting datetime 2022-07-25 08:30:00-05:00 +2024-04-13 04:11:20,754: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:20,755: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:20 +2024-04-13 04:11:20,755: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:20,755: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:20,755: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:20,756: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:20,756: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:22,057: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:22,059: root: INFO: Current backtesting datetime 2022-07-25 15:00:00-05:00 +2024-04-13 04:11:22,059: root: INFO: Current backtesting datetime 2022-07-26 08:30:00-05:00 +2024-04-13 04:11:22,059: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:22 +2024-04-13 04:11:22,060: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:22,060: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:22,061: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:22,061: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:22,061: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:24,254: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:24,255: root: INFO: Current backtesting datetime 2022-07-26 15:00:00-05:00 +2024-04-13 04:11:24,255: root: INFO: Current backtesting datetime 2022-07-27 08:30:00-05:00 +2024-04-13 04:11:24,256: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:24 +2024-04-13 04:11:24,256: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:24,257: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:24,257: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:24,257: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:24,257: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:26,127: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:26,127: root: INFO: Current backtesting datetime 2022-07-27 15:00:00-05:00 +2024-04-13 04:11:26,128: root: INFO: Current backtesting datetime 2022-07-28 08:30:00-05:00 +2024-04-13 04:11:26,128: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:26 +2024-04-13 04:11:26,128: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:26,129: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:26,129: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:26,130: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:26,130: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:27,345: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:27,346: root: INFO: Current backtesting datetime 2022-07-28 15:00:00-05:00 +2024-04-13 04:11:27,346: root: INFO: Current backtesting datetime 2022-07-29 08:30:00-05:00 +2024-04-13 04:11:27,347: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:27 +2024-04-13 04:11:27,347: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:27,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:27,348: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:27,348: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:27,348: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:28,583: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:28,584: root: INFO: Current backtesting datetime 2022-07-29 15:00:00-05:00 +2024-04-13 04:11:28,584: root: INFO: Current backtesting datetime 2022-07-30 08:30:00-05:00 +2024-04-13 04:11:28,585: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:28,586: root: INFO: Current backtesting datetime 2022-07-30 08:29:00-05:00 +2024-04-13 04:11:28,587: root: INFO: Current backtesting datetime 2022-07-30 08:29:00-05:00 +2024-04-13 04:11:28,587: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:28,588: root: INFO: Current backtesting datetime 2022-08-01 07:30:00-05:00 +2024-04-13 04:11:28,589: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:28,590: root: INFO: Current backtesting datetime 2022-08-01 08:30:00-05:00 +2024-04-13 04:11:28,590: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:28,591: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:28 +2024-04-13 04:11:28,591: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:28,592: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:28,592: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:28,592: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:28,592: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:29,580: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:29,581: root: INFO: Current backtesting datetime 2022-08-01 15:00:00-05:00 +2024-04-13 04:11:29,581: root: INFO: Current backtesting datetime 2022-08-02 08:30:00-05:00 +2024-04-13 04:11:29,582: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:29 +2024-04-13 04:11:29,582: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:29,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:29,583: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:29,583: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:29,583: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:30,734: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:30,735: root: INFO: Current backtesting datetime 2022-08-02 15:00:00-05:00 +2024-04-13 04:11:30,735: root: INFO: Current backtesting datetime 2022-08-03 08:30:00-05:00 +2024-04-13 04:11:30,736: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:30 +2024-04-13 04:11:30,736: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:30,737: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:30,737: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:30,737: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:30,737: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:32,130: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:32,131: root: INFO: Current backtesting datetime 2022-08-03 15:00:00-05:00 +2024-04-13 04:11:32,132: root: INFO: Current backtesting datetime 2022-08-04 08:30:00-05:00 +2024-04-13 04:11:32,132: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:32 +2024-04-13 04:11:32,132: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:32,133: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:32,133: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:32,134: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:32,134: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:33,438: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:33,439: root: INFO: Current backtesting datetime 2022-08-04 15:00:00-05:00 +2024-04-13 04:11:33,439: root: INFO: Current backtesting datetime 2022-08-05 08:30:00-05:00 +2024-04-13 04:11:33,440: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:33 +2024-04-13 04:11:33,440: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:33,440: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:33,441: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:33,441: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:33,441: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:34,854: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:34,855: root: INFO: Current backtesting datetime 2022-08-05 15:00:00-05:00 +2024-04-13 04:11:34,856: root: INFO: Current backtesting datetime 2022-08-06 08:30:00-05:00 +2024-04-13 04:11:34,856: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:34,858: root: INFO: Current backtesting datetime 2022-08-06 08:29:00-05:00 +2024-04-13 04:11:34,859: root: INFO: Current backtesting datetime 2022-08-06 08:29:00-05:00 +2024-04-13 04:11:34,859: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:34,860: root: INFO: Current backtesting datetime 2022-08-08 07:30:00-05:00 +2024-04-13 04:11:34,860: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:34,861: root: INFO: Current backtesting datetime 2022-08-08 08:30:00-05:00 +2024-04-13 04:11:34,861: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:34,862: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:34 +2024-04-13 04:11:34,862: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:34,863: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:34,863: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:34,864: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:34,864: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:36,160: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:36,161: root: INFO: Current backtesting datetime 2022-08-08 15:00:00-05:00 +2024-04-13 04:11:36,161: root: INFO: Current backtesting datetime 2022-08-09 08:30:00-05:00 +2024-04-13 04:11:36,162: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:36 +2024-04-13 04:11:36,162: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:36,163: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:36,163: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:36,164: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:36,164: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:37,054: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:37,055: root: INFO: Current backtesting datetime 2022-08-09 15:00:00-05:00 +2024-04-13 04:11:37,056: root: INFO: Current backtesting datetime 2022-08-10 08:30:00-05:00 +2024-04-13 04:11:37,056: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:37 +2024-04-13 04:11:37,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:37,057: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:37,057: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:37,058: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:37,058: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:37,968: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:37,969: root: INFO: Current backtesting datetime 2022-08-10 15:00:00-05:00 +2024-04-13 04:11:37,969: root: INFO: Current backtesting datetime 2022-08-11 08:30:00-05:00 +2024-04-13 04:11:37,969: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:37 +2024-04-13 04:11:37,969: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:37,970: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:37,970: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:37,971: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:37,971: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:38,564: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:38,565: root: INFO: Current backtesting datetime 2022-08-11 15:00:00-05:00 +2024-04-13 04:11:38,565: root: INFO: Current backtesting datetime 2022-08-12 08:30:00-05:00 +2024-04-13 04:11:38,566: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:38 +2024-04-13 04:11:38,566: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:38,566: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:38,567: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:38,567: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:38,567: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:39,114: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:39,115: root: INFO: Current backtesting datetime 2022-08-12 15:00:00-05:00 +2024-04-13 04:11:39,115: root: INFO: Current backtesting datetime 2022-08-13 08:30:00-05:00 +2024-04-13 04:11:39,116: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:39,117: root: INFO: Current backtesting datetime 2022-08-13 08:29:00-05:00 +2024-04-13 04:11:39,119: root: INFO: Current backtesting datetime 2022-08-13 08:29:00-05:00 +2024-04-13 04:11:39,119: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:39,120: root: INFO: Current backtesting datetime 2022-08-15 07:30:00-05:00 +2024-04-13 04:11:39,120: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:39,121: root: INFO: Current backtesting datetime 2022-08-15 08:30:00-05:00 +2024-04-13 04:11:39,121: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:39,122: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:39 +2024-04-13 04:11:39,122: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:39,123: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:39,123: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:39,124: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:39,124: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:39,779: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:39,780: root: INFO: Current backtesting datetime 2022-08-15 15:00:00-05:00 +2024-04-13 04:11:39,780: root: INFO: Current backtesting datetime 2022-08-16 08:30:00-05:00 +2024-04-13 04:11:39,781: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:39 +2024-04-13 04:11:39,781: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:39,782: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:39,782: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:39,782: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:39,782: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:40,105: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:40,105: root: INFO: Current backtesting datetime 2022-08-16 15:00:00-05:00 +2024-04-13 04:11:40,106: root: INFO: Current backtesting datetime 2022-08-17 08:30:00-05:00 +2024-04-13 04:11:40,106: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:40 +2024-04-13 04:11:40,106: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:40,107: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:40,107: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:40,108: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:40,108: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:40,748: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:40,749: root: INFO: Current backtesting datetime 2022-08-17 15:00:00-05:00 +2024-04-13 04:11:40,749: root: INFO: Current backtesting datetime 2022-08-18 08:30:00-05:00 +2024-04-13 04:11:40,750: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:40 +2024-04-13 04:11:40,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:40,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:40,751: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:40,751: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:40,751: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:41,065: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:41,066: root: INFO: Current backtesting datetime 2022-08-18 15:00:00-05:00 +2024-04-13 04:11:41,066: root: INFO: Current backtesting datetime 2022-08-19 08:30:00-05:00 +2024-04-13 04:11:41,067: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:41 +2024-04-13 04:11:41,067: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:41,067: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:41,068: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:41,068: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:41,068: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:41,725: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:41,726: root: INFO: Current backtesting datetime 2022-08-19 15:00:00-05:00 +2024-04-13 04:11:41,727: root: INFO: Current backtesting datetime 2022-08-20 08:30:00-05:00 +2024-04-13 04:11:41,727: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:41,729: root: INFO: Current backtesting datetime 2022-08-20 08:29:00-05:00 +2024-04-13 04:11:41,730: root: INFO: Current backtesting datetime 2022-08-20 08:29:00-05:00 +2024-04-13 04:11:41,730: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:41,731: root: INFO: Current backtesting datetime 2022-08-22 07:30:00-05:00 +2024-04-13 04:11:41,731: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:41,732: root: INFO: Current backtesting datetime 2022-08-22 08:30:00-05:00 +2024-04-13 04:11:41,732: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:41,733: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:41 +2024-04-13 04:11:41,733: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:41,734: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:41,734: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:41,735: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:41,735: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:42,056: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:42,057: root: INFO: Current backtesting datetime 2022-08-22 15:00:00-05:00 +2024-04-13 04:11:42,058: root: INFO: Current backtesting datetime 2022-08-23 08:30:00-05:00 +2024-04-13 04:11:42,058: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:42 +2024-04-13 04:11:42,058: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:42,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:42,059: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:42,060: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:42,060: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:42,748: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:42,749: root: INFO: Current backtesting datetime 2022-08-23 15:00:00-05:00 +2024-04-13 04:11:42,750: root: INFO: Current backtesting datetime 2022-08-24 08:30:00-05:00 +2024-04-13 04:11:42,750: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:42 +2024-04-13 04:11:42,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:42,751: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:42,751: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:42,752: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:42,752: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:43,025: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:43,026: root: INFO: Current backtesting datetime 2022-08-24 15:00:00-05:00 +2024-04-13 04:11:43,027: root: INFO: Current backtesting datetime 2022-08-25 08:30:00-05:00 +2024-04-13 04:11:43,027: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:43 +2024-04-13 04:11:43,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:43,028: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:43,029: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:43,029: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:43,029: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:43,740: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:43,741: root: INFO: Current backtesting datetime 2022-08-25 15:00:00-05:00 +2024-04-13 04:11:43,741: root: INFO: Current backtesting datetime 2022-08-26 08:30:00-05:00 +2024-04-13 04:11:43,742: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:43 +2024-04-13 04:11:43,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:43,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:43,743: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:43,744: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:43,744: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:44,009: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:44,010: root: INFO: Current backtesting datetime 2022-08-26 15:00:00-05:00 +2024-04-13 04:11:44,010: root: INFO: Current backtesting datetime 2022-08-27 08:30:00-05:00 +2024-04-13 04:11:44,011: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:44,012: root: INFO: Current backtesting datetime 2022-08-27 08:29:00-05:00 +2024-04-13 04:11:44,013: root: INFO: Current backtesting datetime 2022-08-27 08:29:00-05:00 +2024-04-13 04:11:44,013: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:44,014: root: INFO: Current backtesting datetime 2022-08-29 07:30:00-05:00 +2024-04-13 04:11:44,015: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:44,015: root: INFO: Current backtesting datetime 2022-08-29 08:30:00-05:00 +2024-04-13 04:11:44,015: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:44,017: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:44 +2024-04-13 04:11:44,017: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:44,017: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:44,018: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:44,018: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:44,018: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:44,702: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:44,703: root: INFO: Current backtesting datetime 2022-08-29 15:00:00-05:00 +2024-04-13 04:11:44,703: root: INFO: Current backtesting datetime 2022-08-30 08:30:00-05:00 +2024-04-13 04:11:44,703: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:44 +2024-04-13 04:11:44,704: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:44,704: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:44,705: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:44,705: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:44,705: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:44,966: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:44,967: root: INFO: Current backtesting datetime 2022-08-30 15:00:00-05:00 +2024-04-13 04:11:44,967: root: INFO: Current backtesting datetime 2022-08-31 08:30:00-05:00 +2024-04-13 04:11:44,967: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:44 +2024-04-13 04:11:44,967: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:44,968: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:44,968: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:44,969: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:44,969: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:45,495: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:45,496: root: INFO: Current backtesting datetime 2022-08-31 15:00:00-05:00 +2024-04-13 04:11:45,497: root: INFO: Current backtesting datetime 2022-09-01 08:30:00-05:00 +2024-04-13 04:11:45,497: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:45 +2024-04-13 04:11:45,497: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:45,498: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:45,498: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:45,499: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:45,499: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:45,916: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:45,917: root: INFO: Current backtesting datetime 2022-09-01 15:00:00-05:00 +2024-04-13 04:11:45,918: root: INFO: Current backtesting datetime 2022-09-02 08:30:00-05:00 +2024-04-13 04:11:45,918: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:45 +2024-04-13 04:11:45,918: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:45,919: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:45,919: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:45,920: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:45,920: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:46,340: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:46,341: root: INFO: Current backtesting datetime 2022-09-02 15:00:00-05:00 +2024-04-13 04:11:46,341: root: INFO: Current backtesting datetime 2022-09-03 08:30:00-05:00 +2024-04-13 04:11:46,342: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:46,343: root: INFO: Current backtesting datetime 2022-09-03 08:29:00-05:00 +2024-04-13 04:11:46,344: root: INFO: Current backtesting datetime 2022-09-03 08:29:00-05:00 +2024-04-13 04:11:46,345: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:46,345: root: INFO: Current backtesting datetime 2022-09-06 07:30:00-05:00 +2024-04-13 04:11:46,346: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:46,347: root: INFO: Current backtesting datetime 2022-09-06 08:30:00-05:00 +2024-04-13 04:11:46,347: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:46,348: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:46 +2024-04-13 04:11:46,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:46,349: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:46,349: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:46,349: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:46,350: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:46,807: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:46,808: root: INFO: Current backtesting datetime 2022-09-06 15:00:00-05:00 +2024-04-13 04:11:46,808: root: INFO: Current backtesting datetime 2022-09-07 08:30:00-05:00 +2024-04-13 04:11:46,809: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:46 +2024-04-13 04:11:46,809: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:46,810: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:46,810: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:46,810: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:46,810: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:47,054: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:47,055: root: INFO: Current backtesting datetime 2022-09-07 15:00:00-05:00 +2024-04-13 04:11:47,055: root: INFO: Current backtesting datetime 2022-09-08 08:30:00-05:00 +2024-04-13 04:11:47,055: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:47 +2024-04-13 04:11:47,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:47,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:47,057: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:47,057: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:47,057: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:47,717: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:47,718: root: INFO: Current backtesting datetime 2022-09-08 15:00:00-05:00 +2024-04-13 04:11:47,719: root: INFO: Current backtesting datetime 2022-09-09 08:30:00-05:00 +2024-04-13 04:11:47,719: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:47 +2024-04-13 04:11:47,719: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:47,720: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:47,720: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:47,721: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:47,721: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:48,037: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:48,038: root: INFO: Current backtesting datetime 2022-09-09 15:00:00-05:00 +2024-04-13 04:11:48,039: root: INFO: Current backtesting datetime 2022-09-10 08:30:00-05:00 +2024-04-13 04:11:48,039: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:11:48,041: root: INFO: Current backtesting datetime 2022-09-10 08:29:00-05:00 +2024-04-13 04:11:48,042: root: INFO: Current backtesting datetime 2022-09-10 08:29:00-05:00 +2024-04-13 04:11:48,042: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:11:48,043: root: INFO: Current backtesting datetime 2022-09-12 07:30:00-05:00 +2024-04-13 04:11:48,043: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:11:48,044: root: INFO: Current backtesting datetime 2022-09-12 08:30:00-05:00 +2024-04-13 04:11:48,044: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:11:48,045: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:48 +2024-04-13 04:11:48,045: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:48,046: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:48,046: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:48,047: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:48,047: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:49,927: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:49,928: root: INFO: Current backtesting datetime 2022-09-12 15:00:00-05:00 +2024-04-13 04:11:49,928: root: INFO: Current backtesting datetime 2022-09-13 08:30:00-05:00 +2024-04-13 04:11:49,928: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:49 +2024-04-13 04:11:49,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:49,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:49,930: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:49,930: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:49,930: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:52,535: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:52,536: root: INFO: Current backtesting datetime 2022-09-13 15:00:00-05:00 +2024-04-13 04:11:52,537: root: INFO: Current backtesting datetime 2022-09-14 08:30:00-05:00 +2024-04-13 04:11:52,537: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:52 +2024-04-13 04:11:52,537: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:52,538: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:52,538: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:52,539: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:52,539: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:55,668: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:55,669: root: INFO: Current backtesting datetime 2022-09-14 15:00:00-05:00 +2024-04-13 04:11:55,669: root: INFO: Current backtesting datetime 2022-09-15 08:30:00-05:00 +2024-04-13 04:11:55,670: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:55 +2024-04-13 04:11:55,670: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:55,671: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:55,671: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:55,671: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:55,672: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:11:59,136: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:11:59,137: root: INFO: Current backtesting datetime 2022-09-15 15:00:00-05:00 +2024-04-13 04:11:59,137: root: INFO: Current backtesting datetime 2022-09-16 08:30:00-05:00 +2024-04-13 04:11:59,138: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:11:59 +2024-04-13 04:11:59,138: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:59,139: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:11:59,139: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:11:59,139: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:11:59,139: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:01,680: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:01,681: root: INFO: Current backtesting datetime 2022-09-16 15:00:00-05:00 +2024-04-13 04:12:01,681: root: INFO: Current backtesting datetime 2022-09-17 08:30:00-05:00 +2024-04-13 04:12:01,681: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:12:01,683: root: INFO: Current backtesting datetime 2022-09-17 08:29:00-05:00 +2024-04-13 04:12:01,684: root: INFO: Current backtesting datetime 2022-09-17 08:29:00-05:00 +2024-04-13 04:12:01,684: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:12:01,685: root: INFO: Current backtesting datetime 2022-09-19 07:30:00-05:00 +2024-04-13 04:12:01,685: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:12:01,686: root: INFO: Current backtesting datetime 2022-09-19 08:30:00-05:00 +2024-04-13 04:12:01,686: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:12:01,687: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:01 +2024-04-13 04:12:01,687: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:01,688: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:01,688: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:01,689: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:01,689: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:04,330: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:04,331: root: INFO: Current backtesting datetime 2022-09-19 15:00:00-05:00 +2024-04-13 04:12:04,331: root: INFO: Current backtesting datetime 2022-09-20 08:30:00-05:00 +2024-04-13 04:12:04,332: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:04 +2024-04-13 04:12:04,332: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:04,332: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:04,333: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:04,333: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:04,333: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:06,772: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:06,773: root: INFO: Current backtesting datetime 2022-09-20 15:00:00-05:00 +2024-04-13 04:12:06,774: root: INFO: Current backtesting datetime 2022-09-21 08:30:00-05:00 +2024-04-13 04:12:06,774: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:06 +2024-04-13 04:12:06,774: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:06,775: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:06,775: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:06,776: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:06,776: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:09,645: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:09,646: root: INFO: Current backtesting datetime 2022-09-21 15:00:00-05:00 +2024-04-13 04:12:09,646: root: INFO: Current backtesting datetime 2022-09-22 08:30:00-05:00 +2024-04-13 04:12:09,647: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:09 +2024-04-13 04:12:09,647: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:09,647: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:09,648: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:09,648: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:09,648: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:11,397: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:11,398: root: INFO: Current backtesting datetime 2022-09-22 15:00:00-05:00 +2024-04-13 04:12:11,398: root: INFO: Current backtesting datetime 2022-09-23 08:30:00-05:00 +2024-04-13 04:12:11,398: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:11 +2024-04-13 04:12:11,399: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:11,399: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:11,400: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:11,400: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:11,400: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:13,745: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:13,746: root: INFO: Current backtesting datetime 2022-09-23 15:00:00-05:00 +2024-04-13 04:12:13,746: root: INFO: Current backtesting datetime 2022-09-24 08:30:00-05:00 +2024-04-13 04:12:13,747: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:12:13,748: root: INFO: Current backtesting datetime 2022-09-24 08:29:00-05:00 +2024-04-13 04:12:13,749: root: INFO: Current backtesting datetime 2022-09-24 08:29:00-05:00 +2024-04-13 04:12:13,749: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:12:13,750: root: INFO: Current backtesting datetime 2022-09-26 07:30:00-05:00 +2024-04-13 04:12:13,751: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:12:13,751: root: INFO: Current backtesting datetime 2022-09-26 08:30:00-05:00 +2024-04-13 04:12:13,752: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:12:13,753: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:13 +2024-04-13 04:12:13,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:13,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:13,754: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:13,754: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:13,754: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:15,877: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:15,878: root: INFO: Current backtesting datetime 2022-09-26 15:00:00-05:00 +2024-04-13 04:12:15,879: root: INFO: Current backtesting datetime 2022-09-27 08:30:00-05:00 +2024-04-13 04:12:15,879: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:15 +2024-04-13 04:12:15,879: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:15,880: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:15,881: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:15,881: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:15,881: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:18,162: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:18,163: root: INFO: Current backtesting datetime 2022-09-27 15:00:00-05:00 +2024-04-13 04:12:18,163: root: INFO: Current backtesting datetime 2022-09-28 08:30:00-05:00 +2024-04-13 04:12:18,164: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:18 +2024-04-13 04:12:18,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:18,165: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:18,165: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:18,166: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:18,166: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:20,596: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:20,597: root: INFO: Current backtesting datetime 2022-09-28 15:00:00-05:00 +2024-04-13 04:12:20,597: root: INFO: Current backtesting datetime 2022-09-29 08:30:00-05:00 +2024-04-13 04:12:20,598: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:20 +2024-04-13 04:12:20,598: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:20,599: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:20,599: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:20,599: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:20,599: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:24,621: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:24,622: root: INFO: Current backtesting datetime 2022-09-29 15:00:00-05:00 +2024-04-13 04:12:24,623: root: INFO: Current backtesting datetime 2022-09-30 08:30:00-05:00 +2024-04-13 04:12:24,623: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:24 +2024-04-13 04:12:24,623: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:24,625: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:24,625: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:24,625: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:24,625: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:26,682: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:26,683: root: INFO: Current backtesting datetime 2022-09-30 15:00:00-05:00 +2024-04-13 04:12:26,683: root: INFO: Current backtesting datetime 2022-10-01 08:30:00-05:00 +2024-04-13 04:12:26,684: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:12:26,685: root: INFO: Current backtesting datetime 2022-10-01 08:29:00-05:00 +2024-04-13 04:12:26,686: root: INFO: Current backtesting datetime 2022-10-01 08:29:00-05:00 +2024-04-13 04:12:26,687: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:12:26,687: root: INFO: Current backtesting datetime 2022-10-03 07:30:00-05:00 +2024-04-13 04:12:26,688: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:12:26,689: root: INFO: Current backtesting datetime 2022-10-03 08:30:00-05:00 +2024-04-13 04:12:26,689: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:12:26,690: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:26 +2024-04-13 04:12:26,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:26,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:26,691: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:26,692: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:26,692: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:29,975: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:29,976: root: INFO: Current backtesting datetime 2022-10-03 15:00:00-05:00 +2024-04-13 04:12:29,977: root: INFO: Current backtesting datetime 2022-10-04 08:30:00-05:00 +2024-04-13 04:12:29,977: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:29 +2024-04-13 04:12:29,977: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:29,978: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:29,978: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:29,979: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:29,979: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:33,995: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:33,996: root: INFO: Current backtesting datetime 2022-10-04 15:00:00-05:00 +2024-04-13 04:12:33,996: root: INFO: Current backtesting datetime 2022-10-05 08:30:00-05:00 +2024-04-13 04:12:33,997: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:33 +2024-04-13 04:12:33,997: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:33,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:33,998: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:33,998: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:33,998: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:37,372: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:37,373: root: INFO: Current backtesting datetime 2022-10-05 15:00:00-05:00 +2024-04-13 04:12:37,374: root: INFO: Current backtesting datetime 2022-10-06 08:30:00-05:00 +2024-04-13 04:12:37,374: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:37 +2024-04-13 04:12:37,374: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:37,375: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:37,375: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:37,376: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:37,376: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:39,716: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:39,717: root: INFO: Current backtesting datetime 2022-10-06 15:00:00-05:00 +2024-04-13 04:12:39,717: root: INFO: Current backtesting datetime 2022-10-07 08:30:00-05:00 +2024-04-13 04:12:39,718: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:39 +2024-04-13 04:12:39,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:39,719: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:39,719: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:39,719: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:39,719: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:42,610: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:42,610: root: INFO: Current backtesting datetime 2022-10-07 15:00:00-05:00 +2024-04-13 04:12:42,611: root: INFO: Current backtesting datetime 2022-10-08 08:30:00-05:00 +2024-04-13 04:12:42,611: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:12:42,613: root: INFO: Current backtesting datetime 2022-10-08 08:29:00-05:00 +2024-04-13 04:12:42,614: root: INFO: Current backtesting datetime 2022-10-08 08:29:00-05:00 +2024-04-13 04:12:42,614: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:12:42,615: root: INFO: Current backtesting datetime 2022-10-10 07:30:00-05:00 +2024-04-13 04:12:42,615: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:12:42,616: root: INFO: Current backtesting datetime 2022-10-10 08:30:00-05:00 +2024-04-13 04:12:42,616: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:12:42,617: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:42 +2024-04-13 04:12:42,617: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:42,618: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:42,618: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:42,619: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:42,619: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:44,795: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:44,796: root: INFO: Current backtesting datetime 2022-10-10 15:00:00-05:00 +2024-04-13 04:12:44,796: root: INFO: Current backtesting datetime 2022-10-11 08:30:00-05:00 +2024-04-13 04:12:44,797: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:44 +2024-04-13 04:12:44,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:44,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:44,798: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:44,798: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:44,798: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:55,576: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:55,576: root: INFO: Current backtesting datetime 2022-10-11 15:00:00-05:00 +2024-04-13 04:12:55,577: root: INFO: Current backtesting datetime 2022-10-12 08:30:00-05:00 +2024-04-13 04:12:55,577: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:55 +2024-04-13 04:12:55,577: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:55,578: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:55,579: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:55,579: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:55,579: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:12:58,805: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:12:58,806: root: INFO: Current backtesting datetime 2022-10-12 15:00:00-05:00 +2024-04-13 04:12:58,807: root: INFO: Current backtesting datetime 2022-10-13 08:30:00-05:00 +2024-04-13 04:12:58,807: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:12:58 +2024-04-13 04:12:58,807: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:58,808: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:12:58,808: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:12:58,809: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:12:58,809: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:01,920: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:01,921: root: INFO: Current backtesting datetime 2022-10-13 15:00:00-05:00 +2024-04-13 04:13:01,922: root: INFO: Current backtesting datetime 2022-10-14 08:30:00-05:00 +2024-04-13 04:13:01,922: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:01 +2024-04-13 04:13:01,922: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:01,923: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:01,923: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:01,924: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:01,924: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:05,134: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:05,135: root: INFO: Current backtesting datetime 2022-10-14 15:00:00-05:00 +2024-04-13 04:13:05,135: root: INFO: Current backtesting datetime 2022-10-15 08:30:00-05:00 +2024-04-13 04:13:05,136: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:13:05,137: root: INFO: Current backtesting datetime 2022-10-15 08:29:00-05:00 +2024-04-13 04:13:05,138: root: INFO: Current backtesting datetime 2022-10-15 08:29:00-05:00 +2024-04-13 04:13:05,138: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:13:05,139: root: INFO: Current backtesting datetime 2022-10-17 07:30:00-05:00 +2024-04-13 04:13:05,139: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:13:05,140: root: INFO: Current backtesting datetime 2022-10-17 08:30:00-05:00 +2024-04-13 04:13:05,140: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:13:05,141: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:05 +2024-04-13 04:13:05,142: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:05,142: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:05,143: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:05,143: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:05,143: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:07,642: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:07,643: root: INFO: Current backtesting datetime 2022-10-17 15:00:00-05:00 +2024-04-13 04:13:07,643: root: INFO: Current backtesting datetime 2022-10-18 08:30:00-05:00 +2024-04-13 04:13:07,644: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:07 +2024-04-13 04:13:07,644: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:07,645: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:07,645: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:07,646: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:07,646: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:10,119: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:10,120: root: INFO: Current backtesting datetime 2022-10-18 15:00:00-05:00 +2024-04-13 04:13:10,120: root: INFO: Current backtesting datetime 2022-10-19 08:30:00-05:00 +2024-04-13 04:13:10,121: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:10 +2024-04-13 04:13:10,121: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:10,122: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:10,122: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:10,123: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:10,123: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:12,990: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:12,991: root: INFO: Current backtesting datetime 2022-10-19 15:00:00-05:00 +2024-04-13 04:13:12,992: root: INFO: Current backtesting datetime 2022-10-20 08:30:00-05:00 +2024-04-13 04:13:12,992: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:12 +2024-04-13 04:13:12,992: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:12,993: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:12,993: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:12,994: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:12,994: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:15,478: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:15,479: root: INFO: Current backtesting datetime 2022-10-20 15:00:00-05:00 +2024-04-13 04:13:15,480: root: INFO: Current backtesting datetime 2022-10-21 08:30:00-05:00 +2024-04-13 04:13:15,480: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:15 +2024-04-13 04:13:15,480: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:15,481: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:15,481: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:15,482: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:15,482: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:19,196: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:19,197: root: INFO: Current backtesting datetime 2022-10-21 15:00:00-05:00 +2024-04-13 04:13:19,197: root: INFO: Current backtesting datetime 2022-10-22 08:30:00-05:00 +2024-04-13 04:13:19,198: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:13:19,199: root: INFO: Current backtesting datetime 2022-10-22 08:29:00-05:00 +2024-04-13 04:13:19,200: root: INFO: Current backtesting datetime 2022-10-22 08:29:00-05:00 +2024-04-13 04:13:19,201: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:13:19,201: root: INFO: Current backtesting datetime 2022-10-24 07:30:00-05:00 +2024-04-13 04:13:19,202: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:13:19,203: root: INFO: Current backtesting datetime 2022-10-24 08:30:00-05:00 +2024-04-13 04:13:19,203: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:13:19,204: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:19 +2024-04-13 04:13:19,204: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:19,205: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:19,205: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:19,205: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:19,205: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:21,841: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:21,842: root: INFO: Current backtesting datetime 2022-10-24 15:00:00-05:00 +2024-04-13 04:13:21,842: root: INFO: Current backtesting datetime 2022-10-25 08:30:00-05:00 +2024-04-13 04:13:21,842: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:21 +2024-04-13 04:13:21,842: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:21,843: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:21,843: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:21,844: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:21,844: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:24,953: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:24,954: root: INFO: Current backtesting datetime 2022-10-25 15:00:00-05:00 +2024-04-13 04:13:24,954: root: INFO: Current backtesting datetime 2022-10-26 08:30:00-05:00 +2024-04-13 04:13:24,955: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:24 +2024-04-13 04:13:24,955: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:24,956: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:24,956: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:24,956: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:24,956: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:26,688: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:26,689: root: INFO: Current backtesting datetime 2022-10-26 15:00:00-05:00 +2024-04-13 04:13:26,689: root: INFO: Current backtesting datetime 2022-10-27 08:30:00-05:00 +2024-04-13 04:13:26,690: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:26 +2024-04-13 04:13:26,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:26,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:26,691: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:26,691: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:26,691: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:29,616: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:29,617: root: INFO: Current backtesting datetime 2022-10-27 15:00:00-05:00 +2024-04-13 04:13:29,617: root: INFO: Current backtesting datetime 2022-10-28 08:30:00-05:00 +2024-04-13 04:13:29,618: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:29 +2024-04-13 04:13:29,618: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:29,619: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:29,619: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:29,620: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:29,620: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:31,897: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:31,898: root: INFO: Current backtesting datetime 2022-10-28 15:00:00-05:00 +2024-04-13 04:13:31,898: root: INFO: Current backtesting datetime 2022-10-29 08:30:00-05:00 +2024-04-13 04:13:31,899: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:13:31,900: root: INFO: Current backtesting datetime 2022-10-29 08:29:00-05:00 +2024-04-13 04:13:31,901: root: INFO: Current backtesting datetime 2022-10-29 08:29:00-05:00 +2024-04-13 04:13:31,901: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:13:31,902: root: INFO: Current backtesting datetime 2022-10-31 07:30:00-05:00 +2024-04-13 04:13:31,903: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:13:31,904: root: INFO: Current backtesting datetime 2022-10-31 08:30:00-05:00 +2024-04-13 04:13:31,904: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:13:31,905: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:31 +2024-04-13 04:13:31,905: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:31,906: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:31,906: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:31,906: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:31,907: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:34,535: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:34,536: root: INFO: Current backtesting datetime 2022-10-31 15:00:00-05:00 +2024-04-13 04:13:34,536: root: INFO: Current backtesting datetime 2022-11-01 08:30:00-05:00 +2024-04-13 04:13:34,537: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:34 +2024-04-13 04:13:34,537: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:34,538: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:34,538: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:34,538: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:34,538: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:37,353: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:37,353: root: INFO: Current backtesting datetime 2022-11-01 15:00:00-05:00 +2024-04-13 04:13:37,354: root: INFO: Current backtesting datetime 2022-11-02 08:30:00-05:00 +2024-04-13 04:13:37,354: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:37 +2024-04-13 04:13:37,354: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:37,355: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:37,355: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:37,356: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:37,356: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:40,218: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:40,219: root: INFO: Current backtesting datetime 2022-11-02 15:00:00-05:00 +2024-04-13 04:13:40,219: root: INFO: Current backtesting datetime 2022-11-03 08:30:00-05:00 +2024-04-13 04:13:40,219: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:40 +2024-04-13 04:13:40,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:40,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:40,221: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:40,221: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:40,221: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:42,183: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:42,184: root: INFO: Current backtesting datetime 2022-11-03 15:00:00-05:00 +2024-04-13 04:13:42,184: root: INFO: Current backtesting datetime 2022-11-04 08:30:00-05:00 +2024-04-13 04:13:42,184: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:42 +2024-04-13 04:13:42,185: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:42,185: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:42,186: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:42,186: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:42,186: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:45,802: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:45,803: root: INFO: Current backtesting datetime 2022-11-04 15:00:00-05:00 +2024-04-13 04:13:45,803: root: INFO: Current backtesting datetime 2022-11-05 08:30:00-05:00 +2024-04-13 04:13:45,804: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:13:45,805: root: INFO: Current backtesting datetime 2022-11-05 08:29:00-05:00 +2024-04-13 04:13:45,806: root: INFO: Current backtesting datetime 2022-11-05 08:29:00-05:00 +2024-04-13 04:13:45,806: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:13:45,807: root: INFO: Current backtesting datetime 2022-11-07 08:30:00-05:00 +2024-04-13 04:13:45,808: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:13:45,809: root: INFO: Current backtesting datetime 2022-11-07 09:30:00-05:00 +2024-04-13 04:13:45,809: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:13:45,810: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:45 +2024-04-13 04:13:45,810: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:45,811: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:45,811: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:45,811: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:45,811: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:49,618: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:49,619: root: INFO: Current backtesting datetime 2022-11-07 16:00:00-05:00 +2024-04-13 04:13:49,619: root: INFO: Current backtesting datetime 2022-11-08 09:30:00-05:00 +2024-04-13 04:13:49,620: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:49 +2024-04-13 04:13:49,620: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:49,620: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:49,621: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:49,621: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:49,621: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:51,685: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:51,686: root: INFO: Current backtesting datetime 2022-11-08 16:00:00-05:00 +2024-04-13 04:13:51,687: root: INFO: Current backtesting datetime 2022-11-09 09:30:00-05:00 +2024-04-13 04:13:51,687: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:51 +2024-04-13 04:13:51,687: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:51,688: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:51,688: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:51,689: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:51,689: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:54,679: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:54,680: root: INFO: Current backtesting datetime 2022-11-09 16:00:00-05:00 +2024-04-13 04:13:54,681: root: INFO: Current backtesting datetime 2022-11-10 09:30:00-05:00 +2024-04-13 04:13:54,681: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:54 +2024-04-13 04:13:54,681: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:54,682: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:54,682: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:54,683: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:54,683: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:13:57,233: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:13:57,234: root: INFO: Current backtesting datetime 2022-11-10 16:00:00-05:00 +2024-04-13 04:13:57,234: root: INFO: Current backtesting datetime 2022-11-11 09:30:00-05:00 +2024-04-13 04:13:57,235: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:13:57 +2024-04-13 04:13:57,235: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:57,236: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:13:57,236: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:13:57,236: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:13:57,237: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:01,183: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:01,184: root: INFO: Current backtesting datetime 2022-11-11 16:00:00-05:00 +2024-04-13 04:14:01,184: root: INFO: Current backtesting datetime 2022-11-12 09:30:00-05:00 +2024-04-13 04:14:01,184: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:14:01,186: root: INFO: Current backtesting datetime 2022-11-12 09:29:00-05:00 +2024-04-13 04:14:01,187: root: INFO: Current backtesting datetime 2022-11-12 09:29:00-05:00 +2024-04-13 04:14:01,187: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:14:01,188: root: INFO: Current backtesting datetime 2022-11-14 08:30:00-05:00 +2024-04-13 04:14:01,189: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:14:01,189: root: INFO: Current backtesting datetime 2022-11-14 09:30:00-05:00 +2024-04-13 04:14:01,190: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:14:01,191: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:01 +2024-04-13 04:14:01,191: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:01,191: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:01,192: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:01,192: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:01,192: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:02,806: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:02,807: root: INFO: Current backtesting datetime 2022-11-14 16:00:00-05:00 +2024-04-13 04:14:02,807: root: INFO: Current backtesting datetime 2022-11-15 09:30:00-05:00 +2024-04-13 04:14:02,808: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:02 +2024-04-13 04:14:02,808: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:02,809: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:02,809: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:02,809: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:02,810: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:06,091: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:06,092: root: INFO: Current backtesting datetime 2022-11-15 16:00:00-05:00 +2024-04-13 04:14:06,092: root: INFO: Current backtesting datetime 2022-11-16 09:30:00-05:00 +2024-04-13 04:14:06,093: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:06 +2024-04-13 04:14:06,093: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:06,094: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:06,094: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:06,094: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:06,094: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:08,338: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:08,339: root: INFO: Current backtesting datetime 2022-11-16 16:00:00-05:00 +2024-04-13 04:14:08,339: root: INFO: Current backtesting datetime 2022-11-17 09:30:00-05:00 +2024-04-13 04:14:08,340: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:08 +2024-04-13 04:14:08,340: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:08,341: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:08,341: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:08,341: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:08,342: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:09,832: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:09,833: root: INFO: Current backtesting datetime 2022-11-17 16:00:00-05:00 +2024-04-13 04:14:09,833: root: INFO: Current backtesting datetime 2022-11-18 09:30:00-05:00 +2024-04-13 04:14:09,834: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:09 +2024-04-13 04:14:09,834: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:09,835: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:09,835: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:09,836: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:09,836: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:11,234: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:11,235: root: INFO: Current backtesting datetime 2022-11-18 16:00:00-05:00 +2024-04-13 04:14:11,236: root: INFO: Current backtesting datetime 2022-11-19 09:30:00-05:00 +2024-04-13 04:14:11,236: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:14:11,238: root: INFO: Current backtesting datetime 2022-11-19 09:29:00-05:00 +2024-04-13 04:14:11,239: root: INFO: Current backtesting datetime 2022-11-19 09:29:00-05:00 +2024-04-13 04:14:11,239: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:14:11,240: root: INFO: Current backtesting datetime 2022-11-21 08:30:00-05:00 +2024-04-13 04:14:11,240: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:14:11,241: root: INFO: Current backtesting datetime 2022-11-21 09:30:00-05:00 +2024-04-13 04:14:11,241: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:14:11,242: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:11 +2024-04-13 04:14:11,242: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:11,243: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:11,243: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:11,244: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:11,244: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:14,439: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:14,440: root: INFO: Current backtesting datetime 2022-11-21 16:00:00-05:00 +2024-04-13 04:14:14,440: root: INFO: Current backtesting datetime 2022-11-22 09:30:00-05:00 +2024-04-13 04:14:14,441: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:14 +2024-04-13 04:14:14,441: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:14,442: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:14,442: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:14,443: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:14,443: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:18,247: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:18,248: root: INFO: Current backtesting datetime 2022-11-22 16:00:00-05:00 +2024-04-13 04:14:18,248: root: INFO: Current backtesting datetime 2022-11-23 09:30:00-05:00 +2024-04-13 04:14:18,249: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:18 +2024-04-13 04:14:18,249: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:18,250: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:18,250: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:18,251: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:18,251: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:20,107: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:20,108: root: INFO: Current backtesting datetime 2022-11-23 16:00:00-05:00 +2024-04-13 04:14:20,108: root: INFO: Current backtesting datetime 2022-11-24 09:30:00-05:00 +2024-04-13 04:14:20,108: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:14:20,110: root: INFO: Current backtesting datetime 2022-11-24 09:29:00-05:00 +2024-04-13 04:14:20,111: root: INFO: Current backtesting datetime 2022-11-24 09:29:00-05:00 +2024-04-13 04:14:20,111: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:14:20,112: root: INFO: Current backtesting datetime 2022-11-25 08:30:00-05:00 +2024-04-13 04:14:20,112: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:14:20,113: root: INFO: Current backtesting datetime 2022-11-25 09:30:00-05:00 +2024-04-13 04:14:20,113: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:14:20,114: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:20 +2024-04-13 04:14:20,115: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:20,115: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:20,116: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:20,116: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:20,116: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:24,084: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:24,085: root: INFO: Current backtesting datetime 2022-11-25 13:00:00-05:00 +2024-04-13 04:14:24,085: root: INFO: Current backtesting datetime 2022-11-26 09:30:00-05:00 +2024-04-13 04:14:24,086: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:14:24,087: root: INFO: Current backtesting datetime 2022-11-26 09:29:00-05:00 +2024-04-13 04:14:24,088: root: INFO: Current backtesting datetime 2022-11-26 09:29:00-05:00 +2024-04-13 04:14:24,088: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:14:24,089: root: INFO: Current backtesting datetime 2022-11-28 08:30:00-05:00 +2024-04-13 04:14:24,090: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:14:24,090: root: INFO: Current backtesting datetime 2022-11-28 09:30:00-05:00 +2024-04-13 04:14:24,090: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:14:24,092: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:24 +2024-04-13 04:14:24,092: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:24,092: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:24,093: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:24,093: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:24,093: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:28,855: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:28,856: root: INFO: Current backtesting datetime 2022-11-28 16:00:00-05:00 +2024-04-13 04:14:28,856: root: INFO: Current backtesting datetime 2022-11-29 09:30:00-05:00 +2024-04-13 04:14:28,856: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:28 +2024-04-13 04:14:28,856: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:28,857: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:28,858: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:28,858: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:28,858: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:35,887: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:35,888: root: INFO: Current backtesting datetime 2022-11-29 16:00:00-05:00 +2024-04-13 04:14:35,889: root: INFO: Current backtesting datetime 2022-11-30 09:30:00-05:00 +2024-04-13 04:14:35,889: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:35 +2024-04-13 04:14:35,889: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:35,890: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:35,890: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:35,891: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:35,891: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:42,349: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:42,350: root: INFO: Current backtesting datetime 2022-11-30 16:00:00-05:00 +2024-04-13 04:14:42,350: root: INFO: Current backtesting datetime 2022-12-01 09:30:00-05:00 +2024-04-13 04:14:42,350: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:42 +2024-04-13 04:14:42,351: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:42,351: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:42,352: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:42,352: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:42,352: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:43,181: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:43,182: root: INFO: Current backtesting datetime 2022-12-01 16:00:00-05:00 +2024-04-13 04:14:43,182: root: INFO: Current backtesting datetime 2022-12-02 09:30:00-05:00 +2024-04-13 04:14:43,183: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:43 +2024-04-13 04:14:43,183: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:43,184: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:43,184: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:43,184: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:43,185: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:44,248: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:44,249: root: INFO: Current backtesting datetime 2022-12-02 16:00:00-05:00 +2024-04-13 04:14:44,249: root: INFO: Current backtesting datetime 2022-12-03 09:30:00-05:00 +2024-04-13 04:14:44,249: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:14:44,251: root: INFO: Current backtesting datetime 2022-12-03 09:29:00-05:00 +2024-04-13 04:14:44,252: root: INFO: Current backtesting datetime 2022-12-03 09:29:00-05:00 +2024-04-13 04:14:44,252: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:14:44,253: root: INFO: Current backtesting datetime 2022-12-05 08:30:00-05:00 +2024-04-13 04:14:44,253: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:14:44,254: root: INFO: Current backtesting datetime 2022-12-05 09:30:00-05:00 +2024-04-13 04:14:44,254: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:14:44,255: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:44 +2024-04-13 04:14:44,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:44,256: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:44,256: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:44,257: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:44,257: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:45,406: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:45,407: root: INFO: Current backtesting datetime 2022-12-05 16:00:00-05:00 +2024-04-13 04:14:45,407: root: INFO: Current backtesting datetime 2022-12-06 09:30:00-05:00 +2024-04-13 04:14:45,408: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:45 +2024-04-13 04:14:45,408: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:45,409: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:45,409: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:45,409: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:45,409: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:46,741: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:46,742: root: INFO: Current backtesting datetime 2022-12-06 16:00:00-05:00 +2024-04-13 04:14:46,742: root: INFO: Current backtesting datetime 2022-12-07 09:30:00-05:00 +2024-04-13 04:14:46,743: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:46 +2024-04-13 04:14:46,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:46,744: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:46,744: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:46,745: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:46,745: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:47,648: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:47,649: root: INFO: Current backtesting datetime 2022-12-07 16:00:00-05:00 +2024-04-13 04:14:47,649: root: INFO: Current backtesting datetime 2022-12-08 09:30:00-05:00 +2024-04-13 04:14:47,650: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:47 +2024-04-13 04:14:47,650: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:47,651: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:47,651: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:47,651: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:47,651: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:49,035: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:49,036: root: INFO: Current backtesting datetime 2022-12-08 16:00:00-05:00 +2024-04-13 04:14:49,036: root: INFO: Current backtesting datetime 2022-12-09 09:30:00-05:00 +2024-04-13 04:14:49,036: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:49 +2024-04-13 04:14:49,037: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:49,038: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:49,038: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:49,038: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:49,038: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:49,924: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:49,925: root: INFO: Current backtesting datetime 2022-12-09 16:00:00-05:00 +2024-04-13 04:14:49,925: root: INFO: Current backtesting datetime 2022-12-10 09:30:00-05:00 +2024-04-13 04:14:49,926: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:14:49,927: root: INFO: Current backtesting datetime 2022-12-10 09:29:00-05:00 +2024-04-13 04:14:49,928: root: INFO: Current backtesting datetime 2022-12-10 09:29:00-05:00 +2024-04-13 04:14:49,929: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:14:49,929: root: INFO: Current backtesting datetime 2022-12-12 08:30:00-05:00 +2024-04-13 04:14:49,930: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:14:49,931: root: INFO: Current backtesting datetime 2022-12-12 09:30:00-05:00 +2024-04-13 04:14:49,931: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:14:49,932: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:49 +2024-04-13 04:14:49,932: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:49,933: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:49,933: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:49,934: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:49,934: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:50,850: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:50,851: root: INFO: Current backtesting datetime 2022-12-12 16:00:00-05:00 +2024-04-13 04:14:50,851: root: INFO: Current backtesting datetime 2022-12-13 09:30:00-05:00 +2024-04-13 04:14:50,852: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:50 +2024-04-13 04:14:50,852: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:50,853: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:50,853: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:50,854: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:50,854: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:51,971: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:51,972: root: INFO: Current backtesting datetime 2022-12-13 16:00:00-05:00 +2024-04-13 04:14:51,973: root: INFO: Current backtesting datetime 2022-12-14 09:30:00-05:00 +2024-04-13 04:14:51,973: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:51 +2024-04-13 04:14:51,973: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:51,974: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:51,974: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:51,975: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:51,975: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:53,397: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:53,398: root: INFO: Current backtesting datetime 2022-12-14 16:00:00-05:00 +2024-04-13 04:14:53,398: root: INFO: Current backtesting datetime 2022-12-15 09:30:00-05:00 +2024-04-13 04:14:53,399: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:53 +2024-04-13 04:14:53,399: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:53,400: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:53,400: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:53,400: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:53,400: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:54,525: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:54,525: root: INFO: Current backtesting datetime 2022-12-15 16:00:00-05:00 +2024-04-13 04:14:54,526: root: INFO: Current backtesting datetime 2022-12-16 09:30:00-05:00 +2024-04-13 04:14:54,526: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:54 +2024-04-13 04:14:54,526: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:54,527: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:54,527: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:54,528: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:54,528: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:55,575: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:55,576: root: INFO: Current backtesting datetime 2022-12-16 16:00:00-05:00 +2024-04-13 04:14:55,576: root: INFO: Current backtesting datetime 2022-12-17 09:30:00-05:00 +2024-04-13 04:14:55,576: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:14:55,579: root: INFO: Current backtesting datetime 2022-12-17 09:29:00-05:00 +2024-04-13 04:14:55,580: root: INFO: Current backtesting datetime 2022-12-17 09:29:00-05:00 +2024-04-13 04:14:55,580: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:14:55,581: root: INFO: Current backtesting datetime 2022-12-19 08:30:00-05:00 +2024-04-13 04:14:55,581: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:14:55,581: root: INFO: Current backtesting datetime 2022-12-19 09:30:00-05:00 +2024-04-13 04:14:55,581: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:14:55,583: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:55 +2024-04-13 04:14:55,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:55,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:55,584: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:55,584: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:55,584: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:56,555: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:56,556: root: INFO: Current backtesting datetime 2022-12-19 16:00:00-05:00 +2024-04-13 04:14:56,556: root: INFO: Current backtesting datetime 2022-12-20 09:30:00-05:00 +2024-04-13 04:14:56,557: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:56 +2024-04-13 04:14:56,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:56,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:56,558: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:56,558: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:56,558: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:57,588: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:57,588: root: INFO: Current backtesting datetime 2022-12-20 16:00:00-05:00 +2024-04-13 04:14:57,589: root: INFO: Current backtesting datetime 2022-12-21 09:30:00-05:00 +2024-04-13 04:14:57,589: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:57 +2024-04-13 04:14:57,589: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:57,590: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:57,590: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:57,591: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:57,591: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:58,571: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:58,572: root: INFO: Current backtesting datetime 2022-12-21 16:00:00-05:00 +2024-04-13 04:14:58,573: root: INFO: Current backtesting datetime 2022-12-22 09:30:00-05:00 +2024-04-13 04:14:58,573: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:58 +2024-04-13 04:14:58,573: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:58,574: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:58,574: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:58,575: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:58,575: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:14:59,732: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:14:59,733: root: INFO: Current backtesting datetime 2022-12-22 16:00:00-05:00 +2024-04-13 04:14:59,734: root: INFO: Current backtesting datetime 2022-12-23 09:30:00-05:00 +2024-04-13 04:14:59,734: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:14:59 +2024-04-13 04:14:59,734: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:59,735: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:14:59,736: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:14:59,736: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:14:59,736: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:00,815: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:00,816: root: INFO: Current backtesting datetime 2022-12-23 16:00:00-05:00 +2024-04-13 04:15:00,816: root: INFO: Current backtesting datetime 2022-12-24 09:30:00-05:00 +2024-04-13 04:15:00,817: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:15:00,818: root: INFO: Current backtesting datetime 2022-12-24 09:29:00-05:00 +2024-04-13 04:15:00,820: root: INFO: Current backtesting datetime 2022-12-24 09:29:00-05:00 +2024-04-13 04:15:00,820: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:15:00,821: root: INFO: Current backtesting datetime 2022-12-27 08:30:00-05:00 +2024-04-13 04:15:00,822: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:15:00,822: root: INFO: Current backtesting datetime 2022-12-27 09:30:00-05:00 +2024-04-13 04:15:00,823: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:15:00,824: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:00 +2024-04-13 04:15:00,824: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:00,824: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:00,825: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:00,825: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:00,825: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:01,657: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:01,658: root: INFO: Current backtesting datetime 2022-12-27 16:00:00-05:00 +2024-04-13 04:15:01,658: root: INFO: Current backtesting datetime 2022-12-28 09:30:00-05:00 +2024-04-13 04:15:01,659: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:01 +2024-04-13 04:15:01,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:01,660: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:01,660: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:01,661: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:01,661: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:02,454: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:02,455: root: INFO: Current backtesting datetime 2022-12-28 16:00:00-05:00 +2024-04-13 04:15:02,455: root: INFO: Current backtesting datetime 2022-12-29 09:30:00-05:00 +2024-04-13 04:15:02,456: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:02 +2024-04-13 04:15:02,456: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:02,457: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:02,457: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:02,458: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:02,458: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:03,687: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:03,687: root: INFO: Current backtesting datetime 2022-12-29 16:00:00-05:00 +2024-04-13 04:15:03,688: root: INFO: Current backtesting datetime 2022-12-30 09:30:00-05:00 +2024-04-13 04:15:03,688: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:03 +2024-04-13 04:15:03,688: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:03,689: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:03,689: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:03,690: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:03,690: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:04,922: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:04,922: root: INFO: Current backtesting datetime 2022-12-30 16:00:00-05:00 +2024-04-13 04:15:04,922: root: INFO: Current backtesting datetime 2022-12-31 09:30:00-05:00 +2024-04-13 04:15:04,923: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:15:04,924: root: INFO: Current backtesting datetime 2022-12-31 09:29:00-05:00 +2024-04-13 04:15:04,926: root: INFO: Current backtesting datetime 2022-12-31 09:29:00-05:00 +2024-04-13 04:15:04,926: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:15:04,926: root: INFO: Current backtesting datetime 2023-01-03 08:30:00-05:00 +2024-04-13 04:15:04,927: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:15:04,928: root: INFO: Current backtesting datetime 2023-01-03 09:30:00-05:00 +2024-04-13 04:15:04,928: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:15:04,929: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:04 +2024-04-13 04:15:04,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:04,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:04,930: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:04,930: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:04,931: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:05,882: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:05,883: root: INFO: Current backtesting datetime 2023-01-03 16:00:00-05:00 +2024-04-13 04:15:05,884: root: INFO: Current backtesting datetime 2023-01-04 09:30:00-05:00 +2024-04-13 04:15:05,884: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:05 +2024-04-13 04:15:05,884: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:05,885: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:05,885: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:05,886: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:05,886: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:07,368: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:07,369: root: INFO: Current backtesting datetime 2023-01-04 16:00:00-05:00 +2024-04-13 04:15:07,370: root: INFO: Current backtesting datetime 2023-01-05 09:30:00-05:00 +2024-04-13 04:15:07,370: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:07 +2024-04-13 04:15:07,370: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:07,371: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:07,371: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:07,372: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:07,372: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:09,095: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:09,096: root: INFO: Current backtesting datetime 2023-01-05 16:00:00-05:00 +2024-04-13 04:15:09,096: root: INFO: Current backtesting datetime 2023-01-06 09:30:00-05:00 +2024-04-13 04:15:09,096: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:09 +2024-04-13 04:15:09,097: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:09,097: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:09,098: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:09,098: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:09,098: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:10,742: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:10,743: root: INFO: Current backtesting datetime 2023-01-06 16:00:00-05:00 +2024-04-13 04:15:10,744: root: INFO: Current backtesting datetime 2023-01-07 09:30:00-05:00 +2024-04-13 04:15:10,744: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:15:10,745: root: INFO: Current backtesting datetime 2023-01-07 09:29:00-05:00 +2024-04-13 04:15:10,747: root: INFO: Current backtesting datetime 2023-01-07 09:29:00-05:00 +2024-04-13 04:15:10,747: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:15:10,747: root: INFO: Current backtesting datetime 2023-01-09 08:30:00-05:00 +2024-04-13 04:15:10,748: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:15:10,749: root: INFO: Current backtesting datetime 2023-01-09 09:30:00-05:00 +2024-04-13 04:15:10,749: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:15:10,750: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:10 +2024-04-13 04:15:10,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:10,751: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:10,751: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:10,751: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:10,752: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:12,269: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:12,270: root: INFO: Current backtesting datetime 2023-01-09 16:00:00-05:00 +2024-04-13 04:15:12,270: root: INFO: Current backtesting datetime 2023-01-10 09:30:00-05:00 +2024-04-13 04:15:12,271: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:12 +2024-04-13 04:15:12,271: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:12,272: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:12,272: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:12,272: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:12,272: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:14,217: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:14,218: root: INFO: Current backtesting datetime 2023-01-10 16:00:00-05:00 +2024-04-13 04:15:14,218: root: INFO: Current backtesting datetime 2023-01-11 09:30:00-05:00 +2024-04-13 04:15:14,219: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:14 +2024-04-13 04:15:14,219: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:14,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:14,220: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:14,221: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:14,221: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:17,238: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:17,239: root: INFO: Current backtesting datetime 2023-01-11 16:00:00-05:00 +2024-04-13 04:15:17,240: root: INFO: Current backtesting datetime 2023-01-12 09:30:00-05:00 +2024-04-13 04:15:17,240: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:17 +2024-04-13 04:15:17,240: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:17,241: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:17,241: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:17,242: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:17,242: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:21,177: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:21,178: root: INFO: Current backtesting datetime 2023-01-12 16:00:00-05:00 +2024-04-13 04:15:21,178: root: INFO: Current backtesting datetime 2023-01-13 09:30:00-05:00 +2024-04-13 04:15:21,178: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:21 +2024-04-13 04:15:21,178: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:21,179: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:21,180: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:21,180: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:21,180: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:25,202: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:25,203: root: INFO: Current backtesting datetime 2023-01-13 16:00:00-05:00 +2024-04-13 04:15:25,203: root: INFO: Current backtesting datetime 2023-01-14 09:30:00-05:00 +2024-04-13 04:15:25,204: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:15:25,205: root: INFO: Current backtesting datetime 2023-01-14 09:29:00-05:00 +2024-04-13 04:15:25,206: root: INFO: Current backtesting datetime 2023-01-14 09:29:00-05:00 +2024-04-13 04:15:25,206: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:15:25,207: root: INFO: Current backtesting datetime 2023-01-17 08:30:00-05:00 +2024-04-13 04:15:25,208: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:15:25,209: root: INFO: Current backtesting datetime 2023-01-17 09:30:00-05:00 +2024-04-13 04:15:25,209: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:15:25,210: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:25 +2024-04-13 04:15:25,210: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:25,211: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:25,211: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:25,211: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:25,211: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:28,998: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:28,999: root: INFO: Current backtesting datetime 2023-01-17 16:00:00-05:00 +2024-04-13 04:15:29,000: root: INFO: Current backtesting datetime 2023-01-18 09:30:00-05:00 +2024-04-13 04:15:29,000: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:29 +2024-04-13 04:15:29,000: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:29,001: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:29,001: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:29,002: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:29,002: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:30,710: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:30,711: root: INFO: Current backtesting datetime 2023-01-18 16:00:00-05:00 +2024-04-13 04:15:30,712: root: INFO: Current backtesting datetime 2023-01-19 09:30:00-05:00 +2024-04-13 04:15:30,712: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:30 +2024-04-13 04:15:30,712: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:30,713: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:30,713: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:30,714: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:30,714: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:33,275: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:33,276: root: INFO: Current backtesting datetime 2023-01-19 16:00:00-05:00 +2024-04-13 04:15:33,277: root: INFO: Current backtesting datetime 2023-01-20 09:30:00-05:00 +2024-04-13 04:15:33,277: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:33 +2024-04-13 04:15:33,277: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:33,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:33,278: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:33,279: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:33,279: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:35,357: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:35,357: root: INFO: Current backtesting datetime 2023-01-20 16:00:00-05:00 +2024-04-13 04:15:35,358: root: INFO: Current backtesting datetime 2023-01-21 09:30:00-05:00 +2024-04-13 04:15:35,358: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:15:35,360: root: INFO: Current backtesting datetime 2023-01-21 09:29:00-05:00 +2024-04-13 04:15:35,361: root: INFO: Current backtesting datetime 2023-01-21 09:29:00-05:00 +2024-04-13 04:15:35,361: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:15:35,362: root: INFO: Current backtesting datetime 2023-01-23 08:30:00-05:00 +2024-04-13 04:15:35,362: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:15:35,363: root: INFO: Current backtesting datetime 2023-01-23 09:30:00-05:00 +2024-04-13 04:15:35,363: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:15:35,364: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:35 +2024-04-13 04:15:35,364: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:35,365: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:35,365: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:35,365: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:35,366: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:38,303: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:38,304: root: INFO: Current backtesting datetime 2023-01-23 16:00:00-05:00 +2024-04-13 04:15:38,304: root: INFO: Current backtesting datetime 2023-01-24 09:30:00-05:00 +2024-04-13 04:15:38,304: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:38 +2024-04-13 04:15:38,305: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:38,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:38,306: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:38,306: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:38,307: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:40,225: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:40,226: root: INFO: Current backtesting datetime 2023-01-24 16:00:00-05:00 +2024-04-13 04:15:40,226: root: INFO: Current backtesting datetime 2023-01-25 09:30:00-05:00 +2024-04-13 04:15:40,227: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:40 +2024-04-13 04:15:40,227: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:40,228: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:40,228: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:40,228: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:40,228: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:43,096: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:43,097: root: INFO: Current backtesting datetime 2023-01-25 16:00:00-05:00 +2024-04-13 04:15:43,097: root: INFO: Current backtesting datetime 2023-01-26 09:30:00-05:00 +2024-04-13 04:15:43,098: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:43 +2024-04-13 04:15:43,098: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:43,099: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:43,099: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:43,099: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:43,100: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:45,010: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:45,011: root: INFO: Current backtesting datetime 2023-01-26 16:00:00-05:00 +2024-04-13 04:15:45,012: root: INFO: Current backtesting datetime 2023-01-27 09:30:00-05:00 +2024-04-13 04:15:45,012: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:45 +2024-04-13 04:15:45,012: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:45,013: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:45,013: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:45,014: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:45,014: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:47,358: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:47,359: root: INFO: Current backtesting datetime 2023-01-27 16:00:00-05:00 +2024-04-13 04:15:47,359: root: INFO: Current backtesting datetime 2023-01-28 09:30:00-05:00 +2024-04-13 04:15:47,359: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:15:47,361: root: INFO: Current backtesting datetime 2023-01-28 09:29:00-05:00 +2024-04-13 04:15:47,362: root: INFO: Current backtesting datetime 2023-01-28 09:29:00-05:00 +2024-04-13 04:15:47,362: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:15:47,363: root: INFO: Current backtesting datetime 2023-01-30 08:30:00-05:00 +2024-04-13 04:15:47,363: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:15:47,364: root: INFO: Current backtesting datetime 2023-01-30 09:30:00-05:00 +2024-04-13 04:15:47,364: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:15:47,365: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:47 +2024-04-13 04:15:47,365: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:47,366: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:47,366: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:47,367: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:47,367: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:49,486: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:49,487: root: INFO: Current backtesting datetime 2023-01-30 16:00:00-05:00 +2024-04-13 04:15:49,487: root: INFO: Current backtesting datetime 2023-01-31 09:30:00-05:00 +2024-04-13 04:15:49,488: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:49 +2024-04-13 04:15:49,488: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:49,489: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:49,489: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:49,489: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:49,489: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:51,593: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:51,594: root: INFO: Current backtesting datetime 2023-01-31 16:00:00-05:00 +2024-04-13 04:15:51,594: root: INFO: Current backtesting datetime 2023-02-01 09:30:00-05:00 +2024-04-13 04:15:51,595: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:51 +2024-04-13 04:15:51,595: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:51,596: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:51,596: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:51,596: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:51,596: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:53,881: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:53,882: root: INFO: Current backtesting datetime 2023-02-01 16:00:00-05:00 +2024-04-13 04:15:53,882: root: INFO: Current backtesting datetime 2023-02-02 09:30:00-05:00 +2024-04-13 04:15:53,883: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:53 +2024-04-13 04:15:53,883: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:53,883: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:53,884: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:53,884: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:53,884: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:55,719: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:55,720: root: INFO: Current backtesting datetime 2023-02-02 16:00:00-05:00 +2024-04-13 04:15:55,720: root: INFO: Current backtesting datetime 2023-02-03 09:30:00-05:00 +2024-04-13 04:15:55,720: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:55 +2024-04-13 04:15:55,721: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:55,721: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:55,722: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:55,722: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:55,722: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:57,639: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:57,640: root: INFO: Current backtesting datetime 2023-02-03 16:00:00-05:00 +2024-04-13 04:15:57,640: root: INFO: Current backtesting datetime 2023-02-04 09:30:00-05:00 +2024-04-13 04:15:57,641: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:15:57,642: root: INFO: Current backtesting datetime 2023-02-04 09:29:00-05:00 +2024-04-13 04:15:57,643: root: INFO: Current backtesting datetime 2023-02-04 09:29:00-05:00 +2024-04-13 04:15:57,643: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:15:57,644: root: INFO: Current backtesting datetime 2023-02-06 08:30:00-05:00 +2024-04-13 04:15:57,645: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:15:57,646: root: INFO: Current backtesting datetime 2023-02-06 09:30:00-05:00 +2024-04-13 04:15:57,646: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:15:57,647: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:57 +2024-04-13 04:15:57,647: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:57,648: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:57,648: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:57,648: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:57,648: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:15:59,041: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:15:59,042: root: INFO: Current backtesting datetime 2023-02-06 16:00:00-05:00 +2024-04-13 04:15:59,042: root: INFO: Current backtesting datetime 2023-02-07 09:30:00-05:00 +2024-04-13 04:15:59,043: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:15:59 +2024-04-13 04:15:59,043: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:59,044: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:15:59,044: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:15:59,044: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:15:59,045: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:01,671: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:01,672: root: INFO: Current backtesting datetime 2023-02-07 16:00:00-05:00 +2024-04-13 04:16:01,672: root: INFO: Current backtesting datetime 2023-02-08 09:30:00-05:00 +2024-04-13 04:16:01,672: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:01 +2024-04-13 04:16:01,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:01,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:01,674: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:01,674: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:01,674: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:03,202: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:03,203: root: INFO: Current backtesting datetime 2023-02-08 16:00:00-05:00 +2024-04-13 04:16:03,203: root: INFO: Current backtesting datetime 2023-02-09 09:30:00-05:00 +2024-04-13 04:16:03,203: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:03 +2024-04-13 04:16:03,203: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:03,204: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:03,205: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:03,205: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:03,205: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:05,309: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:05,310: root: INFO: Current backtesting datetime 2023-02-09 16:00:00-05:00 +2024-04-13 04:16:05,311: root: INFO: Current backtesting datetime 2023-02-10 09:30:00-05:00 +2024-04-13 04:16:05,311: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:05 +2024-04-13 04:16:05,311: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:05,312: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:05,312: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:05,313: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:05,313: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:07,803: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:07,804: root: INFO: Current backtesting datetime 2023-02-10 16:00:00-05:00 +2024-04-13 04:16:07,804: root: INFO: Current backtesting datetime 2023-02-11 09:30:00-05:00 +2024-04-13 04:16:07,805: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:16:07,806: root: INFO: Current backtesting datetime 2023-02-11 09:29:00-05:00 +2024-04-13 04:16:07,807: root: INFO: Current backtesting datetime 2023-02-11 09:29:00-05:00 +2024-04-13 04:16:07,807: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:16:07,808: root: INFO: Current backtesting datetime 2023-02-13 08:30:00-05:00 +2024-04-13 04:16:07,809: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:16:07,809: root: INFO: Current backtesting datetime 2023-02-13 09:30:00-05:00 +2024-04-13 04:16:07,810: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:16:07,811: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:07 +2024-04-13 04:16:07,811: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:07,812: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:07,812: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:07,812: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:07,812: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:09,063: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:09,064: root: INFO: Current backtesting datetime 2023-02-13 16:00:00-05:00 +2024-04-13 04:16:09,064: root: INFO: Current backtesting datetime 2023-02-14 09:30:00-05:00 +2024-04-13 04:16:09,065: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:09 +2024-04-13 04:16:09,065: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:09,066: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:09,066: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:09,067: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:09,067: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:10,274: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:10,275: root: INFO: Current backtesting datetime 2023-02-14 16:00:00-05:00 +2024-04-13 04:16:10,275: root: INFO: Current backtesting datetime 2023-02-15 09:30:00-05:00 +2024-04-13 04:16:10,276: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:10 +2024-04-13 04:16:10,276: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:10,277: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:10,277: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:10,278: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:10,278: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:12,125: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:12,126: root: INFO: Current backtesting datetime 2023-02-15 16:00:00-05:00 +2024-04-13 04:16:12,127: root: INFO: Current backtesting datetime 2023-02-16 09:30:00-05:00 +2024-04-13 04:16:12,127: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:12 +2024-04-13 04:16:12,127: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:12,128: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:12,129: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:12,129: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:12,129: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:13,725: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:13,726: root: INFO: Current backtesting datetime 2023-02-16 16:00:00-05:00 +2024-04-13 04:16:13,726: root: INFO: Current backtesting datetime 2023-02-17 09:30:00-05:00 +2024-04-13 04:16:13,727: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:13 +2024-04-13 04:16:13,727: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:13,728: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:13,728: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:13,729: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:13,729: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:14,845: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:14,846: root: INFO: Current backtesting datetime 2023-02-17 16:00:00-05:00 +2024-04-13 04:16:14,846: root: INFO: Current backtesting datetime 2023-02-18 09:30:00-05:00 +2024-04-13 04:16:14,847: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:16:14,848: root: INFO: Current backtesting datetime 2023-02-18 09:29:00-05:00 +2024-04-13 04:16:14,849: root: INFO: Current backtesting datetime 2023-02-18 09:29:00-05:00 +2024-04-13 04:16:14,850: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:16:14,850: root: INFO: Current backtesting datetime 2023-02-21 08:30:00-05:00 +2024-04-13 04:16:14,851: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:16:14,852: root: INFO: Current backtesting datetime 2023-02-21 09:30:00-05:00 +2024-04-13 04:16:14,852: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:16:14,853: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:14 +2024-04-13 04:16:14,853: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:14,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:14,854: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:14,855: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:14,855: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:15,592: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:15,593: root: INFO: Current backtesting datetime 2023-02-21 16:00:00-05:00 +2024-04-13 04:16:15,594: root: INFO: Current backtesting datetime 2023-02-22 09:30:00-05:00 +2024-04-13 04:16:15,594: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:15 +2024-04-13 04:16:15,594: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:15,595: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:15,595: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:15,596: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:15,596: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:16,149: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:16,150: root: INFO: Current backtesting datetime 2023-02-22 16:00:00-05:00 +2024-04-13 04:16:16,151: root: INFO: Current backtesting datetime 2023-02-23 09:30:00-05:00 +2024-04-13 04:16:16,151: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:16 +2024-04-13 04:16:16,151: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:16,152: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:16,153: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:16,153: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:16,153: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:17,116: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:17,117: root: INFO: Current backtesting datetime 2023-02-23 16:00:00-05:00 +2024-04-13 04:16:17,117: root: INFO: Current backtesting datetime 2023-02-24 09:30:00-05:00 +2024-04-13 04:16:17,118: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:17 +2024-04-13 04:16:17,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:17,119: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:17,119: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:17,120: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:17,120: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:17,845: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:17,846: root: INFO: Current backtesting datetime 2023-02-24 16:00:00-05:00 +2024-04-13 04:16:17,846: root: INFO: Current backtesting datetime 2023-02-25 09:30:00-05:00 +2024-04-13 04:16:17,848: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:16:17,849: root: INFO: Current backtesting datetime 2023-02-25 09:29:00-05:00 +2024-04-13 04:16:17,850: root: INFO: Current backtesting datetime 2023-02-25 09:29:00-05:00 +2024-04-13 04:16:17,850: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:16:17,851: root: INFO: Current backtesting datetime 2023-02-27 08:30:00-05:00 +2024-04-13 04:16:17,852: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:16:17,852: root: INFO: Current backtesting datetime 2023-02-27 09:30:00-05:00 +2024-04-13 04:16:17,853: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:16:17,854: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:17 +2024-04-13 04:16:17,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:17,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:17,855: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:17,855: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:17,855: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:19,443: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:19,444: root: INFO: Current backtesting datetime 2023-02-27 16:00:00-05:00 +2024-04-13 04:16:19,444: root: INFO: Current backtesting datetime 2023-02-28 09:30:00-05:00 +2024-04-13 04:16:19,445: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:19 +2024-04-13 04:16:19,445: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:19,445: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:19,446: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:19,446: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:19,446: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:21,138: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:21,139: root: INFO: Current backtesting datetime 2023-02-28 16:00:00-05:00 +2024-04-13 04:16:21,139: root: INFO: Current backtesting datetime 2023-03-01 09:30:00-05:00 +2024-04-13 04:16:21,140: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:21 +2024-04-13 04:16:21,140: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:21,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:21,141: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:21,141: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:21,142: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:21,980: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:21,981: root: INFO: Current backtesting datetime 2023-03-01 16:00:00-05:00 +2024-04-13 04:16:21,981: root: INFO: Current backtesting datetime 2023-03-02 09:30:00-05:00 +2024-04-13 04:16:21,981: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:21 +2024-04-13 04:16:21,982: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:21,982: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:21,983: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:21,983: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:21,983: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:22,747: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:22,748: root: INFO: Current backtesting datetime 2023-03-02 16:00:00-05:00 +2024-04-13 04:16:22,749: root: INFO: Current backtesting datetime 2023-03-03 09:30:00-05:00 +2024-04-13 04:16:22,749: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:22 +2024-04-13 04:16:22,749: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:22,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:22,750: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:22,751: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:22,751: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:24,559: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:24,559: root: INFO: Current backtesting datetime 2023-03-03 16:00:00-05:00 +2024-04-13 04:16:24,560: root: INFO: Current backtesting datetime 2023-03-04 09:30:00-05:00 +2024-04-13 04:16:24,560: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:16:24,562: root: INFO: Current backtesting datetime 2023-03-04 09:29:00-05:00 +2024-04-13 04:16:24,563: root: INFO: Current backtesting datetime 2023-03-04 09:29:00-05:00 +2024-04-13 04:16:24,563: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:16:24,564: root: INFO: Current backtesting datetime 2023-03-06 08:30:00-05:00 +2024-04-13 04:16:24,564: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:16:24,565: root: INFO: Current backtesting datetime 2023-03-06 09:30:00-05:00 +2024-04-13 04:16:24,565: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:16:24,566: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:24 +2024-04-13 04:16:24,566: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:24,567: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:24,567: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:24,568: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:24,568: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:25,939: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:25,940: root: INFO: Current backtesting datetime 2023-03-06 16:00:00-05:00 +2024-04-13 04:16:25,940: root: INFO: Current backtesting datetime 2023-03-07 09:30:00-05:00 +2024-04-13 04:16:25,940: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:25 +2024-04-13 04:16:25,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:25,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:25,942: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:25,942: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:25,942: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:27,685: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:27,686: root: INFO: Current backtesting datetime 2023-03-07 16:00:00-05:00 +2024-04-13 04:16:27,687: root: INFO: Current backtesting datetime 2023-03-08 09:30:00-05:00 +2024-04-13 04:16:27,687: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:27 +2024-04-13 04:16:27,687: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:27,688: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:27,688: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:27,689: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:27,689: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:30,576: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:30,577: root: INFO: Current backtesting datetime 2023-03-08 16:00:00-05:00 +2024-04-13 04:16:30,577: root: INFO: Current backtesting datetime 2023-03-09 09:30:00-05:00 +2024-04-13 04:16:30,578: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:30 +2024-04-13 04:16:30,578: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:30,579: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:30,579: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:30,579: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:30,579: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:32,938: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:32,939: root: INFO: Current backtesting datetime 2023-03-09 16:00:00-05:00 +2024-04-13 04:16:32,939: root: INFO: Current backtesting datetime 2023-03-10 09:30:00-05:00 +2024-04-13 04:16:32,940: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:32 +2024-04-13 04:16:32,940: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:32,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:32,941: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:32,941: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:32,941: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:33,797: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:33,798: root: INFO: Current backtesting datetime 2023-03-10 16:00:00-05:00 +2024-04-13 04:16:33,799: root: INFO: Current backtesting datetime 2023-03-11 09:30:00-05:00 +2024-04-13 04:16:33,799: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:16:33,800: root: INFO: Current backtesting datetime 2023-03-11 09:29:00-05:00 +2024-04-13 04:16:33,802: root: INFO: Current backtesting datetime 2023-03-11 09:29:00-05:00 +2024-04-13 04:16:33,802: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:16:33,803: root: INFO: Current backtesting datetime 2023-03-13 07:30:00-05:00 +2024-04-13 04:16:33,803: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:16:33,804: root: INFO: Current backtesting datetime 2023-03-13 08:30:00-05:00 +2024-04-13 04:16:33,804: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:16:33,805: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:33 +2024-04-13 04:16:33,805: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:33,806: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:33,806: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:33,807: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:33,807: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:35,171: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:35,172: root: INFO: Current backtesting datetime 2023-03-13 15:00:00-05:00 +2024-04-13 04:16:35,173: root: INFO: Current backtesting datetime 2023-03-14 08:30:00-05:00 +2024-04-13 04:16:35,173: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:35 +2024-04-13 04:16:35,173: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:35,174: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:35,174: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:35,175: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:35,175: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:37,570: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:37,571: root: INFO: Current backtesting datetime 2023-03-14 15:00:00-05:00 +2024-04-13 04:16:37,571: root: INFO: Current backtesting datetime 2023-03-15 08:30:00-05:00 +2024-04-13 04:16:37,571: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:37 +2024-04-13 04:16:37,571: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:37,572: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:37,573: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:37,573: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:37,573: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:40,197: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:40,198: root: INFO: Current backtesting datetime 2023-03-15 15:00:00-05:00 +2024-04-13 04:16:40,198: root: INFO: Current backtesting datetime 2023-03-16 08:30:00-05:00 +2024-04-13 04:16:40,198: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:40 +2024-04-13 04:16:40,199: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:40,199: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:40,200: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:40,200: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:40,200: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:41,849: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:41,850: root: INFO: Current backtesting datetime 2023-03-16 15:00:00-05:00 +2024-04-13 04:16:41,851: root: INFO: Current backtesting datetime 2023-03-17 08:30:00-05:00 +2024-04-13 04:16:41,851: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:41 +2024-04-13 04:16:41,851: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:41,852: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:41,852: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:41,853: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:41,853: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:42,552: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:42,552: root: INFO: Current backtesting datetime 2023-03-17 15:00:00-05:00 +2024-04-13 04:16:42,553: root: INFO: Current backtesting datetime 2023-03-18 08:30:00-05:00 +2024-04-13 04:16:42,553: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:16:42,555: root: INFO: Current backtesting datetime 2023-03-18 08:29:00-05:00 +2024-04-13 04:16:42,556: root: INFO: Current backtesting datetime 2023-03-18 08:29:00-05:00 +2024-04-13 04:16:42,556: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:16:42,557: root: INFO: Current backtesting datetime 2023-03-20 07:30:00-05:00 +2024-04-13 04:16:42,557: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:16:42,558: root: INFO: Current backtesting datetime 2023-03-20 08:30:00-05:00 +2024-04-13 04:16:42,558: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:16:42,559: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:42 +2024-04-13 04:16:42,559: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:42,560: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:42,560: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:42,561: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:42,561: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:43,056: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:43,057: root: INFO: Current backtesting datetime 2023-03-20 15:00:00-05:00 +2024-04-13 04:16:43,057: root: INFO: Current backtesting datetime 2023-03-21 08:30:00-05:00 +2024-04-13 04:16:43,058: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:43 +2024-04-13 04:16:43,058: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:43,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:43,059: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:43,060: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:43,060: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:45,496: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:45,497: root: INFO: Current backtesting datetime 2023-03-21 15:00:00-05:00 +2024-04-13 04:16:45,498: root: INFO: Current backtesting datetime 2023-03-22 08:30:00-05:00 +2024-04-13 04:16:45,498: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:45 +2024-04-13 04:16:45,498: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:45,499: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:45,500: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:45,500: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:45,500: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:48,659: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:48,660: root: INFO: Current backtesting datetime 2023-03-22 15:00:00-05:00 +2024-04-13 04:16:48,661: root: INFO: Current backtesting datetime 2023-03-23 08:30:00-05:00 +2024-04-13 04:16:48,661: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:48 +2024-04-13 04:16:48,661: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:48,662: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:48,662: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:48,663: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:48,663: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:50,974: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:50,975: root: INFO: Current backtesting datetime 2023-03-23 15:00:00-05:00 +2024-04-13 04:16:50,975: root: INFO: Current backtesting datetime 2023-03-24 08:30:00-05:00 +2024-04-13 04:16:50,976: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:50 +2024-04-13 04:16:50,976: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:50,976: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:50,977: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:50,977: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:50,977: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:16:58,823: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:16:58,824: root: INFO: Current backtesting datetime 2023-03-24 15:00:00-05:00 +2024-04-13 04:16:58,824: root: INFO: Current backtesting datetime 2023-03-25 08:30:00-05:00 +2024-04-13 04:16:58,825: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:16:58,826: root: INFO: Current backtesting datetime 2023-03-25 08:29:00-05:00 +2024-04-13 04:16:58,828: root: INFO: Current backtesting datetime 2023-03-25 08:29:00-05:00 +2024-04-13 04:16:58,828: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:16:58,829: root: INFO: Current backtesting datetime 2023-03-27 07:30:00-05:00 +2024-04-13 04:16:58,829: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:16:58,830: root: INFO: Current backtesting datetime 2023-03-27 08:30:00-05:00 +2024-04-13 04:16:58,830: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:16:58,831: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:16:58 +2024-04-13 04:16:58,831: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:58,832: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:16:58,832: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:16:58,833: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:16:58,833: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:11,872: yfinance: ERROR: ^IRX: No price data found, symbol may be delisted (1d 1925-05-07 -> 2024-04-13) +2024-04-13 04:17:13,172: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:13,173: root: INFO: Current backtesting datetime 2023-03-27 15:00:00-05:00 +2024-04-13 04:17:13,173: root: INFO: Current backtesting datetime 2023-03-28 08:30:00-05:00 +2024-04-13 04:17:13,174: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:13 +2024-04-13 04:17:13,174: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:13,175: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:13,175: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:13,175: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:13,175: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:18,004: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:18,005: root: INFO: Current backtesting datetime 2023-03-28 15:00:00-05:00 +2024-04-13 04:17:18,006: root: INFO: Current backtesting datetime 2023-03-29 08:30:00-05:00 +2024-04-13 04:17:18,006: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:18 +2024-04-13 04:17:18,006: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:18,007: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:18,007: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:18,008: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:18,008: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:21,576: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:21,576: root: INFO: Current backtesting datetime 2023-03-29 15:00:00-05:00 +2024-04-13 04:17:21,577: root: INFO: Current backtesting datetime 2023-03-30 08:30:00-05:00 +2024-04-13 04:17:21,577: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:21 +2024-04-13 04:17:21,577: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:21,578: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:21,579: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:21,579: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:21,579: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:22,853: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:22,854: root: INFO: Current backtesting datetime 2023-03-30 15:00:00-05:00 +2024-04-13 04:17:22,854: root: INFO: Current backtesting datetime 2023-03-31 08:30:00-05:00 +2024-04-13 04:17:22,855: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:22 +2024-04-13 04:17:22,855: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:22,855: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:22,856: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:22,856: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:22,856: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:24,121: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:24,122: root: INFO: Current backtesting datetime 2023-03-31 15:00:00-05:00 +2024-04-13 04:17:24,122: root: INFO: Current backtesting datetime 2023-04-01 08:30:00-05:00 +2024-04-13 04:17:24,122: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:17:24,124: root: INFO: Current backtesting datetime 2023-04-01 08:29:00-05:00 +2024-04-13 04:17:24,125: root: INFO: Current backtesting datetime 2023-04-01 08:29:00-05:00 +2024-04-13 04:17:24,125: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:17:24,126: root: INFO: Current backtesting datetime 2023-04-03 07:30:00-05:00 +2024-04-13 04:17:24,127: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:17:24,128: root: INFO: Current backtesting datetime 2023-04-03 08:30:00-05:00 +2024-04-13 04:17:24,128: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:17:24,129: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:24 +2024-04-13 04:17:24,129: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:24,130: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:24,130: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:24,130: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:24,131: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:25,512: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:25,513: root: INFO: Current backtesting datetime 2023-04-03 15:00:00-05:00 +2024-04-13 04:17:25,513: root: INFO: Current backtesting datetime 2023-04-04 08:30:00-05:00 +2024-04-13 04:17:25,514: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:25 +2024-04-13 04:17:25,514: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:25,514: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:25,515: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:25,515: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:25,515: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:26,511: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:26,512: root: INFO: Current backtesting datetime 2023-04-04 15:00:00-05:00 +2024-04-13 04:17:26,512: root: INFO: Current backtesting datetime 2023-04-05 08:30:00-05:00 +2024-04-13 04:17:26,513: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:26 +2024-04-13 04:17:26,513: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:26,514: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:26,514: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:26,514: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:26,514: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:27,424: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:27,425: root: INFO: Current backtesting datetime 2023-04-05 15:00:00-05:00 +2024-04-13 04:17:27,425: root: INFO: Current backtesting datetime 2023-04-06 08:30:00-05:00 +2024-04-13 04:17:27,426: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:27 +2024-04-13 04:17:27,426: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:27,426: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:27,427: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:27,427: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:27,427: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:28,158: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:28,159: root: INFO: Current backtesting datetime 2023-04-06 15:00:00-05:00 +2024-04-13 04:17:28,159: root: INFO: Current backtesting datetime 2023-04-07 08:30:00-05:00 +2024-04-13 04:17:28,160: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:17:28,161: root: INFO: Current backtesting datetime 2023-04-07 08:29:00-05:00 +2024-04-13 04:17:28,162: root: INFO: Current backtesting datetime 2023-04-07 08:29:00-05:00 +2024-04-13 04:17:28,162: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:17:28,163: root: INFO: Current backtesting datetime 2023-04-10 07:30:00-05:00 +2024-04-13 04:17:28,164: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:17:28,165: root: INFO: Current backtesting datetime 2023-04-10 08:30:00-05:00 +2024-04-13 04:17:28,165: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:17:28,166: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:28 +2024-04-13 04:17:28,166: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:28,167: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:28,167: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:28,168: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:28,168: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:29,047: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:29,048: root: INFO: Current backtesting datetime 2023-04-10 15:00:00-05:00 +2024-04-13 04:17:29,048: root: INFO: Current backtesting datetime 2023-04-11 08:30:00-05:00 +2024-04-13 04:17:29,048: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:29 +2024-04-13 04:17:29,049: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:29,049: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:29,050: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:29,050: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:29,050: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:30,031: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:30,032: root: INFO: Current backtesting datetime 2023-04-11 15:00:00-05:00 +2024-04-13 04:17:30,032: root: INFO: Current backtesting datetime 2023-04-12 08:30:00-05:00 +2024-04-13 04:17:30,033: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:30 +2024-04-13 04:17:30,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:30,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:30,035: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:30,035: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:30,035: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:31,096: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:31,097: root: INFO: Current backtesting datetime 2023-04-12 15:00:00-05:00 +2024-04-13 04:17:31,098: root: INFO: Current backtesting datetime 2023-04-13 08:30:00-05:00 +2024-04-13 04:17:31,098: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:31 +2024-04-13 04:17:31,098: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:31,099: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:31,099: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:31,100: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:31,100: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:32,107: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:32,108: root: INFO: Current backtesting datetime 2023-04-13 15:00:00-05:00 +2024-04-13 04:17:32,108: root: INFO: Current backtesting datetime 2023-04-14 08:30:00-05:00 +2024-04-13 04:17:32,109: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:32 +2024-04-13 04:17:32,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:32,110: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:32,110: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:32,110: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:32,111: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:33,070: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:33,071: root: INFO: Current backtesting datetime 2023-04-14 15:00:00-05:00 +2024-04-13 04:17:33,071: root: INFO: Current backtesting datetime 2023-04-15 08:30:00-05:00 +2024-04-13 04:17:33,072: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:17:33,073: root: INFO: Current backtesting datetime 2023-04-15 08:29:00-05:00 +2024-04-13 04:17:33,074: root: INFO: Current backtesting datetime 2023-04-15 08:29:00-05:00 +2024-04-13 04:17:33,074: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:17:33,075: root: INFO: Current backtesting datetime 2023-04-17 07:30:00-05:00 +2024-04-13 04:17:33,076: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:17:33,077: root: INFO: Current backtesting datetime 2023-04-17 08:30:00-05:00 +2024-04-13 04:17:33,077: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:17:33,078: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:33 +2024-04-13 04:17:33,078: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:33,079: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:33,079: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:33,080: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:33,080: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:34,267: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:34,268: root: INFO: Current backtesting datetime 2023-04-17 15:00:00-05:00 +2024-04-13 04:17:34,268: root: INFO: Current backtesting datetime 2023-04-18 08:30:00-05:00 +2024-04-13 04:17:34,269: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:34 +2024-04-13 04:17:34,269: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:34,270: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:34,270: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:34,270: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:34,270: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:35,227: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:35,228: root: INFO: Current backtesting datetime 2023-04-18 15:00:00-05:00 +2024-04-13 04:17:35,228: root: INFO: Current backtesting datetime 2023-04-19 08:30:00-05:00 +2024-04-13 04:17:35,229: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:35 +2024-04-13 04:17:35,229: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:35,230: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:35,230: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:35,230: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:35,230: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:36,054: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:36,055: root: INFO: Current backtesting datetime 2023-04-19 15:00:00-05:00 +2024-04-13 04:17:36,055: root: INFO: Current backtesting datetime 2023-04-20 08:30:00-05:00 +2024-04-13 04:17:36,056: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:36 +2024-04-13 04:17:36,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:36,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:36,057: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:36,057: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:36,057: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:37,484: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:37,485: root: INFO: Current backtesting datetime 2023-04-20 15:00:00-05:00 +2024-04-13 04:17:37,485: root: INFO: Current backtesting datetime 2023-04-21 08:30:00-05:00 +2024-04-13 04:17:37,485: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:37 +2024-04-13 04:17:37,486: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:37,486: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:37,487: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:37,487: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:37,487: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:38,767: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:38,768: root: INFO: Current backtesting datetime 2023-04-21 15:00:00-05:00 +2024-04-13 04:17:38,768: root: INFO: Current backtesting datetime 2023-04-22 08:30:00-05:00 +2024-04-13 04:17:38,769: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:17:38,770: root: INFO: Current backtesting datetime 2023-04-22 08:29:00-05:00 +2024-04-13 04:17:38,771: root: INFO: Current backtesting datetime 2023-04-22 08:29:00-05:00 +2024-04-13 04:17:38,771: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:17:38,772: root: INFO: Current backtesting datetime 2023-04-24 07:30:00-05:00 +2024-04-13 04:17:38,773: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:17:38,773: root: INFO: Current backtesting datetime 2023-04-24 08:30:00-05:00 +2024-04-13 04:17:38,774: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:17:38,775: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:38 +2024-04-13 04:17:38,775: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:38,775: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:38,776: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:38,776: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:38,776: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:40,045: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:40,046: root: INFO: Current backtesting datetime 2023-04-24 15:00:00-05:00 +2024-04-13 04:17:40,047: root: INFO: Current backtesting datetime 2023-04-25 08:30:00-05:00 +2024-04-13 04:17:40,047: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:40 +2024-04-13 04:17:40,047: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:40,048: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:40,048: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:40,049: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:40,049: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:41,438: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:41,438: root: INFO: Current backtesting datetime 2023-04-25 15:00:00-05:00 +2024-04-13 04:17:41,439: root: INFO: Current backtesting datetime 2023-04-26 08:30:00-05:00 +2024-04-13 04:17:41,439: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:41 +2024-04-13 04:17:41,439: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:41,440: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:41,440: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:41,441: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:41,441: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:42,618: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:42,619: root: INFO: Current backtesting datetime 2023-04-26 15:00:00-05:00 +2024-04-13 04:17:42,619: root: INFO: Current backtesting datetime 2023-04-27 08:30:00-05:00 +2024-04-13 04:17:42,620: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:42 +2024-04-13 04:17:42,620: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:42,620: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:42,620: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:42,621: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:42,621: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:44,068: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:44,068: root: INFO: Current backtesting datetime 2023-04-27 15:00:00-05:00 +2024-04-13 04:17:44,069: root: INFO: Current backtesting datetime 2023-04-28 08:30:00-05:00 +2024-04-13 04:17:44,069: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:44 +2024-04-13 04:17:44,069: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:44,070: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:44,070: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:44,071: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:44,071: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:46,230: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:46,231: root: INFO: Current backtesting datetime 2023-04-28 15:00:00-05:00 +2024-04-13 04:17:46,231: root: INFO: Current backtesting datetime 2023-04-29 08:30:00-05:00 +2024-04-13 04:17:46,231: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:17:46,233: root: INFO: Current backtesting datetime 2023-04-29 08:29:00-05:00 +2024-04-13 04:17:46,234: root: INFO: Current backtesting datetime 2023-04-29 08:29:00-05:00 +2024-04-13 04:17:46,234: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:17:46,235: root: INFO: Current backtesting datetime 2023-05-01 07:30:00-05:00 +2024-04-13 04:17:46,236: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:17:46,237: root: INFO: Current backtesting datetime 2023-05-01 08:30:00-05:00 +2024-04-13 04:17:46,237: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:17:46,238: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:46 +2024-04-13 04:17:46,238: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:46,239: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:46,239: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:46,239: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:46,239: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:51,901: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:51,902: root: INFO: Current backtesting datetime 2023-05-01 15:00:00-05:00 +2024-04-13 04:17:51,903: root: INFO: Current backtesting datetime 2023-05-02 08:30:00-05:00 +2024-04-13 04:17:51,903: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:51 +2024-04-13 04:17:51,903: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:51,904: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:51,904: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:51,905: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:51,905: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:17:57,014: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:17:57,015: root: INFO: Current backtesting datetime 2023-05-02 15:00:00-05:00 +2024-04-13 04:17:57,016: root: INFO: Current backtesting datetime 2023-05-03 08:30:00-05:00 +2024-04-13 04:17:57,016: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:17:57 +2024-04-13 04:17:57,016: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:57,017: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:17:57,017: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:17:57,018: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:17:57,018: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:04,691: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:04,692: root: INFO: Current backtesting datetime 2023-05-03 15:00:00-05:00 +2024-04-13 04:18:04,693: root: INFO: Current backtesting datetime 2023-05-04 08:30:00-05:00 +2024-04-13 04:18:04,693: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:04 +2024-04-13 04:18:04,693: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:04,694: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:04,694: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:04,695: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:04,695: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:13,851: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:13,852: root: INFO: Current backtesting datetime 2023-05-04 15:00:00-05:00 +2024-04-13 04:18:13,852: root: INFO: Current backtesting datetime 2023-05-05 08:30:00-05:00 +2024-04-13 04:18:13,853: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:13 +2024-04-13 04:18:13,853: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:13,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:13,854: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:13,855: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:13,855: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:20,163: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:20,163: root: INFO: Current backtesting datetime 2023-05-05 15:00:00-05:00 +2024-04-13 04:18:20,164: root: INFO: Current backtesting datetime 2023-05-06 08:30:00-05:00 +2024-04-13 04:18:20,164: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:18:20,166: root: INFO: Current backtesting datetime 2023-05-06 08:29:00-05:00 +2024-04-13 04:18:20,167: root: INFO: Current backtesting datetime 2023-05-06 08:29:00-05:00 +2024-04-13 04:18:20,167: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:18:20,168: root: INFO: Current backtesting datetime 2023-05-08 07:30:00-05:00 +2024-04-13 04:18:20,168: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:18:20,169: root: INFO: Current backtesting datetime 2023-05-08 08:30:00-05:00 +2024-04-13 04:18:20,169: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:18:20,170: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:20 +2024-04-13 04:18:20,170: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:20,171: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:20,171: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:20,172: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:20,172: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:23,490: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:23,491: root: INFO: Current backtesting datetime 2023-05-08 15:00:00-05:00 +2024-04-13 04:18:23,491: root: INFO: Current backtesting datetime 2023-05-09 08:30:00-05:00 +2024-04-13 04:18:23,492: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:23 +2024-04-13 04:18:23,492: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:23,493: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:23,493: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:23,494: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:23,494: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:26,278: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:26,279: root: INFO: Current backtesting datetime 2023-05-09 15:00:00-05:00 +2024-04-13 04:18:26,280: root: INFO: Current backtesting datetime 2023-05-10 08:30:00-05:00 +2024-04-13 04:18:26,280: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:26 +2024-04-13 04:18:26,280: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:26,281: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:26,282: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:26,282: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:26,282: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:28,808: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:28,809: root: INFO: Current backtesting datetime 2023-05-10 15:00:00-05:00 +2024-04-13 04:18:28,810: root: INFO: Current backtesting datetime 2023-05-11 08:30:00-05:00 +2024-04-13 04:18:28,810: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:28 +2024-04-13 04:18:28,810: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:28,811: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:28,812: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:28,812: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:28,812: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:31,380: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:31,381: root: INFO: Current backtesting datetime 2023-05-11 15:00:00-05:00 +2024-04-13 04:18:31,381: root: INFO: Current backtesting datetime 2023-05-12 08:30:00-05:00 +2024-04-13 04:18:31,381: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:31 +2024-04-13 04:18:31,381: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:31,382: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:31,382: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:31,383: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:31,383: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:36,095: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:36,096: root: INFO: Current backtesting datetime 2023-05-12 15:00:00-05:00 +2024-04-13 04:18:36,096: root: INFO: Current backtesting datetime 2023-05-13 08:30:00-05:00 +2024-04-13 04:18:36,097: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:18:36,098: root: INFO: Current backtesting datetime 2023-05-13 08:29:00-05:00 +2024-04-13 04:18:36,099: root: INFO: Current backtesting datetime 2023-05-13 08:29:00-05:00 +2024-04-13 04:18:36,099: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:18:36,100: root: INFO: Current backtesting datetime 2023-05-15 07:30:00-05:00 +2024-04-13 04:18:36,100: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:18:36,101: root: INFO: Current backtesting datetime 2023-05-15 08:30:00-05:00 +2024-04-13 04:18:36,101: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:18:36,102: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:36 +2024-04-13 04:18:36,102: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:36,103: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:36,103: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:36,104: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:36,104: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:41,461: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:41,462: root: INFO: Current backtesting datetime 2023-05-15 15:00:00-05:00 +2024-04-13 04:18:41,462: root: INFO: Current backtesting datetime 2023-05-16 08:30:00-05:00 +2024-04-13 04:18:41,462: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:41 +2024-04-13 04:18:41,463: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:41,463: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:41,464: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:41,464: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:41,464: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:44,900: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:44,901: root: INFO: Current backtesting datetime 2023-05-16 15:00:00-05:00 +2024-04-13 04:18:44,901: root: INFO: Current backtesting datetime 2023-05-17 08:30:00-05:00 +2024-04-13 04:18:44,902: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:44 +2024-04-13 04:18:44,902: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:44,902: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:44,903: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:44,903: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:44,903: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:48,272: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:48,273: root: INFO: Current backtesting datetime 2023-05-17 15:00:00-05:00 +2024-04-13 04:18:48,273: root: INFO: Current backtesting datetime 2023-05-18 08:30:00-05:00 +2024-04-13 04:18:48,274: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:48 +2024-04-13 04:18:48,274: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:48,274: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:48,275: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:48,275: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:48,275: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:50,080: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:50,081: root: INFO: Current backtesting datetime 2023-05-18 15:00:00-05:00 +2024-04-13 04:18:50,081: root: INFO: Current backtesting datetime 2023-05-19 08:30:00-05:00 +2024-04-13 04:18:50,082: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:50 +2024-04-13 04:18:50,082: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:50,083: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:50,083: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:50,084: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:50,084: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:51,537: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:51,538: root: INFO: Current backtesting datetime 2023-05-19 15:00:00-05:00 +2024-04-13 04:18:51,538: root: INFO: Current backtesting datetime 2023-05-20 08:30:00-05:00 +2024-04-13 04:18:51,539: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:18:51,540: root: INFO: Current backtesting datetime 2023-05-20 08:29:00-05:00 +2024-04-13 04:18:51,541: root: INFO: Current backtesting datetime 2023-05-20 08:29:00-05:00 +2024-04-13 04:18:51,541: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:18:51,542: root: INFO: Current backtesting datetime 2023-05-22 07:30:00-05:00 +2024-04-13 04:18:51,543: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:18:51,543: root: INFO: Current backtesting datetime 2023-05-22 08:30:00-05:00 +2024-04-13 04:18:51,544: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:18:51,545: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:51 +2024-04-13 04:18:51,545: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:51,545: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:51,546: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:51,546: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:51,546: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:54,451: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:54,452: root: INFO: Current backtesting datetime 2023-05-22 15:00:00-05:00 +2024-04-13 04:18:54,452: root: INFO: Current backtesting datetime 2023-05-23 08:30:00-05:00 +2024-04-13 04:18:54,453: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:54 +2024-04-13 04:18:54,453: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:54,454: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:54,454: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:54,454: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:54,455: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:55,688: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:55,689: root: INFO: Current backtesting datetime 2023-05-23 15:00:00-05:00 +2024-04-13 04:18:55,689: root: INFO: Current backtesting datetime 2023-05-24 08:30:00-05:00 +2024-04-13 04:18:55,690: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:55 +2024-04-13 04:18:55,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:55,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:55,692: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:55,692: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:55,692: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:18:58,292: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:18:58,293: root: INFO: Current backtesting datetime 2023-05-24 15:00:00-05:00 +2024-04-13 04:18:58,294: root: INFO: Current backtesting datetime 2023-05-25 08:30:00-05:00 +2024-04-13 04:18:58,294: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:18:58 +2024-04-13 04:18:58,294: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:58,295: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:18:58,296: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:18:58,296: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:18:58,296: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:01,052: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:01,053: root: INFO: Current backtesting datetime 2023-05-25 15:00:00-05:00 +2024-04-13 04:19:01,054: root: INFO: Current backtesting datetime 2023-05-26 08:30:00-05:00 +2024-04-13 04:19:01,054: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:01 +2024-04-13 04:19:01,054: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:01,055: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:01,055: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:01,056: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:01,056: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:02,641: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:02,642: root: INFO: Current backtesting datetime 2023-05-26 15:00:00-05:00 +2024-04-13 04:19:02,643: root: INFO: Current backtesting datetime 2023-05-27 08:30:00-05:00 +2024-04-13 04:19:02,643: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:19:02,645: root: INFO: Current backtesting datetime 2023-05-27 08:29:00-05:00 +2024-04-13 04:19:02,646: root: INFO: Current backtesting datetime 2023-05-27 08:29:00-05:00 +2024-04-13 04:19:02,646: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:19:02,647: root: INFO: Current backtesting datetime 2023-05-30 07:30:00-05:00 +2024-04-13 04:19:02,647: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:19:02,648: root: INFO: Current backtesting datetime 2023-05-30 08:30:00-05:00 +2024-04-13 04:19:02,648: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:19:02,649: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:02 +2024-04-13 04:19:02,649: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:02,650: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:02,650: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:02,651: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:02,651: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:04,712: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:04,713: root: INFO: Current backtesting datetime 2023-05-30 15:00:00-05:00 +2024-04-13 04:19:04,714: root: INFO: Current backtesting datetime 2023-05-31 08:30:00-05:00 +2024-04-13 04:19:04,714: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:04 +2024-04-13 04:19:04,714: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:04,715: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:04,715: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:04,716: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:04,716: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:06,662: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:06,663: root: INFO: Current backtesting datetime 2023-05-31 15:00:00-05:00 +2024-04-13 04:19:06,664: root: INFO: Current backtesting datetime 2023-06-01 08:30:00-05:00 +2024-04-13 04:19:06,664: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:06 +2024-04-13 04:19:06,664: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:06,665: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:06,665: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:06,666: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:06,666: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:10,257: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:10,258: root: INFO: Current backtesting datetime 2023-06-01 15:00:00-05:00 +2024-04-13 04:19:10,259: root: INFO: Current backtesting datetime 2023-06-02 08:30:00-05:00 +2024-04-13 04:19:10,259: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:10 +2024-04-13 04:19:10,259: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:10,260: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:10,260: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:10,261: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:10,261: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:12,500: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:12,501: root: INFO: Current backtesting datetime 2023-06-02 15:00:00-05:00 +2024-04-13 04:19:12,501: root: INFO: Current backtesting datetime 2023-06-03 08:30:00-05:00 +2024-04-13 04:19:12,502: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:19:12,503: root: INFO: Current backtesting datetime 2023-06-03 08:29:00-05:00 +2024-04-13 04:19:12,505: root: INFO: Current backtesting datetime 2023-06-03 08:29:00-05:00 +2024-04-13 04:19:12,505: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:19:12,505: root: INFO: Current backtesting datetime 2023-06-05 07:30:00-05:00 +2024-04-13 04:19:12,506: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:19:12,507: root: INFO: Current backtesting datetime 2023-06-05 08:30:00-05:00 +2024-04-13 04:19:12,507: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:19:12,508: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:12 +2024-04-13 04:19:12,508: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:12,509: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:12,509: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:12,510: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:12,510: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:14,639: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:14,640: root: INFO: Current backtesting datetime 2023-06-05 15:00:00-05:00 +2024-04-13 04:19:14,640: root: INFO: Current backtesting datetime 2023-06-06 08:30:00-05:00 +2024-04-13 04:19:14,641: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:14 +2024-04-13 04:19:14,641: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:14,642: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:14,642: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:14,642: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:14,642: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:18,256: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:18,257: root: INFO: Current backtesting datetime 2023-06-06 15:00:00-05:00 +2024-04-13 04:19:18,257: root: INFO: Current backtesting datetime 2023-06-07 08:30:00-05:00 +2024-04-13 04:19:18,258: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:18 +2024-04-13 04:19:18,258: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:18,259: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:18,260: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:18,261: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:18,261: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:21,933: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:21,934: root: INFO: Current backtesting datetime 2023-06-07 15:00:00-05:00 +2024-04-13 04:19:21,934: root: INFO: Current backtesting datetime 2023-06-08 08:30:00-05:00 +2024-04-13 04:19:21,935: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:21 +2024-04-13 04:19:21,935: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:21,935: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:21,936: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:21,936: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:21,936: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:25,234: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:25,235: root: INFO: Current backtesting datetime 2023-06-08 15:00:00-05:00 +2024-04-13 04:19:25,235: root: INFO: Current backtesting datetime 2023-06-09 08:30:00-05:00 +2024-04-13 04:19:25,236: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:25 +2024-04-13 04:19:25,236: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:25,237: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:25,237: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:25,238: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:25,238: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:27,140: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:27,141: root: INFO: Current backtesting datetime 2023-06-09 15:00:00-05:00 +2024-04-13 04:19:27,141: root: INFO: Current backtesting datetime 2023-06-10 08:30:00-05:00 +2024-04-13 04:19:27,141: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:19:27,143: root: INFO: Current backtesting datetime 2023-06-10 08:29:00-05:00 +2024-04-13 04:19:27,144: root: INFO: Current backtesting datetime 2023-06-10 08:29:00-05:00 +2024-04-13 04:19:27,144: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:19:27,145: root: INFO: Current backtesting datetime 2023-06-12 07:30:00-05:00 +2024-04-13 04:19:27,145: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:19:27,146: root: INFO: Current backtesting datetime 2023-06-12 08:30:00-05:00 +2024-04-13 04:19:27,146: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:19:27,147: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:27 +2024-04-13 04:19:27,147: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:27,148: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:27,148: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:27,149: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:27,149: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:31,216: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:31,217: root: INFO: Current backtesting datetime 2023-06-12 15:00:00-05:00 +2024-04-13 04:19:31,217: root: INFO: Current backtesting datetime 2023-06-13 08:30:00-05:00 +2024-04-13 04:19:31,218: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:31 +2024-04-13 04:19:31,218: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:31,219: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:31,219: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:31,219: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:31,219: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:34,871: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:34,872: root: INFO: Current backtesting datetime 2023-06-13 15:00:00-05:00 +2024-04-13 04:19:34,872: root: INFO: Current backtesting datetime 2023-06-14 08:30:00-05:00 +2024-04-13 04:19:34,873: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:34 +2024-04-13 04:19:34,873: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:34,873: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:34,874: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:34,874: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:34,874: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:39,388: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:39,389: root: INFO: Current backtesting datetime 2023-06-14 15:00:00-05:00 +2024-04-13 04:19:39,389: root: INFO: Current backtesting datetime 2023-06-15 08:30:00-05:00 +2024-04-13 04:19:39,390: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:39 +2024-04-13 04:19:39,390: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:39,390: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:39,391: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:39,391: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:39,391: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:43,080: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:43,081: root: INFO: Current backtesting datetime 2023-06-15 15:00:00-05:00 +2024-04-13 04:19:43,081: root: INFO: Current backtesting datetime 2023-06-16 08:30:00-05:00 +2024-04-13 04:19:43,082: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:43 +2024-04-13 04:19:43,082: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:43,083: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:43,083: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:43,084: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:43,084: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:46,847: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:46,848: root: INFO: Current backtesting datetime 2023-06-16 15:00:00-05:00 +2024-04-13 04:19:46,849: root: INFO: Current backtesting datetime 2023-06-17 08:30:00-05:00 +2024-04-13 04:19:46,849: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:19:46,850: root: INFO: Current backtesting datetime 2023-06-17 08:29:00-05:00 +2024-04-13 04:19:46,852: root: INFO: Current backtesting datetime 2023-06-17 08:29:00-05:00 +2024-04-13 04:19:46,852: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:19:46,852: root: INFO: Current backtesting datetime 2023-06-20 07:30:00-05:00 +2024-04-13 04:19:46,853: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:19:46,854: root: INFO: Current backtesting datetime 2023-06-20 08:30:00-05:00 +2024-04-13 04:19:46,854: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:19:46,855: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:46 +2024-04-13 04:19:46,855: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:46,856: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:46,856: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:46,856: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:46,856: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:50,960: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:50,961: root: INFO: Current backtesting datetime 2023-06-20 15:00:00-05:00 +2024-04-13 04:19:50,961: root: INFO: Current backtesting datetime 2023-06-21 08:30:00-05:00 +2024-04-13 04:19:50,962: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:50 +2024-04-13 04:19:50,962: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:50,963: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:50,963: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:50,963: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:50,964: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:54,660: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:54,660: root: INFO: Current backtesting datetime 2023-06-21 15:00:00-05:00 +2024-04-13 04:19:54,661: root: INFO: Current backtesting datetime 2023-06-22 08:30:00-05:00 +2024-04-13 04:19:54,661: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:54 +2024-04-13 04:19:54,661: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:54,662: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:54,662: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:54,663: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:54,663: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:58,196: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:58,197: root: INFO: Current backtesting datetime 2023-06-22 15:00:00-05:00 +2024-04-13 04:19:58,197: root: INFO: Current backtesting datetime 2023-06-23 08:30:00-05:00 +2024-04-13 04:19:58,198: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:58 +2024-04-13 04:19:58,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:58,199: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:58,199: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:58,199: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:58,200: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:19:59,323: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:19:59,324: root: INFO: Current backtesting datetime 2023-06-23 15:00:00-05:00 +2024-04-13 04:19:59,324: root: INFO: Current backtesting datetime 2023-06-24 08:30:00-05:00 +2024-04-13 04:19:59,325: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:19:59,326: root: INFO: Current backtesting datetime 2023-06-24 08:29:00-05:00 +2024-04-13 04:19:59,327: root: INFO: Current backtesting datetime 2023-06-24 08:29:00-05:00 +2024-04-13 04:19:59,327: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:19:59,328: root: INFO: Current backtesting datetime 2023-06-26 07:30:00-05:00 +2024-04-13 04:19:59,329: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:19:59,329: root: INFO: Current backtesting datetime 2023-06-26 08:30:00-05:00 +2024-04-13 04:19:59,329: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:19:59,330: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:19:59 +2024-04-13 04:19:59,330: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:59,331: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:19:59,331: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:19:59,332: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:19:59,332: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:01,672: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:01,673: root: INFO: Current backtesting datetime 2023-06-26 15:00:00-05:00 +2024-04-13 04:20:01,673: root: INFO: Current backtesting datetime 2023-06-27 08:30:00-05:00 +2024-04-13 04:20:01,674: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:01 +2024-04-13 04:20:01,674: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:01,674: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:01,675: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:01,675: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:01,675: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:03,799: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:03,800: root: INFO: Current backtesting datetime 2023-06-27 15:00:00-05:00 +2024-04-13 04:20:03,801: root: INFO: Current backtesting datetime 2023-06-28 08:30:00-05:00 +2024-04-13 04:20:03,801: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:03 +2024-04-13 04:20:03,801: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:03,802: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:03,802: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:03,803: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:03,803: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:06,060: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:06,061: root: INFO: Current backtesting datetime 2023-06-28 15:00:00-05:00 +2024-04-13 04:20:06,061: root: INFO: Current backtesting datetime 2023-06-29 08:30:00-05:00 +2024-04-13 04:20:06,061: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:06 +2024-04-13 04:20:06,062: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:06,062: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:06,063: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:06,063: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:06,063: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:06,820: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:06,821: root: INFO: Current backtesting datetime 2023-06-29 15:00:00-05:00 +2024-04-13 04:20:06,821: root: INFO: Current backtesting datetime 2023-06-30 08:30:00-05:00 +2024-04-13 04:20:06,821: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:06 +2024-04-13 04:20:06,822: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:06,822: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:06,823: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:06,823: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:06,823: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:07,396: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:07,397: root: INFO: Current backtesting datetime 2023-06-30 15:00:00-05:00 +2024-04-13 04:20:07,397: root: INFO: Current backtesting datetime 2023-07-01 08:30:00-05:00 +2024-04-13 04:20:07,398: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:20:07,399: root: INFO: Current backtesting datetime 2023-07-01 08:29:00-05:00 +2024-04-13 04:20:07,400: root: INFO: Current backtesting datetime 2023-07-01 08:29:00-05:00 +2024-04-13 04:20:07,400: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:20:07,401: root: INFO: Current backtesting datetime 2023-07-03 07:30:00-05:00 +2024-04-13 04:20:07,402: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:20:07,403: root: INFO: Current backtesting datetime 2023-07-03 08:30:00-05:00 +2024-04-13 04:20:07,403: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:20:07,404: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:07 +2024-04-13 04:20:07,404: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:07,405: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:07,405: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:07,405: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:07,406: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:07,942: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:07,943: root: INFO: Current backtesting datetime 2023-07-03 12:00:00-05:00 +2024-04-13 04:20:07,944: root: INFO: Current backtesting datetime 2023-07-04 08:30:00-05:00 +2024-04-13 04:20:07,944: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:20:07,946: root: INFO: Current backtesting datetime 2023-07-04 08:29:00-05:00 +2024-04-13 04:20:07,947: root: INFO: Current backtesting datetime 2023-07-04 08:29:00-05:00 +2024-04-13 04:20:07,947: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:20:07,948: root: INFO: Current backtesting datetime 2023-07-05 07:30:00-05:00 +2024-04-13 04:20:07,948: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:20:07,949: root: INFO: Current backtesting datetime 2023-07-05 08:30:00-05:00 +2024-04-13 04:20:07,949: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:20:07,950: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:07 +2024-04-13 04:20:07,950: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:07,951: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:07,951: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:07,952: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:07,952: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:08,683: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:08,683: root: INFO: Current backtesting datetime 2023-07-05 15:00:00-05:00 +2024-04-13 04:20:08,683: root: INFO: Current backtesting datetime 2023-07-06 08:30:00-05:00 +2024-04-13 04:20:08,684: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:08 +2024-04-13 04:20:08,684: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:08,685: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:08,685: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:08,686: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:08,686: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:09,417: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:09,418: root: INFO: Current backtesting datetime 2023-07-06 15:00:00-05:00 +2024-04-13 04:20:09,418: root: INFO: Current backtesting datetime 2023-07-07 08:30:00-05:00 +2024-04-13 04:20:09,419: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:09 +2024-04-13 04:20:09,419: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:09,420: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:09,420: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:09,420: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:09,421: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:10,177: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:10,178: root: INFO: Current backtesting datetime 2023-07-07 15:00:00-05:00 +2024-04-13 04:20:10,178: root: INFO: Current backtesting datetime 2023-07-08 08:30:00-05:00 +2024-04-13 04:20:10,179: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:20:10,180: root: INFO: Current backtesting datetime 2023-07-08 08:29:00-05:00 +2024-04-13 04:20:10,182: root: INFO: Current backtesting datetime 2023-07-08 08:29:00-05:00 +2024-04-13 04:20:10,182: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:20:10,183: root: INFO: Current backtesting datetime 2023-07-10 07:30:00-05:00 +2024-04-13 04:20:10,183: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:20:10,184: root: INFO: Current backtesting datetime 2023-07-10 08:30:00-05:00 +2024-04-13 04:20:10,184: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:20:10,185: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:10 +2024-04-13 04:20:10,185: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:10,186: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:10,186: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:10,187: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:10,187: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:11,226: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:11,227: root: INFO: Current backtesting datetime 2023-07-10 15:00:00-05:00 +2024-04-13 04:20:11,228: root: INFO: Current backtesting datetime 2023-07-11 08:30:00-05:00 +2024-04-13 04:20:11,228: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:11 +2024-04-13 04:20:11,228: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:11,229: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:11,230: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:11,230: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:11,230: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:13,411: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:13,412: root: INFO: Current backtesting datetime 2023-07-11 15:00:00-05:00 +2024-04-13 04:20:13,413: root: INFO: Current backtesting datetime 2023-07-12 08:30:00-05:00 +2024-04-13 04:20:13,413: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:13 +2024-04-13 04:20:13,413: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:13,414: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:13,414: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:13,415: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:13,415: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:14,997: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:14,998: root: INFO: Current backtesting datetime 2023-07-12 15:00:00-05:00 +2024-04-13 04:20:14,998: root: INFO: Current backtesting datetime 2023-07-13 08:30:00-05:00 +2024-04-13 04:20:14,999: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:14 +2024-04-13 04:20:14,999: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:15,000: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:15,000: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:15,000: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:15,000: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:17,454: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:17,455: root: INFO: Current backtesting datetime 2023-07-13 15:00:00-05:00 +2024-04-13 04:20:17,456: root: INFO: Current backtesting datetime 2023-07-14 08:30:00-05:00 +2024-04-13 04:20:17,456: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:17 +2024-04-13 04:20:17,456: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:17,457: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:17,457: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:17,458: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:17,458: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:19,804: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:19,805: root: INFO: Current backtesting datetime 2023-07-14 15:00:00-05:00 +2024-04-13 04:20:19,806: root: INFO: Current backtesting datetime 2023-07-15 08:30:00-05:00 +2024-04-13 04:20:19,806: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:20:19,807: root: INFO: Current backtesting datetime 2023-07-15 08:29:00-05:00 +2024-04-13 04:20:19,808: root: INFO: Current backtesting datetime 2023-07-15 08:29:00-05:00 +2024-04-13 04:20:19,809: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:20:19,809: root: INFO: Current backtesting datetime 2023-07-17 07:30:00-05:00 +2024-04-13 04:20:19,810: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:20:19,811: root: INFO: Current backtesting datetime 2023-07-17 08:30:00-05:00 +2024-04-13 04:20:19,811: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:20:19,812: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:19 +2024-04-13 04:20:19,812: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:19,813: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:19,813: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:19,814: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:19,814: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:21,762: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:21,763: root: INFO: Current backtesting datetime 2023-07-17 15:00:00-05:00 +2024-04-13 04:20:21,763: root: INFO: Current backtesting datetime 2023-07-18 08:30:00-05:00 +2024-04-13 04:20:21,764: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:21 +2024-04-13 04:20:21,764: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:21,765: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:21,765: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:21,765: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:21,765: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:24,959: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:24,960: root: INFO: Current backtesting datetime 2023-07-18 15:00:00-05:00 +2024-04-13 04:20:24,960: root: INFO: Current backtesting datetime 2023-07-19 08:30:00-05:00 +2024-04-13 04:20:24,961: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:24 +2024-04-13 04:20:24,961: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:24,961: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:24,962: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:24,962: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:24,962: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:26,425: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:26,426: root: INFO: Current backtesting datetime 2023-07-19 15:00:00-05:00 +2024-04-13 04:20:26,426: root: INFO: Current backtesting datetime 2023-07-20 08:30:00-05:00 +2024-04-13 04:20:26,427: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:26 +2024-04-13 04:20:26,427: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:26,428: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:26,428: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:26,429: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:26,429: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:28,106: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:28,107: root: INFO: Current backtesting datetime 2023-07-20 15:00:00-05:00 +2024-04-13 04:20:28,107: root: INFO: Current backtesting datetime 2023-07-21 08:30:00-05:00 +2024-04-13 04:20:28,108: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:28 +2024-04-13 04:20:28,108: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:28,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:28,109: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:28,110: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:28,110: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:30,159: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:30,160: root: INFO: Current backtesting datetime 2023-07-21 15:00:00-05:00 +2024-04-13 04:20:30,161: root: INFO: Current backtesting datetime 2023-07-22 08:30:00-05:00 +2024-04-13 04:20:30,161: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:20:30,162: root: INFO: Current backtesting datetime 2023-07-22 08:29:00-05:00 +2024-04-13 04:20:30,164: root: INFO: Current backtesting datetime 2023-07-22 08:29:00-05:00 +2024-04-13 04:20:30,164: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:20:30,165: root: INFO: Current backtesting datetime 2023-07-24 07:30:00-05:00 +2024-04-13 04:20:30,165: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:20:30,166: root: INFO: Current backtesting datetime 2023-07-24 08:30:00-05:00 +2024-04-13 04:20:30,166: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:20:30,167: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:30 +2024-04-13 04:20:30,167: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:30,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:30,168: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:30,169: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:30,169: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:31,973: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:31,975: root: INFO: Current backtesting datetime 2023-07-24 15:00:00-05:00 +2024-04-13 04:20:31,975: root: INFO: Current backtesting datetime 2023-07-25 08:30:00-05:00 +2024-04-13 04:20:31,976: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:31 +2024-04-13 04:20:31,976: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:31,976: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:31,976: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:31,976: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:31,976: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:33,745: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:33,747: root: INFO: Current backtesting datetime 2023-07-25 15:00:00-05:00 +2024-04-13 04:20:33,747: root: INFO: Current backtesting datetime 2023-07-26 08:30:00-05:00 +2024-04-13 04:20:33,747: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:33 +2024-04-13 04:20:33,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:33,748: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:33,749: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:33,749: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:33,749: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:38,261: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:38,262: root: INFO: Current backtesting datetime 2023-07-26 15:00:00-05:00 +2024-04-13 04:20:38,263: root: INFO: Current backtesting datetime 2023-07-27 08:30:00-05:00 +2024-04-13 04:20:38,263: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:38 +2024-04-13 04:20:38,263: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:38,264: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:38,264: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:38,265: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:38,265: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:40,650: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:40,651: root: INFO: Current backtesting datetime 2023-07-27 15:00:00-05:00 +2024-04-13 04:20:40,651: root: INFO: Current backtesting datetime 2023-07-28 08:30:00-05:00 +2024-04-13 04:20:40,652: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:40 +2024-04-13 04:20:40,652: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:40,652: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:40,653: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:40,653: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:40,653: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:42,345: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:42,346: root: INFO: Current backtesting datetime 2023-07-28 15:00:00-05:00 +2024-04-13 04:20:42,346: root: INFO: Current backtesting datetime 2023-07-29 08:30:00-05:00 +2024-04-13 04:20:42,347: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:20:42,348: root: INFO: Current backtesting datetime 2023-07-29 08:29:00-05:00 +2024-04-13 04:20:42,350: root: INFO: Current backtesting datetime 2023-07-29 08:29:00-05:00 +2024-04-13 04:20:42,350: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:20:42,351: root: INFO: Current backtesting datetime 2023-07-31 07:30:00-05:00 +2024-04-13 04:20:42,351: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:20:42,352: root: INFO: Current backtesting datetime 2023-07-31 08:30:00-05:00 +2024-04-13 04:20:42,352: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:20:42,353: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:42 +2024-04-13 04:20:42,353: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:42,354: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:42,354: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:42,355: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:42,355: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:44,928: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:44,929: root: INFO: Current backtesting datetime 2023-07-31 15:00:00-05:00 +2024-04-13 04:20:44,929: root: INFO: Current backtesting datetime 2023-08-01 08:30:00-05:00 +2024-04-13 04:20:44,930: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:44 +2024-04-13 04:20:44,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:44,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:44,931: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:44,931: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:44,931: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:47,359: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:47,360: root: INFO: Current backtesting datetime 2023-08-01 15:00:00-05:00 +2024-04-13 04:20:47,360: root: INFO: Current backtesting datetime 2023-08-02 08:30:00-05:00 +2024-04-13 04:20:47,361: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:47 +2024-04-13 04:20:47,362: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:47,362: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:47,363: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:47,363: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:47,363: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:50,856: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:50,857: root: INFO: Current backtesting datetime 2023-08-02 15:00:00-05:00 +2024-04-13 04:20:50,858: root: INFO: Current backtesting datetime 2023-08-03 08:30:00-05:00 +2024-04-13 04:20:50,858: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:50 +2024-04-13 04:20:50,858: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:50,859: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:50,859: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:50,860: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:50,860: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:53,280: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:53,281: root: INFO: Current backtesting datetime 2023-08-03 15:00:00-05:00 +2024-04-13 04:20:53,281: root: INFO: Current backtesting datetime 2023-08-04 08:30:00-05:00 +2024-04-13 04:20:53,281: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:53 +2024-04-13 04:20:53,282: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:53,282: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:53,283: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:53,283: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:53,283: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:55,995: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:55,996: root: INFO: Current backtesting datetime 2023-08-04 15:00:00-05:00 +2024-04-13 04:20:55,996: root: INFO: Current backtesting datetime 2023-08-05 08:30:00-05:00 +2024-04-13 04:20:55,996: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:20:55,998: root: INFO: Current backtesting datetime 2023-08-05 08:29:00-05:00 +2024-04-13 04:20:55,999: root: INFO: Current backtesting datetime 2023-08-05 08:29:00-05:00 +2024-04-13 04:20:55,999: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:20:56,000: root: INFO: Current backtesting datetime 2023-08-07 07:30:00-05:00 +2024-04-13 04:20:56,000: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:20:56,001: root: INFO: Current backtesting datetime 2023-08-07 08:30:00-05:00 +2024-04-13 04:20:56,001: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:20:56,002: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:56 +2024-04-13 04:20:56,003: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:56,003: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:56,004: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:56,004: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:56,004: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:57,234: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:57,234: root: INFO: Current backtesting datetime 2023-08-07 15:00:00-05:00 +2024-04-13 04:20:57,235: root: INFO: Current backtesting datetime 2023-08-08 08:30:00-05:00 +2024-04-13 04:20:57,236: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:57 +2024-04-13 04:20:57,236: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:57,236: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:57,236: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:57,237: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:57,237: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:20:58,735: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:20:58,736: root: INFO: Current backtesting datetime 2023-08-08 15:00:00-05:00 +2024-04-13 04:20:58,737: root: INFO: Current backtesting datetime 2023-08-09 08:30:00-05:00 +2024-04-13 04:20:58,737: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:20:58 +2024-04-13 04:20:58,737: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:58,738: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:20:58,738: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:20:58,739: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:20:58,739: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:00,824: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:00,825: root: INFO: Current backtesting datetime 2023-08-09 15:00:00-05:00 +2024-04-13 04:21:00,825: root: INFO: Current backtesting datetime 2023-08-10 08:30:00-05:00 +2024-04-13 04:21:00,825: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:00 +2024-04-13 04:21:00,826: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:00,826: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:00,827: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:00,827: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:00,827: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:01,728: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:01,729: root: INFO: Current backtesting datetime 2023-08-10 15:00:00-05:00 +2024-04-13 04:21:01,729: root: INFO: Current backtesting datetime 2023-08-11 08:30:00-05:00 +2024-04-13 04:21:01,730: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:01 +2024-04-13 04:21:01,730: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:01,731: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:01,731: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:01,731: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:01,731: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:02,605: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:02,606: root: INFO: Current backtesting datetime 2023-08-11 15:00:00-05:00 +2024-04-13 04:21:02,607: root: INFO: Current backtesting datetime 2023-08-12 08:30:00-05:00 +2024-04-13 04:21:02,607: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:21:02,608: root: INFO: Current backtesting datetime 2023-08-12 08:29:00-05:00 +2024-04-13 04:21:02,610: root: INFO: Current backtesting datetime 2023-08-12 08:29:00-05:00 +2024-04-13 04:21:02,610: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:21:02,611: root: INFO: Current backtesting datetime 2023-08-14 07:30:00-05:00 +2024-04-13 04:21:02,611: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:21:02,612: root: INFO: Current backtesting datetime 2023-08-14 08:30:00-05:00 +2024-04-13 04:21:02,612: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:21:02,613: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:02 +2024-04-13 04:21:02,613: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:02,614: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:02,614: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:02,615: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:02,615: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:03,348: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:03,349: root: INFO: Current backtesting datetime 2023-08-14 15:00:00-05:00 +2024-04-13 04:21:03,349: root: INFO: Current backtesting datetime 2023-08-15 08:30:00-05:00 +2024-04-13 04:21:03,349: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:03 +2024-04-13 04:21:03,350: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:03,350: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:03,351: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:03,351: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:03,351: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:04,083: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:04,084: root: INFO: Current backtesting datetime 2023-08-15 15:00:00-05:00 +2024-04-13 04:21:04,084: root: INFO: Current backtesting datetime 2023-08-16 08:30:00-05:00 +2024-04-13 04:21:04,085: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:04 +2024-04-13 04:21:04,085: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:04,086: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:04,086: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:04,086: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:04,086: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:04,817: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:04,818: root: INFO: Current backtesting datetime 2023-08-16 15:00:00-05:00 +2024-04-13 04:21:04,819: root: INFO: Current backtesting datetime 2023-08-17 08:30:00-05:00 +2024-04-13 04:21:04,819: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:04 +2024-04-13 04:21:04,819: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:04,820: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:04,820: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:04,821: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:04,821: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:05,387: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:05,388: root: INFO: Current backtesting datetime 2023-08-17 15:00:00-05:00 +2024-04-13 04:21:05,389: root: INFO: Current backtesting datetime 2023-08-18 08:30:00-05:00 +2024-04-13 04:21:05,389: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:05 +2024-04-13 04:21:05,389: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:05,390: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:05,390: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:05,391: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:05,391: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:06,080: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:06,081: root: INFO: Current backtesting datetime 2023-08-18 15:00:00-05:00 +2024-04-13 04:21:06,081: root: INFO: Current backtesting datetime 2023-08-19 08:30:00-05:00 +2024-04-13 04:21:06,081: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:21:06,083: root: INFO: Current backtesting datetime 2023-08-19 08:29:00-05:00 +2024-04-13 04:21:06,084: root: INFO: Current backtesting datetime 2023-08-19 08:29:00-05:00 +2024-04-13 04:21:06,084: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:21:06,085: root: INFO: Current backtesting datetime 2023-08-21 07:30:00-05:00 +2024-04-13 04:21:06,085: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:21:06,086: root: INFO: Current backtesting datetime 2023-08-21 08:30:00-05:00 +2024-04-13 04:21:06,086: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:21:06,087: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:06 +2024-04-13 04:21:06,088: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:06,088: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:06,089: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:06,089: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:06,089: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:07,187: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:07,188: root: INFO: Current backtesting datetime 2023-08-21 15:00:00-05:00 +2024-04-13 04:21:07,189: root: INFO: Current backtesting datetime 2023-08-22 08:30:00-05:00 +2024-04-13 04:21:07,189: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:07 +2024-04-13 04:21:07,189: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:07,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:07,190: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:07,191: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:07,191: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:07,975: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:07,976: root: INFO: Current backtesting datetime 2023-08-22 15:00:00-05:00 +2024-04-13 04:21:07,977: root: INFO: Current backtesting datetime 2023-08-23 08:30:00-05:00 +2024-04-13 04:21:07,977: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:07 +2024-04-13 04:21:07,977: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:07,978: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:07,978: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:07,979: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:07,979: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:08,616: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:08,617: root: INFO: Current backtesting datetime 2023-08-23 15:00:00-05:00 +2024-04-13 04:21:08,618: root: INFO: Current backtesting datetime 2023-08-24 08:30:00-05:00 +2024-04-13 04:21:08,618: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:08 +2024-04-13 04:21:08,618: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:08,619: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:08,619: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:08,620: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:08,620: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:09,449: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:09,450: root: INFO: Current backtesting datetime 2023-08-24 15:00:00-05:00 +2024-04-13 04:21:09,450: root: INFO: Current backtesting datetime 2023-08-25 08:30:00-05:00 +2024-04-13 04:21:09,451: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:09 +2024-04-13 04:21:09,451: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:09,452: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:09,452: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:09,452: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:09,453: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:10,194: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:10,195: root: INFO: Current backtesting datetime 2023-08-25 15:00:00-05:00 +2024-04-13 04:21:10,195: root: INFO: Current backtesting datetime 2023-08-26 08:30:00-05:00 +2024-04-13 04:21:10,196: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:21:10,197: root: INFO: Current backtesting datetime 2023-08-26 08:29:00-05:00 +2024-04-13 04:21:10,198: root: INFO: Current backtesting datetime 2023-08-26 08:29:00-05:00 +2024-04-13 04:21:10,198: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:21:10,199: root: INFO: Current backtesting datetime 2023-08-28 07:30:00-05:00 +2024-04-13 04:21:10,200: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:21:10,201: root: INFO: Current backtesting datetime 2023-08-28 08:30:00-05:00 +2024-04-13 04:21:10,201: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:21:10,202: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:10 +2024-04-13 04:21:10,202: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:10,203: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:10,203: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:10,203: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:10,203: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:10,996: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:10,997: root: INFO: Current backtesting datetime 2023-08-28 15:00:00-05:00 +2024-04-13 04:21:10,998: root: INFO: Current backtesting datetime 2023-08-29 08:30:00-05:00 +2024-04-13 04:21:10,998: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:10 +2024-04-13 04:21:10,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:10,999: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:10,999: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:11,000: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:11,000: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:12,042: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:12,043: root: INFO: Current backtesting datetime 2023-08-29 15:00:00-05:00 +2024-04-13 04:21:12,043: root: INFO: Current backtesting datetime 2023-08-30 08:30:00-05:00 +2024-04-13 04:21:12,044: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:12 +2024-04-13 04:21:12,044: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:12,045: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:12,045: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:12,045: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:12,045: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:12,914: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:12,915: root: INFO: Current backtesting datetime 2023-08-30 15:00:00-05:00 +2024-04-13 04:21:12,915: root: INFO: Current backtesting datetime 2023-08-31 08:30:00-05:00 +2024-04-13 04:21:12,916: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:12 +2024-04-13 04:21:12,916: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:12,917: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:12,917: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:12,917: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:12,917: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:13,516: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:13,517: root: INFO: Current backtesting datetime 2023-08-31 15:00:00-05:00 +2024-04-13 04:21:13,518: root: INFO: Current backtesting datetime 2023-09-01 08:30:00-05:00 +2024-04-13 04:21:13,518: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:13 +2024-04-13 04:21:13,518: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:13,519: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:13,519: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:13,520: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:13,520: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:14,037: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:14,038: root: INFO: Current backtesting datetime 2023-09-01 15:00:00-05:00 +2024-04-13 04:21:14,038: root: INFO: Current backtesting datetime 2023-09-02 08:30:00-05:00 +2024-04-13 04:21:14,038: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:21:14,039: root: INFO: Current backtesting datetime 2023-09-02 08:29:00-05:00 +2024-04-13 04:21:14,041: root: INFO: Current backtesting datetime 2023-09-02 08:29:00-05:00 +2024-04-13 04:21:14,041: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:21:14,042: root: INFO: Current backtesting datetime 2023-09-05 07:30:00-05:00 +2024-04-13 04:21:14,043: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:21:14,044: root: INFO: Current backtesting datetime 2023-09-05 08:30:00-05:00 +2024-04-13 04:21:14,044: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:21:14,045: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:14 +2024-04-13 04:21:14,045: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:14,046: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:14,046: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:14,046: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:14,046: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:14,832: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:14,833: root: INFO: Current backtesting datetime 2023-09-05 15:00:00-05:00 +2024-04-13 04:21:14,833: root: INFO: Current backtesting datetime 2023-09-06 08:30:00-05:00 +2024-04-13 04:21:14,834: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:14 +2024-04-13 04:21:14,834: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:14,835: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:14,835: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:14,835: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:14,835: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:15,410: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:15,411: root: INFO: Current backtesting datetime 2023-09-06 15:00:00-05:00 +2024-04-13 04:21:15,411: root: INFO: Current backtesting datetime 2023-09-07 08:30:00-05:00 +2024-04-13 04:21:15,411: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:15 +2024-04-13 04:21:15,411: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:15,412: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:15,412: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:15,412: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:15,412: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:16,159: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:16,160: root: INFO: Current backtesting datetime 2023-09-07 15:00:00-05:00 +2024-04-13 04:21:16,160: root: INFO: Current backtesting datetime 2023-09-08 08:30:00-05:00 +2024-04-13 04:21:16,161: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:16 +2024-04-13 04:21:16,161: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:16,162: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:16,162: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:16,162: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:16,162: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:17,184: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:17,185: root: INFO: Current backtesting datetime 2023-09-08 15:00:00-05:00 +2024-04-13 04:21:17,185: root: INFO: Current backtesting datetime 2023-09-09 08:30:00-05:00 +2024-04-13 04:21:17,185: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:21:17,187: root: INFO: Current backtesting datetime 2023-09-09 08:29:00-05:00 +2024-04-13 04:21:17,188: root: INFO: Current backtesting datetime 2023-09-09 08:29:00-05:00 +2024-04-13 04:21:17,188: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:21:17,189: root: INFO: Current backtesting datetime 2023-09-11 07:30:00-05:00 +2024-04-13 04:21:17,190: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:21:17,190: root: INFO: Current backtesting datetime 2023-09-11 08:30:00-05:00 +2024-04-13 04:21:17,190: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:21:17,192: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:17 +2024-04-13 04:21:17,192: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:17,193: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:17,193: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:17,193: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:17,193: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:17,941: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:17,942: root: INFO: Current backtesting datetime 2023-09-11 15:00:00-05:00 +2024-04-13 04:21:17,942: root: INFO: Current backtesting datetime 2023-09-12 08:30:00-05:00 +2024-04-13 04:21:17,943: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:17 +2024-04-13 04:21:17,943: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:17,943: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:17,944: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:17,944: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:17,944: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:18,522: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:18,524: root: INFO: Current backtesting datetime 2023-09-12 15:00:00-05:00 +2024-04-13 04:21:18,524: root: INFO: Current backtesting datetime 2023-09-13 08:30:00-05:00 +2024-04-13 04:21:18,524: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:18 +2024-04-13 04:21:18,525: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:18,526: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:18,526: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:18,526: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:18,526: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:19,036: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:19,037: root: INFO: Current backtesting datetime 2023-09-13 15:00:00-05:00 +2024-04-13 04:21:19,038: root: INFO: Current backtesting datetime 2023-09-14 08:30:00-05:00 +2024-04-13 04:21:19,038: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:19 +2024-04-13 04:21:19,038: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:19,039: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:19,039: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:19,040: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:19,040: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:19,791: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:19,792: root: INFO: Current backtesting datetime 2023-09-14 15:00:00-05:00 +2024-04-13 04:21:19,792: root: INFO: Current backtesting datetime 2023-09-15 08:30:00-05:00 +2024-04-13 04:21:19,793: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:19 +2024-04-13 04:21:19,793: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:19,794: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:19,794: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:19,795: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:19,795: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:21,245: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:21,247: root: INFO: Current backtesting datetime 2023-09-15 15:00:00-05:00 +2024-04-13 04:21:21,247: root: INFO: Current backtesting datetime 2023-09-16 08:30:00-05:00 +2024-04-13 04:21:21,248: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:21:21,249: root: INFO: Current backtesting datetime 2023-09-16 08:29:00-05:00 +2024-04-13 04:21:21,250: root: INFO: Current backtesting datetime 2023-09-16 08:29:00-05:00 +2024-04-13 04:21:21,250: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:21:21,251: root: INFO: Current backtesting datetime 2023-09-18 07:30:00-05:00 +2024-04-13 04:21:21,252: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:21:21,253: root: INFO: Current backtesting datetime 2023-09-18 08:30:00-05:00 +2024-04-13 04:21:21,253: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:21:21,254: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:21 +2024-04-13 04:21:21,254: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:21,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:21,255: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:21,255: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:21,256: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:23,248: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:23,250: root: INFO: Current backtesting datetime 2023-09-18 15:00:00-05:00 +2024-04-13 04:21:23,250: root: INFO: Current backtesting datetime 2023-09-19 08:30:00-05:00 +2024-04-13 04:21:23,251: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:23 +2024-04-13 04:21:23,251: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:23,252: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:23,252: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:23,253: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:23,253: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:25,596: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:25,597: root: INFO: Current backtesting datetime 2023-09-19 15:00:00-05:00 +2024-04-13 04:21:25,597: root: INFO: Current backtesting datetime 2023-09-20 08:30:00-05:00 +2024-04-13 04:21:25,598: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:25 +2024-04-13 04:21:25,598: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:25,599: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:25,599: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:25,599: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:25,600: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:27,677: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:27,678: root: INFO: Current backtesting datetime 2023-09-20 15:00:00-05:00 +2024-04-13 04:21:27,679: root: INFO: Current backtesting datetime 2023-09-21 08:30:00-05:00 +2024-04-13 04:21:27,679: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:27 +2024-04-13 04:21:27,679: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:27,680: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:27,680: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:27,681: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:27,681: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:29,737: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:29,738: root: INFO: Current backtesting datetime 2023-09-21 15:00:00-05:00 +2024-04-13 04:21:29,738: root: INFO: Current backtesting datetime 2023-09-22 08:30:00-05:00 +2024-04-13 04:21:29,739: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:29 +2024-04-13 04:21:29,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:29,740: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:29,740: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:29,741: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:29,741: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:31,650: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:31,650: root: INFO: Current backtesting datetime 2023-09-22 15:00:00-05:00 +2024-04-13 04:21:31,651: root: INFO: Current backtesting datetime 2023-09-23 08:30:00-05:00 +2024-04-13 04:21:31,651: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:21:31,653: root: INFO: Current backtesting datetime 2023-09-23 08:29:00-05:00 +2024-04-13 04:21:31,654: root: INFO: Current backtesting datetime 2023-09-23 08:29:00-05:00 +2024-04-13 04:21:31,654: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:21:31,655: root: INFO: Current backtesting datetime 2023-09-25 07:30:00-05:00 +2024-04-13 04:21:31,655: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:21:31,656: root: INFO: Current backtesting datetime 2023-09-25 08:30:00-05:00 +2024-04-13 04:21:31,656: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:21:31,657: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:31 +2024-04-13 04:21:31,657: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:31,658: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:31,658: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:31,658: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:31,659: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:33,337: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:33,338: root: INFO: Current backtesting datetime 2023-09-25 15:00:00-05:00 +2024-04-13 04:21:33,338: root: INFO: Current backtesting datetime 2023-09-26 08:30:00-05:00 +2024-04-13 04:21:33,338: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:33 +2024-04-13 04:21:33,338: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:33,339: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:33,340: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:33,340: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:33,340: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:35,223: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:35,224: root: INFO: Current backtesting datetime 2023-09-26 15:00:00-05:00 +2024-04-13 04:21:35,224: root: INFO: Current backtesting datetime 2023-09-27 08:30:00-05:00 +2024-04-13 04:21:35,225: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:35 +2024-04-13 04:21:35,225: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:35,226: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:35,226: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:35,226: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:35,226: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:38,478: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:38,479: root: INFO: Current backtesting datetime 2023-09-27 15:00:00-05:00 +2024-04-13 04:21:38,479: root: INFO: Current backtesting datetime 2023-09-28 08:30:00-05:00 +2024-04-13 04:21:38,480: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:38 +2024-04-13 04:21:38,480: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:38,480: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:38,481: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:38,481: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:38,481: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:40,094: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:40,094: root: INFO: Current backtesting datetime 2023-09-28 15:00:00-05:00 +2024-04-13 04:21:40,095: root: INFO: Current backtesting datetime 2023-09-29 08:30:00-05:00 +2024-04-13 04:21:40,095: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:40 +2024-04-13 04:21:40,095: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:40,096: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:40,096: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:40,097: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:40,097: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:42,570: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:42,571: root: INFO: Current backtesting datetime 2023-09-29 15:00:00-05:00 +2024-04-13 04:21:42,572: root: INFO: Current backtesting datetime 2023-09-30 08:30:00-05:00 +2024-04-13 04:21:42,572: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:21:42,574: root: INFO: Current backtesting datetime 2023-09-30 08:29:00-05:00 +2024-04-13 04:21:42,575: root: INFO: Current backtesting datetime 2023-09-30 08:29:00-05:00 +2024-04-13 04:21:42,575: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:21:42,576: root: INFO: Current backtesting datetime 2023-10-02 07:30:00-05:00 +2024-04-13 04:21:42,576: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:21:42,577: root: INFO: Current backtesting datetime 2023-10-02 08:30:00-05:00 +2024-04-13 04:21:42,577: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:21:42,578: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:42 +2024-04-13 04:21:42,578: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:42,579: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:42,579: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:42,580: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:42,580: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:44,637: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:44,638: root: INFO: Current backtesting datetime 2023-10-02 15:00:00-05:00 +2024-04-13 04:21:44,638: root: INFO: Current backtesting datetime 2023-10-03 08:30:00-05:00 +2024-04-13 04:21:44,638: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:44 +2024-04-13 04:21:44,638: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:44,639: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:44,640: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:44,640: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:44,640: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:48,068: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:48,069: root: INFO: Current backtesting datetime 2023-10-03 15:00:00-05:00 +2024-04-13 04:21:48,070: root: INFO: Current backtesting datetime 2023-10-04 08:30:00-05:00 +2024-04-13 04:21:48,070: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:48 +2024-04-13 04:21:48,070: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:48,071: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:48,071: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:48,072: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:48,072: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:50,167: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:50,168: root: INFO: Current backtesting datetime 2023-10-04 15:00:00-05:00 +2024-04-13 04:21:50,169: root: INFO: Current backtesting datetime 2023-10-05 08:30:00-05:00 +2024-04-13 04:21:50,169: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:50 +2024-04-13 04:21:50,169: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:50,170: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:50,170: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:50,171: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:50,171: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:52,983: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:52,984: root: INFO: Current backtesting datetime 2023-10-05 15:00:00-05:00 +2024-04-13 04:21:52,984: root: INFO: Current backtesting datetime 2023-10-06 08:30:00-05:00 +2024-04-13 04:21:52,984: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:52 +2024-04-13 04:21:52,984: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:52,985: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:52,986: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:52,986: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:52,986: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:21:56,046: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:21:56,046: root: INFO: Current backtesting datetime 2023-10-06 15:00:00-05:00 +2024-04-13 04:21:56,047: root: INFO: Current backtesting datetime 2023-10-07 08:30:00-05:00 +2024-04-13 04:21:56,047: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:21:56,048: root: INFO: Current backtesting datetime 2023-10-07 08:29:00-05:00 +2024-04-13 04:21:56,050: root: INFO: Current backtesting datetime 2023-10-07 08:29:00-05:00 +2024-04-13 04:21:56,050: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:21:56,050: root: INFO: Current backtesting datetime 2023-10-09 07:30:00-05:00 +2024-04-13 04:21:56,051: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:21:56,052: root: INFO: Current backtesting datetime 2023-10-09 08:30:00-05:00 +2024-04-13 04:21:56,052: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:21:56,053: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:21:56 +2024-04-13 04:21:56,053: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:56,054: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:21:56,054: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:21:56,055: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:21:56,055: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:01,572: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:01,573: root: INFO: Current backtesting datetime 2023-10-09 15:00:00-05:00 +2024-04-13 04:22:01,573: root: INFO: Current backtesting datetime 2023-10-10 08:30:00-05:00 +2024-04-13 04:22:01,574: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:01 +2024-04-13 04:22:01,574: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:01,574: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:01,575: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:01,575: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:01,575: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:05,204: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:05,204: root: INFO: Current backtesting datetime 2023-10-10 15:00:00-05:00 +2024-04-13 04:22:05,205: root: INFO: Current backtesting datetime 2023-10-11 08:30:00-05:00 +2024-04-13 04:22:05,205: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:05 +2024-04-13 04:22:05,205: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:05,206: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:05,206: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:05,207: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:05,207: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:09,987: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:09,988: root: INFO: Current backtesting datetime 2023-10-11 15:00:00-05:00 +2024-04-13 04:22:09,988: root: INFO: Current backtesting datetime 2023-10-12 08:30:00-05:00 +2024-04-13 04:22:09,989: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:09 +2024-04-13 04:22:09,989: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:09,990: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:09,990: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:09,990: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:09,991: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:12,611: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:12,612: root: INFO: Current backtesting datetime 2023-10-12 15:00:00-05:00 +2024-04-13 04:22:12,612: root: INFO: Current backtesting datetime 2023-10-13 08:30:00-05:00 +2024-04-13 04:22:12,613: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:12 +2024-04-13 04:22:12,613: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:12,614: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:12,614: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:12,614: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:12,614: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:14,212: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:14,213: root: INFO: Current backtesting datetime 2023-10-13 15:00:00-05:00 +2024-04-13 04:22:14,213: root: INFO: Current backtesting datetime 2023-10-14 08:30:00-05:00 +2024-04-13 04:22:14,213: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:22:14,215: root: INFO: Current backtesting datetime 2023-10-14 08:29:00-05:00 +2024-04-13 04:22:14,216: root: INFO: Current backtesting datetime 2023-10-14 08:29:00-05:00 +2024-04-13 04:22:14,216: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:22:14,217: root: INFO: Current backtesting datetime 2023-10-16 07:30:00-05:00 +2024-04-13 04:22:14,217: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:22:14,218: root: INFO: Current backtesting datetime 2023-10-16 08:30:00-05:00 +2024-04-13 04:22:14,218: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:22:14,219: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:14 +2024-04-13 04:22:14,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:14,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:14,221: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:14,221: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:14,221: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:16,748: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:16,749: root: INFO: Current backtesting datetime 2023-10-16 15:00:00-05:00 +2024-04-13 04:22:16,749: root: INFO: Current backtesting datetime 2023-10-17 08:30:00-05:00 +2024-04-13 04:22:16,750: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:16 +2024-04-13 04:22:16,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:16,751: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:16,751: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:16,751: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:16,751: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:18,633: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:18,634: root: INFO: Current backtesting datetime 2023-10-17 15:00:00-05:00 +2024-04-13 04:22:18,634: root: INFO: Current backtesting datetime 2023-10-18 08:30:00-05:00 +2024-04-13 04:22:18,634: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:18 +2024-04-13 04:22:18,635: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:18,635: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:18,636: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:18,636: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:18,636: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:22,142: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:22,143: root: INFO: Current backtesting datetime 2023-10-18 15:00:00-05:00 +2024-04-13 04:22:22,143: root: INFO: Current backtesting datetime 2023-10-19 08:30:00-05:00 +2024-04-13 04:22:22,144: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:22 +2024-04-13 04:22:22,144: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:22,145: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:22,145: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:22,146: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:22,146: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:25,142: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:25,143: root: INFO: Current backtesting datetime 2023-10-19 15:00:00-05:00 +2024-04-13 04:22:25,143: root: INFO: Current backtesting datetime 2023-10-20 08:30:00-05:00 +2024-04-13 04:22:25,144: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:25 +2024-04-13 04:22:25,144: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:25,144: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:25,145: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:25,145: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:25,145: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:27,495: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:27,496: root: INFO: Current backtesting datetime 2023-10-20 15:00:00-05:00 +2024-04-13 04:22:27,496: root: INFO: Current backtesting datetime 2023-10-21 08:30:00-05:00 +2024-04-13 04:22:27,497: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:22:27,498: root: INFO: Current backtesting datetime 2023-10-21 08:29:00-05:00 +2024-04-13 04:22:27,499: root: INFO: Current backtesting datetime 2023-10-21 08:29:00-05:00 +2024-04-13 04:22:27,500: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:22:27,500: root: INFO: Current backtesting datetime 2023-10-23 07:30:00-05:00 +2024-04-13 04:22:27,501: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:22:27,502: root: INFO: Current backtesting datetime 2023-10-23 08:30:00-05:00 +2024-04-13 04:22:27,502: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:22:27,503: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:27 +2024-04-13 04:22:27,503: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:27,504: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:27,504: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:27,505: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:27,505: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:30,149: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:30,150: root: INFO: Current backtesting datetime 2023-10-23 15:00:00-05:00 +2024-04-13 04:22:30,151: root: INFO: Current backtesting datetime 2023-10-24 08:30:00-05:00 +2024-04-13 04:22:30,151: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:30 +2024-04-13 04:22:30,151: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:30,152: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:30,152: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:30,153: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:30,153: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:33,150: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:33,151: root: INFO: Current backtesting datetime 2023-10-24 15:00:00-05:00 +2024-04-13 04:22:33,152: root: INFO: Current backtesting datetime 2023-10-25 08:30:00-05:00 +2024-04-13 04:22:33,152: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:33 +2024-04-13 04:22:33,152: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:33,153: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:33,153: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:33,154: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:33,154: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:37,983: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:37,984: root: INFO: Current backtesting datetime 2023-10-25 15:00:00-05:00 +2024-04-13 04:22:37,985: root: INFO: Current backtesting datetime 2023-10-26 08:30:00-05:00 +2024-04-13 04:22:37,985: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:37 +2024-04-13 04:22:37,985: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:37,986: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:37,986: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:37,987: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:37,987: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:39,962: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:39,963: root: INFO: Current backtesting datetime 2023-10-26 15:00:00-05:00 +2024-04-13 04:22:39,963: root: INFO: Current backtesting datetime 2023-10-27 08:30:00-05:00 +2024-04-13 04:22:39,964: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:39 +2024-04-13 04:22:39,964: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:39,965: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:39,965: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:39,966: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:39,966: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:43,083: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:43,084: root: INFO: Current backtesting datetime 2023-10-27 15:00:00-05:00 +2024-04-13 04:22:43,084: root: INFO: Current backtesting datetime 2023-10-28 08:30:00-05:00 +2024-04-13 04:22:43,085: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:22:43,086: root: INFO: Current backtesting datetime 2023-10-28 08:29:00-05:00 +2024-04-13 04:22:43,087: root: INFO: Current backtesting datetime 2023-10-28 08:29:00-05:00 +2024-04-13 04:22:43,087: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:22:43,088: root: INFO: Current backtesting datetime 2023-10-30 07:30:00-05:00 +2024-04-13 04:22:43,089: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:22:43,089: root: INFO: Current backtesting datetime 2023-10-30 08:30:00-05:00 +2024-04-13 04:22:43,090: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:22:43,091: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:43 +2024-04-13 04:22:43,091: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:43,091: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:43,092: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:43,092: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:43,092: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:50,385: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:50,386: root: INFO: Current backtesting datetime 2023-10-30 15:00:00-05:00 +2024-04-13 04:22:50,387: root: INFO: Current backtesting datetime 2023-10-31 08:30:00-05:00 +2024-04-13 04:22:50,387: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:50 +2024-04-13 04:22:50,387: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:50,388: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:50,388: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:50,389: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:50,389: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:22:55,255: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:22:55,256: root: INFO: Current backtesting datetime 2023-10-31 15:00:00-05:00 +2024-04-13 04:22:55,256: root: INFO: Current backtesting datetime 2023-11-01 08:30:00-05:00 +2024-04-13 04:22:55,257: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:22:55 +2024-04-13 04:22:55,257: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:55,258: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:22:55,258: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:22:55,258: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:22:55,259: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:00,199: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:00,200: root: INFO: Current backtesting datetime 2023-11-01 15:00:00-05:00 +2024-04-13 04:23:00,201: root: INFO: Current backtesting datetime 2023-11-02 08:30:00-05:00 +2024-04-13 04:23:00,201: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:00 +2024-04-13 04:23:00,201: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:00,202: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:00,202: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:00,203: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:00,203: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:02,763: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:02,764: root: INFO: Current backtesting datetime 2023-11-02 15:00:00-05:00 +2024-04-13 04:23:02,765: root: INFO: Current backtesting datetime 2023-11-03 08:30:00-05:00 +2024-04-13 04:23:02,765: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:02 +2024-04-13 04:23:02,765: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:02,766: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:02,766: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:02,767: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:02,767: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:04,588: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:04,589: root: INFO: Current backtesting datetime 2023-11-03 15:00:00-05:00 +2024-04-13 04:23:04,590: root: INFO: Current backtesting datetime 2023-11-04 08:30:00-05:00 +2024-04-13 04:23:04,590: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:23:04,591: root: INFO: Current backtesting datetime 2023-11-04 08:29:00-05:00 +2024-04-13 04:23:04,593: root: INFO: Current backtesting datetime 2023-11-04 08:29:00-05:00 +2024-04-13 04:23:04,593: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:23:04,594: root: INFO: Current backtesting datetime 2023-11-06 08:30:00-05:00 +2024-04-13 04:23:04,594: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:23:04,595: root: INFO: Current backtesting datetime 2023-11-06 09:30:00-05:00 +2024-04-13 04:23:04,595: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:23:04,596: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:04 +2024-04-13 04:23:04,596: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:04,597: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:04,597: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:04,598: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:04,598: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:05,923: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:05,924: root: INFO: Current backtesting datetime 2023-11-06 16:00:00-05:00 +2024-04-13 04:23:05,925: root: INFO: Current backtesting datetime 2023-11-07 09:30:00-05:00 +2024-04-13 04:23:05,925: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:05 +2024-04-13 04:23:05,925: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:05,926: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:05,927: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:05,927: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:05,927: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:07,657: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:07,658: root: INFO: Current backtesting datetime 2023-11-07 16:00:00-05:00 +2024-04-13 04:23:07,659: root: INFO: Current backtesting datetime 2023-11-08 09:30:00-05:00 +2024-04-13 04:23:07,659: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:07 +2024-04-13 04:23:07,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:07,660: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:07,660: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:07,661: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:07,661: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:09,449: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:09,450: root: INFO: Current backtesting datetime 2023-11-08 16:00:00-05:00 +2024-04-13 04:23:09,451: root: INFO: Current backtesting datetime 2023-11-09 09:30:00-05:00 +2024-04-13 04:23:09,451: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:09 +2024-04-13 04:23:09,451: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:09,452: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:09,453: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:09,453: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:09,453: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:10,534: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:10,535: root: INFO: Current backtesting datetime 2023-11-09 16:00:00-05:00 +2024-04-13 04:23:10,535: root: INFO: Current backtesting datetime 2023-11-10 09:30:00-05:00 +2024-04-13 04:23:10,536: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:10 +2024-04-13 04:23:10,536: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:10,537: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:10,537: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:10,538: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:10,538: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:11,313: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:11,314: root: INFO: Current backtesting datetime 2023-11-10 16:00:00-05:00 +2024-04-13 04:23:11,314: root: INFO: Current backtesting datetime 2023-11-11 09:30:00-05:00 +2024-04-13 04:23:11,314: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:23:11,316: root: INFO: Current backtesting datetime 2023-11-11 09:29:00-05:00 +2024-04-13 04:23:11,317: root: INFO: Current backtesting datetime 2023-11-11 09:29:00-05:00 +2024-04-13 04:23:11,317: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:23:11,317: root: INFO: Current backtesting datetime 2023-11-13 08:30:00-05:00 +2024-04-13 04:23:11,318: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:23:11,319: root: INFO: Current backtesting datetime 2023-11-13 09:30:00-05:00 +2024-04-13 04:23:11,319: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:23:11,320: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:11 +2024-04-13 04:23:11,320: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:11,321: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:11,321: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:11,322: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:11,322: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:12,847: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:12,848: root: INFO: Current backtesting datetime 2023-11-13 16:00:00-05:00 +2024-04-13 04:23:12,848: root: INFO: Current backtesting datetime 2023-11-14 09:30:00-05:00 +2024-04-13 04:23:12,849: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:12 +2024-04-13 04:23:12,849: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:12,850: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:12,850: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:12,850: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:12,850: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:14,381: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:14,382: root: INFO: Current backtesting datetime 2023-11-14 16:00:00-05:00 +2024-04-13 04:23:14,383: root: INFO: Current backtesting datetime 2023-11-15 09:30:00-05:00 +2024-04-13 04:23:14,383: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:14 +2024-04-13 04:23:14,383: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:14,384: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:14,384: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:14,384: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:14,384: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:15,803: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:15,804: root: INFO: Current backtesting datetime 2023-11-15 16:00:00-05:00 +2024-04-13 04:23:15,805: root: INFO: Current backtesting datetime 2023-11-16 09:30:00-05:00 +2024-04-13 04:23:15,805: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:15 +2024-04-13 04:23:15,805: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:15,806: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:15,806: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:15,807: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:15,807: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:16,708: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:16,709: root: INFO: Current backtesting datetime 2023-11-16 16:00:00-05:00 +2024-04-13 04:23:16,709: root: INFO: Current backtesting datetime 2023-11-17 09:30:00-05:00 +2024-04-13 04:23:16,709: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:16 +2024-04-13 04:23:16,710: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:16,710: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:16,711: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:16,711: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:16,711: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:17,720: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:17,721: root: INFO: Current backtesting datetime 2023-11-17 16:00:00-05:00 +2024-04-13 04:23:17,721: root: INFO: Current backtesting datetime 2023-11-18 09:30:00-05:00 +2024-04-13 04:23:17,722: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:23:17,723: root: INFO: Current backtesting datetime 2023-11-18 09:29:00-05:00 +2024-04-13 04:23:17,725: root: INFO: Current backtesting datetime 2023-11-18 09:29:00-05:00 +2024-04-13 04:23:17,725: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:23:17,726: root: INFO: Current backtesting datetime 2023-11-20 08:30:00-05:00 +2024-04-13 04:23:17,727: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:23:17,727: root: INFO: Current backtesting datetime 2023-11-20 09:30:00-05:00 +2024-04-13 04:23:17,727: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:23:17,728: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:17 +2024-04-13 04:23:17,729: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:17,729: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:17,730: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:17,730: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:17,730: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:19,081: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:19,082: root: INFO: Current backtesting datetime 2023-11-20 16:00:00-05:00 +2024-04-13 04:23:19,083: root: INFO: Current backtesting datetime 2023-11-21 09:30:00-05:00 +2024-04-13 04:23:19,083: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:19 +2024-04-13 04:23:19,083: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:19,084: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:19,084: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:19,085: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:19,085: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:21,478: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:21,479: root: INFO: Current backtesting datetime 2023-11-21 16:00:00-05:00 +2024-04-13 04:23:21,479: root: INFO: Current backtesting datetime 2023-11-22 09:30:00-05:00 +2024-04-13 04:23:21,480: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:21 +2024-04-13 04:23:21,480: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:21,481: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:21,481: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:21,481: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:21,481: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:23,838: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:23,839: root: INFO: Current backtesting datetime 2023-11-22 16:00:00-05:00 +2024-04-13 04:23:23,839: root: INFO: Current backtesting datetime 2023-11-23 09:30:00-05:00 +2024-04-13 04:23:23,840: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:23:23,841: root: INFO: Current backtesting datetime 2023-11-23 09:29:00-05:00 +2024-04-13 04:23:23,842: root: INFO: Current backtesting datetime 2023-11-23 09:29:00-05:00 +2024-04-13 04:23:23,842: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:23:23,843: root: INFO: Current backtesting datetime 2023-11-24 08:30:00-05:00 +2024-04-13 04:23:23,844: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:23:23,844: root: INFO: Current backtesting datetime 2023-11-24 09:30:00-05:00 +2024-04-13 04:23:23,844: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:23:23,845: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:23 +2024-04-13 04:23:23,846: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:23,846: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:23,847: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:23,847: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:23,847: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:26,321: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:26,322: root: INFO: Current backtesting datetime 2023-11-24 13:00:00-05:00 +2024-04-13 04:23:26,322: root: INFO: Current backtesting datetime 2023-11-25 09:30:00-05:00 +2024-04-13 04:23:26,323: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:23:26,324: root: INFO: Current backtesting datetime 2023-11-25 09:29:00-05:00 +2024-04-13 04:23:26,325: root: INFO: Current backtesting datetime 2023-11-25 09:29:00-05:00 +2024-04-13 04:23:26,325: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:23:26,326: root: INFO: Current backtesting datetime 2023-11-27 08:30:00-05:00 +2024-04-13 04:23:26,327: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:23:26,327: root: INFO: Current backtesting datetime 2023-11-27 09:30:00-05:00 +2024-04-13 04:23:26,328: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:23:26,329: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:26 +2024-04-13 04:23:26,329: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:26,330: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:26,330: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:26,331: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:26,331: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:28,862: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:28,863: root: INFO: Current backtesting datetime 2023-11-27 16:00:00-05:00 +2024-04-13 04:23:28,863: root: INFO: Current backtesting datetime 2023-11-28 09:30:00-05:00 +2024-04-13 04:23:28,864: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:28 +2024-04-13 04:23:28,864: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:28,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:28,865: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:28,866: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:28,866: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:31,459: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:31,460: root: INFO: Current backtesting datetime 2023-11-28 16:00:00-05:00 +2024-04-13 04:23:31,460: root: INFO: Current backtesting datetime 2023-11-29 09:30:00-05:00 +2024-04-13 04:23:31,461: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:31 +2024-04-13 04:23:31,461: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:31,462: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:31,462: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:31,462: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:31,462: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:33,533: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:33,534: root: INFO: Current backtesting datetime 2023-11-29 16:00:00-05:00 +2024-04-13 04:23:33,534: root: INFO: Current backtesting datetime 2023-11-30 09:30:00-05:00 +2024-04-13 04:23:33,535: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:33 +2024-04-13 04:23:33,535: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:33,535: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:33,536: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:33,536: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:33,536: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:35,183: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:35,184: root: INFO: Current backtesting datetime 2023-11-30 16:00:00-05:00 +2024-04-13 04:23:35,184: root: INFO: Current backtesting datetime 2023-12-01 09:30:00-05:00 +2024-04-13 04:23:35,185: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:35 +2024-04-13 04:23:35,185: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:35,186: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:35,186: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:35,186: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:35,186: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:38,140: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:38,141: root: INFO: Current backtesting datetime 2023-12-01 16:00:00-05:00 +2024-04-13 04:23:38,141: root: INFO: Current backtesting datetime 2023-12-02 09:30:00-05:00 +2024-04-13 04:23:38,141: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:23:38,143: root: INFO: Current backtesting datetime 2023-12-02 09:29:00-05:00 +2024-04-13 04:23:38,144: root: INFO: Current backtesting datetime 2023-12-02 09:29:00-05:00 +2024-04-13 04:23:38,144: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:23:38,145: root: INFO: Current backtesting datetime 2023-12-04 08:30:00-05:00 +2024-04-13 04:23:38,145: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:23:38,146: root: INFO: Current backtesting datetime 2023-12-04 09:30:00-05:00 +2024-04-13 04:23:38,146: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:23:38,147: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:38 +2024-04-13 04:23:38,147: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:38,148: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:38,149: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:38,149: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:38,149: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:40,747: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:40,748: root: INFO: Current backtesting datetime 2023-12-04 16:00:00-05:00 +2024-04-13 04:23:40,749: root: INFO: Current backtesting datetime 2023-12-05 09:30:00-05:00 +2024-04-13 04:23:40,749: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:40 +2024-04-13 04:23:40,749: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:40,750: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:40,750: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:40,751: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:40,751: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:41,689: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:41,690: root: INFO: Current backtesting datetime 2023-12-05 16:00:00-05:00 +2024-04-13 04:23:41,690: root: INFO: Current backtesting datetime 2023-12-06 09:30:00-05:00 +2024-04-13 04:23:41,690: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:41 +2024-04-13 04:23:41,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:41,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:41,692: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:41,692: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:41,692: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:42,385: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:42,386: root: INFO: Current backtesting datetime 2023-12-06 16:00:00-05:00 +2024-04-13 04:23:42,386: root: INFO: Current backtesting datetime 2023-12-07 09:30:00-05:00 +2024-04-13 04:23:42,387: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:42 +2024-04-13 04:23:42,387: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:42,388: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:42,388: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:42,388: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:42,389: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:42,867: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:42,868: root: INFO: Current backtesting datetime 2023-12-07 16:00:00-05:00 +2024-04-13 04:23:42,868: root: INFO: Current backtesting datetime 2023-12-08 09:30:00-05:00 +2024-04-13 04:23:42,869: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:42 +2024-04-13 04:23:42,869: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:42,870: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:42,870: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:42,870: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:42,870: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:43,339: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:43,340: root: INFO: Current backtesting datetime 2023-12-08 16:00:00-05:00 +2024-04-13 04:23:43,340: root: INFO: Current backtesting datetime 2023-12-09 09:30:00-05:00 +2024-04-13 04:23:43,341: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:23:43,342: root: INFO: Current backtesting datetime 2023-12-09 09:29:00-05:00 +2024-04-13 04:23:43,343: root: INFO: Current backtesting datetime 2023-12-09 09:29:00-05:00 +2024-04-13 04:23:43,344: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:23:43,344: root: INFO: Current backtesting datetime 2023-12-11 08:30:00-05:00 +2024-04-13 04:23:43,345: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:23:43,346: root: INFO: Current backtesting datetime 2023-12-11 09:30:00-05:00 +2024-04-13 04:23:43,346: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:23:43,347: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:43 +2024-04-13 04:23:43,347: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:43,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:43,349: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:43,349: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:43,349: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:44,003: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:44,004: root: INFO: Current backtesting datetime 2023-12-11 16:00:00-05:00 +2024-04-13 04:23:44,004: root: INFO: Current backtesting datetime 2023-12-12 09:30:00-05:00 +2024-04-13 04:23:44,004: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:44 +2024-04-13 04:23:44,004: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:44,005: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:44,005: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:44,006: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:44,006: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:47,528: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:47,529: root: INFO: Current backtesting datetime 2023-12-12 16:00:00-05:00 +2024-04-13 04:23:47,530: root: INFO: Current backtesting datetime 2023-12-13 09:30:00-05:00 +2024-04-13 04:23:47,530: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:47 +2024-04-13 04:23:47,530: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:47,531: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:47,531: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:47,532: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:47,532: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:23:55,532: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:23:55,533: root: INFO: Current backtesting datetime 2023-12-13 16:00:00-05:00 +2024-04-13 04:23:55,533: root: INFO: Current backtesting datetime 2023-12-14 09:30:00-05:00 +2024-04-13 04:23:55,533: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:23:55 +2024-04-13 04:23:55,533: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:55,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:23:55,534: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:23:55,535: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:23:55,535: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:01,773: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:01,775: root: INFO: Current backtesting datetime 2023-12-14 16:00:00-05:00 +2024-04-13 04:24:01,775: root: INFO: Current backtesting datetime 2023-12-15 09:30:00-05:00 +2024-04-13 04:24:01,775: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:24:01 +2024-04-13 04:24:01,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:01,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:01,777: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:24:01,777: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:24:01,777: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:09,136: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:09,137: root: INFO: Current backtesting datetime 2023-12-15 16:00:00-05:00 +2024-04-13 04:24:09,137: root: INFO: Current backtesting datetime 2023-12-16 09:30:00-05:00 +2024-04-13 04:24:09,137: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:24:09,139: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00 +2024-04-13 04:24:09,140: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00 +2024-04-13 04:24:09,140: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:24:09,141: root: INFO: Current backtesting datetime 2023-12-18 08:30:00-05:00 +2024-04-13 04:24:09,141: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:24:09,142: root: INFO: Current backtesting datetime 2023-12-18 09:30:00-05:00 +2024-04-13 04:24:09,142: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:24:09,143: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:24:09 +2024-04-13 04:24:09,143: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:09,144: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:09,144: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:24:09,145: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:24:09,145: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:12,094: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:12,095: root: INFO: Current backtesting datetime 2023-12-18 16:00:00-05:00 +2024-04-13 04:24:12,096: root: INFO: Current backtesting datetime 2023-12-19 09:30:00-05:00 +2024-04-13 04:24:12,096: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:24:12 +2024-04-13 04:24:12,096: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:12,097: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:12,097: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:24:12,098: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:24:12,098: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:15,229: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:15,230: root: INFO: Current backtesting datetime 2023-12-19 16:00:00-05:00 +2024-04-13 04:24:15,230: root: INFO: Current backtesting datetime 2023-12-20 09:30:00-05:00 +2024-04-13 04:24:15,231: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:24:15 +2024-04-13 04:24:15,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:15,232: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:15,232: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:24:15,232: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:24:15,232: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:20,585: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:20,586: root: INFO: Current backtesting datetime 2023-12-20 16:00:00-05:00 +2024-04-13 04:24:20,587: root: INFO: Current backtesting datetime 2023-12-21 09:30:00-05:00 +2024-04-13 04:24:20,587: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:24:20 +2024-04-13 04:24:20,587: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:20,588: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:20,588: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:24:20,589: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:24:20,589: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:25,246: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:25,247: root: INFO: Current backtesting datetime 2023-12-21 16:00:00-05:00 +2024-04-13 04:24:25,248: root: INFO: Current backtesting datetime 2023-12-22 09:30:00-05:00 +2024-04-13 04:24:25,248: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:24:25 +2024-04-13 04:24:25,248: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:25,249: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:25,249: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:24:25,250: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:24:25,250: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:28,870: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:28,871: root: INFO: Current backtesting datetime 2023-12-22 16:00:00-05:00 +2024-04-13 04:24:28,872: root: INFO: Current backtesting datetime 2023-12-23 09:30:00-05:00 +2024-04-13 04:24:28,872: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:24:28,873: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00 +2024-04-13 04:24:28,875: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00 +2024-04-13 04:24:28,875: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:24:28,876: root: INFO: Current backtesting datetime 2023-12-26 08:30:00-05:00 +2024-04-13 04:24:28,876: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:24:28,877: root: INFO: Current backtesting datetime 2023-12-26 09:30:00-05:00 +2024-04-13 04:24:28,877: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:24:28,878: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:24:28 +2024-04-13 04:24:28,878: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:28,879: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:28,879: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:24:28,879: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:24:28,879: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:32,098: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:32,099: root: INFO: Current backtesting datetime 2023-12-26 16:00:00-05:00 +2024-04-13 04:24:32,099: root: INFO: Current backtesting datetime 2023-12-27 09:30:00-05:00 +2024-04-13 04:24:32,100: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:24:32 +2024-04-13 04:24:32,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:32,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:32,101: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:24:32,102: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:24:32,102: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:33,730: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:33,731: root: INFO: Current backtesting datetime 2023-12-27 16:00:00-05:00 +2024-04-13 04:24:33,731: root: INFO: Current backtesting datetime 2023-12-28 09:30:00-05:00 +2024-04-13 04:24:33,732: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:24:33 +2024-04-13 04:24:33,732: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:33,733: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:33,733: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:24:33,734: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:24:33,734: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:35,732: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:35,733: root: INFO: Current backtesting datetime 2023-12-28 16:00:00-05:00 +2024-04-13 04:24:35,733: root: INFO: Current backtesting datetime 2023-12-29 09:30:00-05:00 +2024-04-13 04:24:35,734: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 04:24:35 +2024-04-13 04:24:35,734: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:35,734: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 04:24:35,735: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 04:24:35,735: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 04:24:35,735: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 04:24:37,472: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 04:24:37,473: root: INFO: Current backtesting datetime 2023-12-29 16:00:00-05:00 +2024-04-13 04:24:37,473: root: INFO: Current backtesting datetime 2023-12-30 09:30:00-05:00 +2024-04-13 04:24:37,474: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 04:24:37,475: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00 +2024-04-13 04:24:37,476: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00 +2024-04-13 04:24:37,476: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:24:37,477: root: INFO: Current backtesting datetime 2024-01-02 08:30:00-05:00 +2024-04-13 04:24:37,478: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 04:24:37,479: root: INFO: Current backtesting datetime 2024-01-02 09:30:00-05:00 +2024-04-13 04:24:37,479: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 04:24:37,480: root: INFO: Current backtesting datetime 2024-01-02 15:59:00-05:00 +2024-04-13 04:24:37,480: asyncio: INFO: [MLTrader] Executing the before_market_closes lifecycle method +2024-04-13 04:24:37,481: root: INFO: Current backtesting datetime 2024-01-02 16:00:00-05:00 +2024-04-13 04:24:37,481: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 04:24:37,482: asyncio: INFO: [MLTrader] Executing the on_strategy_end lifecycle method +2024-04-13 04:24:39,360: root: INFO: Backtesting finished +2024-04-13 04:24:40,146: root: INFO: There were no trades in this backtest. +2024-04-13 04:24:41,019: root: ERROR: Not enough data to create a tearsheet, at least 2 days of data are required. Skipping +2024-04-13 04:24:41,019: backtest_stats: INFO: Backtest took 0:37:00.809887 for a speed of 0.000 diff --git a/logs/MLTrader_2024-04-13_03-47-40_stats.csv b/logs/MLTrader_2024-04-13_03-47-40_stats.csv new file mode 100644 index 0000000..4b08ded --- /dev/null +++ b/logs/MLTrader_2024-04-13_03-47-40_stats.csv @@ -0,0 +1,1221 @@ +datetime,portfolio_value,cash,return +2020-01-02 09:30:00-05:00,100000.0,100000.0, +2020-01-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-08 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-09 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-15 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-16 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-17 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-22 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-23 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-29 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-30 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-31 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-12 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-13 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-15 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-19 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-20 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-26 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-27 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-29 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-11-02 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-09 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-12 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-13 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-16 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-17 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-19 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-20 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-23 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-26 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-27 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-30 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-01 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-02 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-08 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-09 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-12 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-15 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-16 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-17 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-19 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-22 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-23 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-29 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-30 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-31 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-05 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-15 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-19 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-26 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-29 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-30 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-02 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-05 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-17 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-19 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-26 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-05 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-31 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-31 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-15 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-17 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-18 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-19 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-24 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-25 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-26 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-29 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-30 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-02 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-03 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-07 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-14 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-15 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-17 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-18 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-21 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-24 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-28 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-29 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-30 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-31 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-15 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-18 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-19 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-20 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-22 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-24 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-26 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-29 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-31 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-02 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-09 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-14 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-15 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-16 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-17 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-19 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-23 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-26 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-28 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-09 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-31 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-31 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-31 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-09 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-14 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-15 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-16 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-17 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-18 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-19 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-21 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-22 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-23 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-24 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-25 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-26 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-28 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-29 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-30 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-02 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-06 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-09 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-13 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-14 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-15 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-16 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-17 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-19 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-20 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-21 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-22 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-23 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-24 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-27 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-28 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-29 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-30 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-31 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-03 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-05 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-09 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-10 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-12 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-17 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-18 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-19 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-20 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-23 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-24 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-26 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-30 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-31 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-02 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-06 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-07 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-09 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-13 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-14 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-15 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-16 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-17 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-21 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-23 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-27 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-28 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-01 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-06 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-07 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-08 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-09 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-10 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-11 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-08 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-09 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-31 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-08 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-09 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-08 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-31 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-08 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-09 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-31 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-08 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-09 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-09 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-31 09:30:00-04:00,100000.0,100000.0,0.0 +2023-11-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-11-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-11-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-11-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-11-06 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-07 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-08 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-09 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-10 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-11 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-13 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-14 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-15 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-16 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-17 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-18 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-20 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-21 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-22 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-23 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-24 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-25 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-27 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-28 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-29 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-30 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-01 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-02 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-04 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-05 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-06 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-07 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-08 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-09 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-11 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-12 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-13 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-14 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-15 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-16 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-18 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-19 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-20 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-21 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-22 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-23 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-26 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-27 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-28 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-29 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-30 09:30:00-05:00,100000.0,100000.0,0.0 diff --git a/logs/MLTrader_2024-04-13_04-24-39_settings.json b/logs/MLTrader_2024-04-13_04-24-39_settings.json new file mode 100644 index 0000000..1251c3b --- /dev/null +++ b/logs/MLTrader_2024-04-13_04-24-39_settings.json @@ -0,0 +1 @@ +{"name": "MLTrader", "backtesting_start": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+QBAQAAAAAAAA==", {"py/reduce": [{"py/function": "pytz._p"}, {"py/tuple": ["America/New_York", -18000, 0, "EST"]}]}]]}, "backtesting_end": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMHhc7AAAAAA==", {"py/id": 2}]]}, "budget": 100000, "risk_free_rate": {"py/reduce": [{"py/function": "numpy.core.multiarray.scalar"}, {"py/tuple": [{"py/reduce": [{"py/type": "numpy.dtype"}, {"py/tuple": ["f8", false, true]}, {"py/tuple": [3, "<", null, null, null, -1, -1, 0]}]}, {"py/b64": "9ihcj57Nqj8="}]}]}, "minutes_before_closing": 1, "minutes_before_opening": 60, "sleeptime": "24H", "auto_adjust": false, "quote_asset": {"py/object": "lumibot.entities.asset.Asset", "symbol": "USD", "asset_type": "forex", "strike": 0.0, "multiplier": 1, "precision": null, "expiration": null}, "benchmark_asset": "SPY", "starting_positions": null, "parameters": {"pandas_data": null, "symbol": "SPY", "cash_at_risk": 0.5}} \ No newline at end of file diff --git a/logs/MLTrader_2024-04-13_18-15-04_logs.csv b/logs/MLTrader_2024-04-13_18-15-04_logs.csv new file mode 100644 index 0000000..24419ee --- /dev/null +++ b/logs/MLTrader_2024-04-13_18-15-04_logs.csv @@ -0,0 +1,18050 @@ +2024-04-13 18:15:04,747: asyncio: INFO: [MLTrader] Executing the initialize lifecycle method +2024-04-13 18:15:05,791: root: INFO: Current backtesting datetime 2020-01-02 08:30:00-05:00 +2024-04-13 18:15:05,792: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:05,793: root: INFO: Current backtesting datetime 2020-01-02 09:30:00-05:00 +2024-04-13 18:15:05,793: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:05,794: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:05 +2024-04-13 18:15:05,803: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:07,527: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:07,527: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:07,545: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:07,545: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:07,546: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:07,547: root: INFO: Current backtesting datetime 2020-01-02 16:00:00-05:00 +2024-04-13 18:15:07,547: root: INFO: Current backtesting datetime 2020-01-03 09:30:00-05:00 +2024-04-13 18:15:07,548: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:07 +2024-04-13 18:15:07,548: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:07,549: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:07,549: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:07,549: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:07,550: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:09,247: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:09,248: root: INFO: Current backtesting datetime 2020-01-03 16:00:00-05:00 +2024-04-13 18:15:09,249: root: INFO: Current backtesting datetime 2020-01-04 09:30:00-05:00 +2024-04-13 18:15:09,249: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:09,251: root: INFO: Current backtesting datetime 2020-01-04 09:29:00-05:00 +2024-04-13 18:15:09,252: root: INFO: Current backtesting datetime 2020-01-04 09:29:00-05:00 +2024-04-13 18:15:09,252: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:09,253: root: INFO: Current backtesting datetime 2020-01-06 08:30:00-05:00 +2024-04-13 18:15:09,253: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:09,254: root: INFO: Current backtesting datetime 2020-01-06 09:30:00-05:00 +2024-04-13 18:15:09,254: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:09,255: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:09 +2024-04-13 18:15:09,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:09,256: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:09,256: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:09,257: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:09,257: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:10,995: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:10,996: root: INFO: Current backtesting datetime 2020-01-06 16:00:00-05:00 +2024-04-13 18:15:10,997: root: INFO: Current backtesting datetime 2020-01-07 09:30:00-05:00 +2024-04-13 18:15:10,997: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:10 +2024-04-13 18:15:10,997: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:10,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:10,998: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:10,999: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:10,999: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:11,766: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:11,767: root: INFO: Current backtesting datetime 2020-01-07 16:00:00-05:00 +2024-04-13 18:15:11,767: root: INFO: Current backtesting datetime 2020-01-08 09:30:00-05:00 +2024-04-13 18:15:11,767: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:11 +2024-04-13 18:15:11,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:11,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:11,769: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:11,770: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:11,770: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:12,138: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:12,139: root: INFO: Current backtesting datetime 2020-01-08 16:00:00-05:00 +2024-04-13 18:15:12,139: root: INFO: Current backtesting datetime 2020-01-09 09:30:00-05:00 +2024-04-13 18:15:12,140: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:12 +2024-04-13 18:15:12,140: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:12,140: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:12,141: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:12,141: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:12,141: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:13,580: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:13,581: root: INFO: Current backtesting datetime 2020-01-09 16:00:00-05:00 +2024-04-13 18:15:13,582: root: INFO: Current backtesting datetime 2020-01-10 09:30:00-05:00 +2024-04-13 18:15:13,582: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:13 +2024-04-13 18:15:13,582: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:13,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:13,583: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:13,584: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:13,584: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:14,126: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:14,127: root: INFO: Current backtesting datetime 2020-01-10 16:00:00-05:00 +2024-04-13 18:15:14,127: root: INFO: Current backtesting datetime 2020-01-11 09:30:00-05:00 +2024-04-13 18:15:14,128: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:14,129: root: INFO: Current backtesting datetime 2020-01-11 09:29:00-05:00 +2024-04-13 18:15:14,131: root: INFO: Current backtesting datetime 2020-01-11 09:29:00-05:00 +2024-04-13 18:15:14,131: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:14,131: root: INFO: Current backtesting datetime 2020-01-13 08:30:00-05:00 +2024-04-13 18:15:14,132: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:14,133: root: INFO: Current backtesting datetime 2020-01-13 09:30:00-05:00 +2024-04-13 18:15:14,133: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:14,134: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:14 +2024-04-13 18:15:14,134: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:14,135: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:14,135: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:14,136: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:14,136: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:15,053: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:15,054: root: INFO: Current backtesting datetime 2020-01-13 16:00:00-05:00 +2024-04-13 18:15:15,054: root: INFO: Current backtesting datetime 2020-01-14 09:30:00-05:00 +2024-04-13 18:15:15,055: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:15 +2024-04-13 18:15:15,055: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:15,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:15,056: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:15,056: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:15,056: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:16,579: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:16,580: root: INFO: Current backtesting datetime 2020-01-14 16:00:00-05:00 +2024-04-13 18:15:16,580: root: INFO: Current backtesting datetime 2020-01-15 09:30:00-05:00 +2024-04-13 18:15:16,581: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:16 +2024-04-13 18:15:16,581: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:16,582: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:16,582: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:16,582: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:16,582: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:17,823: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:17,824: root: INFO: Current backtesting datetime 2020-01-15 16:00:00-05:00 +2024-04-13 18:15:17,825: root: INFO: Current backtesting datetime 2020-01-16 09:30:00-05:00 +2024-04-13 18:15:17,825: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:17 +2024-04-13 18:15:17,825: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:17,826: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:17,826: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:17,827: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:17,827: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:19,088: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:19,089: root: INFO: Current backtesting datetime 2020-01-16 16:00:00-05:00 +2024-04-13 18:15:19,090: root: INFO: Current backtesting datetime 2020-01-17 09:30:00-05:00 +2024-04-13 18:15:19,090: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:19 +2024-04-13 18:15:19,090: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:19,091: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:19,091: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:19,092: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:19,092: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:20,093: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:20,094: root: INFO: Current backtesting datetime 2020-01-17 16:00:00-05:00 +2024-04-13 18:15:20,094: root: INFO: Current backtesting datetime 2020-01-18 09:30:00-05:00 +2024-04-13 18:15:20,095: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:20,096: root: INFO: Current backtesting datetime 2020-01-18 09:29:00-05:00 +2024-04-13 18:15:20,097: root: INFO: Current backtesting datetime 2020-01-18 09:29:00-05:00 +2024-04-13 18:15:20,098: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:20,098: root: INFO: Current backtesting datetime 2020-01-21 08:30:00-05:00 +2024-04-13 18:15:20,099: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:20,100: root: INFO: Current backtesting datetime 2020-01-21 09:30:00-05:00 +2024-04-13 18:15:20,100: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:20,101: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:20 +2024-04-13 18:15:20,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:20,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:20,102: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:20,102: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:20,102: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:20,890: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:20,891: root: INFO: Current backtesting datetime 2020-01-21 16:00:00-05:00 +2024-04-13 18:15:20,891: root: INFO: Current backtesting datetime 2020-01-22 09:30:00-05:00 +2024-04-13 18:15:20,892: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:20 +2024-04-13 18:15:20,892: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:20,892: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:20,893: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:20,893: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:20,893: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:22,039: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:22,040: root: INFO: Current backtesting datetime 2020-01-22 16:00:00-05:00 +2024-04-13 18:15:22,040: root: INFO: Current backtesting datetime 2020-01-23 09:30:00-05:00 +2024-04-13 18:15:22,041: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:22 +2024-04-13 18:15:22,041: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:22,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:22,042: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:22,042: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:22,042: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:23,195: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:23,197: root: INFO: Current backtesting datetime 2020-01-23 16:00:00-05:00 +2024-04-13 18:15:23,197: root: INFO: Current backtesting datetime 2020-01-24 09:30:00-05:00 +2024-04-13 18:15:23,197: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:23 +2024-04-13 18:15:23,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:23,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:23,199: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:23,199: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:23,199: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:25,024: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:25,025: root: INFO: Current backtesting datetime 2020-01-24 16:00:00-05:00 +2024-04-13 18:15:25,025: root: INFO: Current backtesting datetime 2020-01-25 09:30:00-05:00 +2024-04-13 18:15:25,026: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:25,027: root: INFO: Current backtesting datetime 2020-01-25 09:29:00-05:00 +2024-04-13 18:15:25,028: root: INFO: Current backtesting datetime 2020-01-25 09:29:00-05:00 +2024-04-13 18:15:25,028: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:25,029: root: INFO: Current backtesting datetime 2020-01-27 08:30:00-05:00 +2024-04-13 18:15:25,030: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:25,031: root: INFO: Current backtesting datetime 2020-01-27 09:30:00-05:00 +2024-04-13 18:15:25,031: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:25,032: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:25 +2024-04-13 18:15:25,032: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:25,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:25,033: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:25,033: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:25,033: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:26,165: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:26,166: root: INFO: Current backtesting datetime 2020-01-27 16:00:00-05:00 +2024-04-13 18:15:26,167: root: INFO: Current backtesting datetime 2020-01-28 09:30:00-05:00 +2024-04-13 18:15:26,167: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:26 +2024-04-13 18:15:26,167: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:26,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:26,168: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:26,169: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:26,169: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:27,097: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:27,098: root: INFO: Current backtesting datetime 2020-01-28 16:00:00-05:00 +2024-04-13 18:15:27,098: root: INFO: Current backtesting datetime 2020-01-29 09:30:00-05:00 +2024-04-13 18:15:27,100: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:27 +2024-04-13 18:15:27,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:27,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:27,101: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:27,101: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:27,101: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:28,774: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:28,775: root: INFO: Current backtesting datetime 2020-01-29 16:00:00-05:00 +2024-04-13 18:15:28,776: root: INFO: Current backtesting datetime 2020-01-30 09:30:00-05:00 +2024-04-13 18:15:28,776: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:28 +2024-04-13 18:15:28,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:28,777: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:28,777: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:28,778: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:28,778: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:30,633: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:30,633: root: INFO: Current backtesting datetime 2020-01-30 16:00:00-05:00 +2024-04-13 18:15:30,634: root: INFO: Current backtesting datetime 2020-01-31 09:30:00-05:00 +2024-04-13 18:15:30,634: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:30 +2024-04-13 18:15:30,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:30,635: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:30,635: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:30,636: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:30,636: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:31,551: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:31,552: root: INFO: Current backtesting datetime 2020-01-31 16:00:00-05:00 +2024-04-13 18:15:31,553: root: INFO: Current backtesting datetime 2020-02-01 09:30:00-05:00 +2024-04-13 18:15:31,553: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:31,554: root: INFO: Current backtesting datetime 2020-02-01 09:29:00-05:00 +2024-04-13 18:15:31,556: root: INFO: Current backtesting datetime 2020-02-01 09:29:00-05:00 +2024-04-13 18:15:31,556: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:31,556: root: INFO: Current backtesting datetime 2020-02-03 08:30:00-05:00 +2024-04-13 18:15:31,557: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:31,558: root: INFO: Current backtesting datetime 2020-02-03 09:30:00-05:00 +2024-04-13 18:15:31,558: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:31,559: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:31 +2024-04-13 18:15:31,559: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:31,560: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:31,560: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:31,560: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:31,560: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:32,686: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:32,687: root: INFO: Current backtesting datetime 2020-02-03 16:00:00-05:00 +2024-04-13 18:15:32,687: root: INFO: Current backtesting datetime 2020-02-04 09:30:00-05:00 +2024-04-13 18:15:32,688: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:32 +2024-04-13 18:15:32,688: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:32,689: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:32,689: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:32,690: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:32,690: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:34,167: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:34,168: root: INFO: Current backtesting datetime 2020-02-04 16:00:00-05:00 +2024-04-13 18:15:34,169: root: INFO: Current backtesting datetime 2020-02-05 09:30:00-05:00 +2024-04-13 18:15:34,169: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:34 +2024-04-13 18:15:34,169: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:34,170: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:34,170: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:34,171: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:34,171: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:36,113: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:36,114: root: INFO: Current backtesting datetime 2020-02-05 16:00:00-05:00 +2024-04-13 18:15:36,114: root: INFO: Current backtesting datetime 2020-02-06 09:30:00-05:00 +2024-04-13 18:15:36,115: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:36 +2024-04-13 18:15:36,115: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:36,116: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:36,116: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:36,116: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:36,116: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:37,562: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:37,563: root: INFO: Current backtesting datetime 2020-02-06 16:00:00-05:00 +2024-04-13 18:15:37,563: root: INFO: Current backtesting datetime 2020-02-07 09:30:00-05:00 +2024-04-13 18:15:37,564: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:37 +2024-04-13 18:15:37,564: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:37,564: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:37,565: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:37,565: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:37,565: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:38,721: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:38,722: root: INFO: Current backtesting datetime 2020-02-07 16:00:00-05:00 +2024-04-13 18:15:38,723: root: INFO: Current backtesting datetime 2020-02-08 09:30:00-05:00 +2024-04-13 18:15:38,723: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:38,724: root: INFO: Current backtesting datetime 2020-02-08 09:29:00-05:00 +2024-04-13 18:15:38,726: root: INFO: Current backtesting datetime 2020-02-08 09:29:00-05:00 +2024-04-13 18:15:38,726: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:38,727: root: INFO: Current backtesting datetime 2020-02-10 08:30:00-05:00 +2024-04-13 18:15:38,728: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:38,728: root: INFO: Current backtesting datetime 2020-02-10 09:30:00-05:00 +2024-04-13 18:15:38,728: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:38,730: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:38 +2024-04-13 18:15:38,730: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:38,730: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:38,731: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:38,731: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:38,731: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:40,523: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:40,524: root: INFO: Current backtesting datetime 2020-02-10 16:00:00-05:00 +2024-04-13 18:15:40,524: root: INFO: Current backtesting datetime 2020-02-11 09:30:00-05:00 +2024-04-13 18:15:40,524: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:40 +2024-04-13 18:15:40,525: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:40,525: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:40,526: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:40,526: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:40,526: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:41,126: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:41,127: root: INFO: Current backtesting datetime 2020-02-11 16:00:00-05:00 +2024-04-13 18:15:41,127: root: INFO: Current backtesting datetime 2020-02-12 09:30:00-05:00 +2024-04-13 18:15:41,127: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:41 +2024-04-13 18:15:41,127: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:41,129: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:41,129: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:41,130: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:41,130: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:42,035: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:42,036: root: INFO: Current backtesting datetime 2020-02-12 16:00:00-05:00 +2024-04-13 18:15:42,037: root: INFO: Current backtesting datetime 2020-02-13 09:30:00-05:00 +2024-04-13 18:15:42,037: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:42 +2024-04-13 18:15:42,037: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:42,038: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:42,038: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:42,039: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:42,039: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:43,622: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:43,623: root: INFO: Current backtesting datetime 2020-02-13 16:00:00-05:00 +2024-04-13 18:15:43,623: root: INFO: Current backtesting datetime 2020-02-14 09:30:00-05:00 +2024-04-13 18:15:43,623: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:43 +2024-04-13 18:15:43,623: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:43,624: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:43,624: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:43,624: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:43,624: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:44,452: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:44,453: root: INFO: Current backtesting datetime 2020-02-14 16:00:00-05:00 +2024-04-13 18:15:44,453: root: INFO: Current backtesting datetime 2020-02-15 09:30:00-05:00 +2024-04-13 18:15:44,454: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:44,455: root: INFO: Current backtesting datetime 2020-02-15 09:29:00-05:00 +2024-04-13 18:15:44,456: root: INFO: Current backtesting datetime 2020-02-15 09:29:00-05:00 +2024-04-13 18:15:44,457: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:44,457: root: INFO: Current backtesting datetime 2020-02-18 08:30:00-05:00 +2024-04-13 18:15:44,458: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:44,459: root: INFO: Current backtesting datetime 2020-02-18 09:30:00-05:00 +2024-04-13 18:15:44,459: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:44,460: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:44 +2024-04-13 18:15:44,460: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:44,461: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:44,461: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:44,461: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:44,461: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:45,026: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:45,028: root: INFO: Current backtesting datetime 2020-02-18 16:00:00-05:00 +2024-04-13 18:15:45,028: root: INFO: Current backtesting datetime 2020-02-19 09:30:00-05:00 +2024-04-13 18:15:45,029: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:45 +2024-04-13 18:15:45,029: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:45,030: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:45,030: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:45,030: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:45,030: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:46,029: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:46,031: root: INFO: Current backtesting datetime 2020-02-19 16:00:00-05:00 +2024-04-13 18:15:46,031: root: INFO: Current backtesting datetime 2020-02-20 09:30:00-05:00 +2024-04-13 18:15:46,032: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:46 +2024-04-13 18:15:46,032: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:46,032: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:46,032: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:46,032: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:46,032: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:46,993: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:46,995: root: INFO: Current backtesting datetime 2020-02-20 16:00:00-05:00 +2024-04-13 18:15:46,995: root: INFO: Current backtesting datetime 2020-02-21 09:30:00-05:00 +2024-04-13 18:15:46,995: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:46 +2024-04-13 18:15:46,995: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:46,996: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:46,996: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:46,997: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:46,997: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:47,748: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:47,749: root: INFO: Current backtesting datetime 2020-02-21 16:00:00-05:00 +2024-04-13 18:15:47,749: root: INFO: Current backtesting datetime 2020-02-22 09:30:00-05:00 +2024-04-13 18:15:47,749: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:47,751: root: INFO: Current backtesting datetime 2020-02-22 09:29:00-05:00 +2024-04-13 18:15:47,752: root: INFO: Current backtesting datetime 2020-02-22 09:29:00-05:00 +2024-04-13 18:15:47,752: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:47,752: root: INFO: Current backtesting datetime 2020-02-24 08:30:00-05:00 +2024-04-13 18:15:47,753: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:47,754: root: INFO: Current backtesting datetime 2020-02-24 09:30:00-05:00 +2024-04-13 18:15:47,754: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:47,755: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:47 +2024-04-13 18:15:47,755: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:47,756: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:47,756: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:47,757: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:47,757: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:48,466: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:48,467: root: INFO: Current backtesting datetime 2020-02-24 16:00:00-05:00 +2024-04-13 18:15:48,467: root: INFO: Current backtesting datetime 2020-02-25 09:30:00-05:00 +2024-04-13 18:15:48,468: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:48 +2024-04-13 18:15:48,468: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:48,469: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:48,469: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:48,470: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:48,470: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:49,080: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:49,081: root: INFO: Current backtesting datetime 2020-02-25 16:00:00-05:00 +2024-04-13 18:15:49,081: root: INFO: Current backtesting datetime 2020-02-26 09:30:00-05:00 +2024-04-13 18:15:49,082: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:49 +2024-04-13 18:15:49,082: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:49,083: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:49,083: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:49,083: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:49,083: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:49,907: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:49,908: root: INFO: Current backtesting datetime 2020-02-26 16:00:00-05:00 +2024-04-13 18:15:49,908: root: INFO: Current backtesting datetime 2020-02-27 09:30:00-05:00 +2024-04-13 18:15:49,909: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:49 +2024-04-13 18:15:49,909: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:49,910: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:49,910: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:49,911: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:49,911: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:50,538: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:50,539: root: INFO: Current backtesting datetime 2020-02-27 16:00:00-05:00 +2024-04-13 18:15:50,540: root: INFO: Current backtesting datetime 2020-02-28 09:30:00-05:00 +2024-04-13 18:15:50,540: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:50 +2024-04-13 18:15:50,540: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:50,541: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:50,541: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:50,542: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:50,542: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:51,031: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:51,032: root: INFO: Current backtesting datetime 2020-02-28 16:00:00-05:00 +2024-04-13 18:15:51,032: root: INFO: Current backtesting datetime 2020-02-29 09:30:00-05:00 +2024-04-13 18:15:51,033: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:51,034: root: INFO: Current backtesting datetime 2020-02-29 09:29:00-05:00 +2024-04-13 18:15:51,036: root: INFO: Current backtesting datetime 2020-02-29 09:29:00-05:00 +2024-04-13 18:15:51,036: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:51,037: root: INFO: Current backtesting datetime 2020-03-02 08:30:00-05:00 +2024-04-13 18:15:51,038: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:51,038: root: INFO: Current backtesting datetime 2020-03-02 09:30:00-05:00 +2024-04-13 18:15:51,038: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:51,040: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:51 +2024-04-13 18:15:51,040: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:51,040: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:51,041: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:51,041: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:51,041: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:51,870: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:51,871: root: INFO: Current backtesting datetime 2020-03-02 16:00:00-05:00 +2024-04-13 18:15:51,871: root: INFO: Current backtesting datetime 2020-03-03 09:30:00-05:00 +2024-04-13 18:15:51,872: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:51 +2024-04-13 18:15:51,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:51,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:51,873: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:51,873: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:51,873: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:52,508: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:52,508: root: INFO: Current backtesting datetime 2020-03-03 16:00:00-05:00 +2024-04-13 18:15:52,509: root: INFO: Current backtesting datetime 2020-03-04 09:30:00-05:00 +2024-04-13 18:15:52,509: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:52 +2024-04-13 18:15:52,509: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:52,510: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:52,510: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:52,511: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:52,511: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:53,064: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:53,065: root: INFO: Current backtesting datetime 2020-03-04 16:00:00-05:00 +2024-04-13 18:15:53,066: root: INFO: Current backtesting datetime 2020-03-05 09:30:00-05:00 +2024-04-13 18:15:53,066: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:53 +2024-04-13 18:15:53,066: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:53,067: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:53,067: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:53,068: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:53,068: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:53,889: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:53,890: root: INFO: Current backtesting datetime 2020-03-05 16:00:00-05:00 +2024-04-13 18:15:53,891: root: INFO: Current backtesting datetime 2020-03-06 09:30:00-05:00 +2024-04-13 18:15:53,891: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:53 +2024-04-13 18:15:53,891: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:53,892: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:53,892: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:53,893: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:53,893: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:54,365: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:54,366: root: INFO: Current backtesting datetime 2020-03-06 16:00:00-05:00 +2024-04-13 18:15:54,366: root: INFO: Current backtesting datetime 2020-03-07 09:30:00-05:00 +2024-04-13 18:15:54,366: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:54,368: root: INFO: Current backtesting datetime 2020-03-07 09:29:00-05:00 +2024-04-13 18:15:54,369: root: INFO: Current backtesting datetime 2020-03-07 09:29:00-05:00 +2024-04-13 18:15:54,369: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:54,369: root: INFO: Current backtesting datetime 2020-03-09 07:30:00-05:00 +2024-04-13 18:15:54,371: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:54,371: root: INFO: Current backtesting datetime 2020-03-09 08:30:00-05:00 +2024-04-13 18:15:54,371: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:54,373: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:54 +2024-04-13 18:15:54,373: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:54,374: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:54,374: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:54,374: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:54,374: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:55,269: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:55,270: root: INFO: Current backtesting datetime 2020-03-09 15:00:00-05:00 +2024-04-13 18:15:55,270: root: INFO: Current backtesting datetime 2020-03-10 08:30:00-05:00 +2024-04-13 18:15:55,270: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:55 +2024-04-13 18:15:55,270: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:55,271: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:55,271: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:55,272: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:55,272: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:56,489: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:56,490: root: INFO: Current backtesting datetime 2020-03-10 15:00:00-05:00 +2024-04-13 18:15:56,490: root: INFO: Current backtesting datetime 2020-03-11 08:30:00-05:00 +2024-04-13 18:15:56,491: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:56 +2024-04-13 18:15:56,491: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:56,491: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:56,492: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:56,492: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:56,492: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:57,375: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:57,376: root: INFO: Current backtesting datetime 2020-03-11 15:00:00-05:00 +2024-04-13 18:15:57,376: root: INFO: Current backtesting datetime 2020-03-12 08:30:00-05:00 +2024-04-13 18:15:57,376: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:57 +2024-04-13 18:15:57,377: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:57,377: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:57,378: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:57,378: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:57,378: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:58,258: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:58,259: root: INFO: Current backtesting datetime 2020-03-12 15:00:00-05:00 +2024-04-13 18:15:58,259: root: INFO: Current backtesting datetime 2020-03-13 08:30:00-05:00 +2024-04-13 18:15:58,259: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:58 +2024-04-13 18:15:58,260: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:58,260: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:58,261: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:58,261: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:58,261: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:15:59,374: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:15:59,375: root: INFO: Current backtesting datetime 2020-03-13 15:00:00-05:00 +2024-04-13 18:15:59,375: root: INFO: Current backtesting datetime 2020-03-14 08:30:00-05:00 +2024-04-13 18:15:59,376: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:15:59,377: root: INFO: Current backtesting datetime 2020-03-14 08:29:00-05:00 +2024-04-13 18:15:59,378: root: INFO: Current backtesting datetime 2020-03-14 08:29:00-05:00 +2024-04-13 18:15:59,378: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:15:59,379: root: INFO: Current backtesting datetime 2020-03-16 07:30:00-05:00 +2024-04-13 18:15:59,379: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:15:59,380: root: INFO: Current backtesting datetime 2020-03-16 08:30:00-05:00 +2024-04-13 18:15:59,380: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:15:59,381: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:15:59 +2024-04-13 18:15:59,381: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:59,382: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:15:59,382: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:15:59,383: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:15:59,383: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:00,294: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:00,295: root: INFO: Current backtesting datetime 2020-03-16 15:00:00-05:00 +2024-04-13 18:16:00,295: root: INFO: Current backtesting datetime 2020-03-17 08:30:00-05:00 +2024-04-13 18:16:00,295: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:00 +2024-04-13 18:16:00,295: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:00,296: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:00,296: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:00,297: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:00,297: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:01,276: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:01,277: root: INFO: Current backtesting datetime 2020-03-17 15:00:00-05:00 +2024-04-13 18:16:01,277: root: INFO: Current backtesting datetime 2020-03-18 08:30:00-05:00 +2024-04-13 18:16:01,278: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:01 +2024-04-13 18:16:01,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:01,279: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:01,279: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:01,279: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:01,279: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:02,442: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:02,443: root: INFO: Current backtesting datetime 2020-03-18 15:00:00-05:00 +2024-04-13 18:16:02,444: root: INFO: Current backtesting datetime 2020-03-19 08:30:00-05:00 +2024-04-13 18:16:02,444: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:02 +2024-04-13 18:16:02,444: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:02,445: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:02,445: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:02,446: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:02,446: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:03,422: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:03,422: root: INFO: Current backtesting datetime 2020-03-19 15:00:00-05:00 +2024-04-13 18:16:03,423: root: INFO: Current backtesting datetime 2020-03-20 08:30:00-05:00 +2024-04-13 18:16:03,423: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:03 +2024-04-13 18:16:03,423: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:03,424: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:03,424: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:03,425: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:03,425: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:04,154: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:04,155: root: INFO: Current backtesting datetime 2020-03-20 15:00:00-05:00 +2024-04-13 18:16:04,155: root: INFO: Current backtesting datetime 2020-03-21 08:30:00-05:00 +2024-04-13 18:16:04,156: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:16:04,157: root: INFO: Current backtesting datetime 2020-03-21 08:29:00-05:00 +2024-04-13 18:16:04,158: root: INFO: Current backtesting datetime 2020-03-21 08:29:00-05:00 +2024-04-13 18:16:04,158: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:16:04,159: root: INFO: Current backtesting datetime 2020-03-23 07:30:00-05:00 +2024-04-13 18:16:04,160: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:16:04,161: root: INFO: Current backtesting datetime 2020-03-23 08:30:00-05:00 +2024-04-13 18:16:04,161: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:16:04,162: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:04 +2024-04-13 18:16:04,162: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:04,163: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:04,163: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:04,163: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:04,163: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:05,065: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:05,066: root: INFO: Current backtesting datetime 2020-03-23 15:00:00-05:00 +2024-04-13 18:16:05,066: root: INFO: Current backtesting datetime 2020-03-24 08:30:00-05:00 +2024-04-13 18:16:05,067: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:05 +2024-04-13 18:16:05,067: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:05,068: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:05,068: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:05,068: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:05,068: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:06,452: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:06,453: root: INFO: Current backtesting datetime 2020-03-24 15:00:00-05:00 +2024-04-13 18:16:06,453: root: INFO: Current backtesting datetime 2020-03-25 08:30:00-05:00 +2024-04-13 18:16:06,453: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:06 +2024-04-13 18:16:06,453: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:06,454: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:06,454: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:06,455: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:06,455: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:07,963: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:07,965: root: INFO: Current backtesting datetime 2020-03-25 15:00:00-05:00 +2024-04-13 18:16:07,965: root: INFO: Current backtesting datetime 2020-03-26 08:30:00-05:00 +2024-04-13 18:16:07,965: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:07 +2024-04-13 18:16:07,965: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:07,966: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:07,966: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:07,967: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:07,967: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:08,740: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:08,742: root: INFO: Current backtesting datetime 2020-03-26 15:00:00-05:00 +2024-04-13 18:16:08,742: root: INFO: Current backtesting datetime 2020-03-27 08:30:00-05:00 +2024-04-13 18:16:08,742: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:08 +2024-04-13 18:16:08,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:08,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:08,743: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:08,743: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:08,743: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:09,525: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:09,526: root: INFO: Current backtesting datetime 2020-03-27 15:00:00-05:00 +2024-04-13 18:16:09,527: root: INFO: Current backtesting datetime 2020-03-28 08:30:00-05:00 +2024-04-13 18:16:09,527: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:16:09,529: root: INFO: Current backtesting datetime 2020-03-28 08:29:00-05:00 +2024-04-13 18:16:09,531: root: INFO: Current backtesting datetime 2020-03-28 08:29:00-05:00 +2024-04-13 18:16:09,531: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:16:09,532: root: INFO: Current backtesting datetime 2020-03-30 07:30:00-05:00 +2024-04-13 18:16:09,532: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:16:09,533: root: INFO: Current backtesting datetime 2020-03-30 08:30:00-05:00 +2024-04-13 18:16:09,533: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:16:09,534: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:09 +2024-04-13 18:16:09,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:09,535: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:09,535: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:09,536: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:09,536: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:10,507: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:10,508: root: INFO: Current backtesting datetime 2020-03-30 15:00:00-05:00 +2024-04-13 18:16:10,508: root: INFO: Current backtesting datetime 2020-03-31 08:30:00-05:00 +2024-04-13 18:16:10,509: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:10 +2024-04-13 18:16:10,509: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:10,509: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:10,510: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:10,510: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:10,510: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:11,754: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:11,755: root: INFO: Current backtesting datetime 2020-03-31 15:00:00-05:00 +2024-04-13 18:16:11,755: root: INFO: Current backtesting datetime 2020-04-01 08:30:00-05:00 +2024-04-13 18:16:11,756: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:11 +2024-04-13 18:16:11,756: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:11,757: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:11,757: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:11,757: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:11,757: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:12,868: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:12,870: root: INFO: Current backtesting datetime 2020-04-01 15:00:00-05:00 +2024-04-13 18:16:12,871: root: INFO: Current backtesting datetime 2020-04-02 08:30:00-05:00 +2024-04-13 18:16:12,871: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:12 +2024-04-13 18:16:12,871: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:12,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:12,872: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:12,873: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:12,873: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:13,629: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:13,630: root: INFO: Current backtesting datetime 2020-04-02 15:00:00-05:00 +2024-04-13 18:16:13,630: root: INFO: Current backtesting datetime 2020-04-03 08:30:00-05:00 +2024-04-13 18:16:13,631: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:13 +2024-04-13 18:16:13,631: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:13,632: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:13,632: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:13,633: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:13,633: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:15,385: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:15,386: root: INFO: Current backtesting datetime 2020-04-03 15:00:00-05:00 +2024-04-13 18:16:15,386: root: INFO: Current backtesting datetime 2020-04-04 08:30:00-05:00 +2024-04-13 18:16:15,386: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:16:15,388: root: INFO: Current backtesting datetime 2020-04-04 08:29:00-05:00 +2024-04-13 18:16:15,389: root: INFO: Current backtesting datetime 2020-04-04 08:29:00-05:00 +2024-04-13 18:16:15,389: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:16:15,390: root: INFO: Current backtesting datetime 2020-04-06 07:30:00-05:00 +2024-04-13 18:16:15,391: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:16:15,391: root: INFO: Current backtesting datetime 2020-04-06 08:30:00-05:00 +2024-04-13 18:16:15,392: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:16:15,393: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:15 +2024-04-13 18:16:15,393: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:15,393: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:15,394: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:15,394: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:15,394: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:16,430: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:16,432: root: INFO: Current backtesting datetime 2020-04-06 15:00:00-05:00 +2024-04-13 18:16:16,432: root: INFO: Current backtesting datetime 2020-04-07 08:30:00-05:00 +2024-04-13 18:16:16,432: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:16 +2024-04-13 18:16:16,432: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:16,433: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:16,433: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:16,434: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:16,434: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:17,506: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:17,507: root: INFO: Current backtesting datetime 2020-04-07 15:00:00-05:00 +2024-04-13 18:16:17,507: root: INFO: Current backtesting datetime 2020-04-08 08:30:00-05:00 +2024-04-13 18:16:17,508: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:17 +2024-04-13 18:16:17,508: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:17,509: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:17,509: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:17,509: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:17,510: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:18,594: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:18,595: root: INFO: Current backtesting datetime 2020-04-08 15:00:00-05:00 +2024-04-13 18:16:18,595: root: INFO: Current backtesting datetime 2020-04-09 08:30:00-05:00 +2024-04-13 18:16:18,595: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:18 +2024-04-13 18:16:18,595: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:18,596: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:18,596: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:18,597: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:18,597: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:19,782: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:19,783: root: INFO: Current backtesting datetime 2020-04-09 15:00:00-05:00 +2024-04-13 18:16:19,783: root: INFO: Current backtesting datetime 2020-04-10 08:30:00-05:00 +2024-04-13 18:16:19,784: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:16:19,786: root: INFO: Current backtesting datetime 2020-04-10 08:29:00-05:00 +2024-04-13 18:16:19,787: root: INFO: Current backtesting datetime 2020-04-10 08:29:00-05:00 +2024-04-13 18:16:19,787: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:16:19,788: root: INFO: Current backtesting datetime 2020-04-13 07:30:00-05:00 +2024-04-13 18:16:19,788: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:16:19,789: root: INFO: Current backtesting datetime 2020-04-13 08:30:00-05:00 +2024-04-13 18:16:19,789: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:16:19,790: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:19 +2024-04-13 18:16:19,790: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:19,791: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:19,791: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:19,792: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:19,792: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:21,057: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:21,058: root: INFO: Current backtesting datetime 2020-04-13 15:00:00-05:00 +2024-04-13 18:16:21,058: root: INFO: Current backtesting datetime 2020-04-14 08:30:00-05:00 +2024-04-13 18:16:21,058: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:21 +2024-04-13 18:16:21,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:21,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:21,060: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:21,060: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:21,060: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:22,670: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:22,671: root: INFO: Current backtesting datetime 2020-04-14 15:00:00-05:00 +2024-04-13 18:16:22,671: root: INFO: Current backtesting datetime 2020-04-15 08:30:00-05:00 +2024-04-13 18:16:22,672: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:22 +2024-04-13 18:16:22,672: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:22,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:22,673: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:22,673: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:22,673: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:23,717: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:23,719: root: INFO: Current backtesting datetime 2020-04-15 15:00:00-05:00 +2024-04-13 18:16:23,719: root: INFO: Current backtesting datetime 2020-04-16 08:30:00-05:00 +2024-04-13 18:16:23,719: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:23 +2024-04-13 18:16:23,719: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:23,720: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:23,720: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:23,721: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:23,721: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:24,765: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:24,766: root: INFO: Current backtesting datetime 2020-04-16 15:00:00-05:00 +2024-04-13 18:16:24,767: root: INFO: Current backtesting datetime 2020-04-17 08:30:00-05:00 +2024-04-13 18:16:24,767: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:24 +2024-04-13 18:16:24,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:24,768: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:24,768: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:24,769: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:24,769: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:26,343: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:26,344: root: INFO: Current backtesting datetime 2020-04-17 15:00:00-05:00 +2024-04-13 18:16:26,344: root: INFO: Current backtesting datetime 2020-04-18 08:30:00-05:00 +2024-04-13 18:16:26,345: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:16:26,347: root: INFO: Current backtesting datetime 2020-04-18 08:29:00-05:00 +2024-04-13 18:16:26,348: root: INFO: Current backtesting datetime 2020-04-18 08:29:00-05:00 +2024-04-13 18:16:26,348: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:16:26,349: root: INFO: Current backtesting datetime 2020-04-20 07:30:00-05:00 +2024-04-13 18:16:26,349: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:16:26,350: root: INFO: Current backtesting datetime 2020-04-20 08:30:00-05:00 +2024-04-13 18:16:26,350: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:16:26,351: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:26 +2024-04-13 18:16:26,351: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:26,352: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:26,352: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:26,353: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:26,353: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:27,452: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:27,453: root: INFO: Current backtesting datetime 2020-04-20 15:00:00-05:00 +2024-04-13 18:16:27,453: root: INFO: Current backtesting datetime 2020-04-21 08:30:00-05:00 +2024-04-13 18:16:27,454: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:27 +2024-04-13 18:16:27,454: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:27,455: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:27,455: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:27,455: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:27,455: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:29,227: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:29,228: root: INFO: Current backtesting datetime 2020-04-21 15:00:00-05:00 +2024-04-13 18:16:29,228: root: INFO: Current backtesting datetime 2020-04-22 08:30:00-05:00 +2024-04-13 18:16:29,229: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:29 +2024-04-13 18:16:29,229: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:29,229: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:29,230: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:29,230: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:29,230: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:30,744: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:30,745: root: INFO: Current backtesting datetime 2020-04-22 15:00:00-05:00 +2024-04-13 18:16:30,745: root: INFO: Current backtesting datetime 2020-04-23 08:30:00-05:00 +2024-04-13 18:16:30,746: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:30 +2024-04-13 18:16:30,746: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:30,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:30,747: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:30,748: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:30,748: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:31,944: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:31,945: root: INFO: Current backtesting datetime 2020-04-23 15:00:00-05:00 +2024-04-13 18:16:31,946: root: INFO: Current backtesting datetime 2020-04-24 08:30:00-05:00 +2024-04-13 18:16:31,946: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:31 +2024-04-13 18:16:31,946: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:31,947: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:31,947: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:31,948: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:31,948: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:33,370: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:33,371: root: INFO: Current backtesting datetime 2020-04-24 15:00:00-05:00 +2024-04-13 18:16:33,372: root: INFO: Current backtesting datetime 2020-04-25 08:30:00-05:00 +2024-04-13 18:16:33,372: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:16:33,374: root: INFO: Current backtesting datetime 2020-04-25 08:29:00-05:00 +2024-04-13 18:16:33,375: root: INFO: Current backtesting datetime 2020-04-25 08:29:00-05:00 +2024-04-13 18:16:33,375: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:16:33,376: root: INFO: Current backtesting datetime 2020-04-27 07:30:00-05:00 +2024-04-13 18:16:33,376: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:16:33,377: root: INFO: Current backtesting datetime 2020-04-27 08:30:00-05:00 +2024-04-13 18:16:33,377: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:16:33,378: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:33 +2024-04-13 18:16:33,378: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:33,379: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:33,379: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:33,380: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:33,380: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:34,758: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:34,759: root: INFO: Current backtesting datetime 2020-04-27 15:00:00-05:00 +2024-04-13 18:16:34,760: root: INFO: Current backtesting datetime 2020-04-28 08:30:00-05:00 +2024-04-13 18:16:34,760: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:34 +2024-04-13 18:16:34,760: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:34,761: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:34,761: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:34,762: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:34,762: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:36,528: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:36,529: root: INFO: Current backtesting datetime 2020-04-28 15:00:00-05:00 +2024-04-13 18:16:36,530: root: INFO: Current backtesting datetime 2020-04-29 08:30:00-05:00 +2024-04-13 18:16:36,530: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:36 +2024-04-13 18:16:36,530: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:36,531: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:36,531: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:36,532: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:36,532: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:38,827: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:38,829: root: INFO: Current backtesting datetime 2020-04-29 15:00:00-05:00 +2024-04-13 18:16:38,829: root: INFO: Current backtesting datetime 2020-04-30 08:30:00-05:00 +2024-04-13 18:16:38,829: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:38 +2024-04-13 18:16:38,829: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:38,830: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:38,830: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:38,831: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:38,831: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:41,376: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:41,377: root: INFO: Current backtesting datetime 2020-04-30 15:00:00-05:00 +2024-04-13 18:16:41,377: root: INFO: Current backtesting datetime 2020-05-01 08:30:00-05:00 +2024-04-13 18:16:41,377: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:41 +2024-04-13 18:16:41,378: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:41,378: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:41,379: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:41,379: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:41,379: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:43,329: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:43,331: root: INFO: Current backtesting datetime 2020-05-01 15:00:00-05:00 +2024-04-13 18:16:43,331: root: INFO: Current backtesting datetime 2020-05-02 08:30:00-05:00 +2024-04-13 18:16:43,331: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:16:43,332: root: INFO: Current backtesting datetime 2020-05-02 08:29:00-05:00 +2024-04-13 18:16:43,334: root: INFO: Current backtesting datetime 2020-05-02 08:29:00-05:00 +2024-04-13 18:16:43,334: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:16:43,335: root: INFO: Current backtesting datetime 2020-05-04 07:30:00-05:00 +2024-04-13 18:16:43,335: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:16:43,336: root: INFO: Current backtesting datetime 2020-05-04 08:30:00-05:00 +2024-04-13 18:16:43,336: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:16:43,337: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:43 +2024-04-13 18:16:43,337: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:43,338: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:43,338: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:43,339: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:43,339: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:44,725: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:44,726: root: INFO: Current backtesting datetime 2020-05-04 15:00:00-05:00 +2024-04-13 18:16:44,727: root: INFO: Current backtesting datetime 2020-05-05 08:30:00-05:00 +2024-04-13 18:16:44,727: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:44 +2024-04-13 18:16:44,727: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:44,728: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:44,728: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:44,729: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:44,729: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:45,892: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:45,892: root: INFO: Current backtesting datetime 2020-05-05 15:00:00-05:00 +2024-04-13 18:16:45,893: root: INFO: Current backtesting datetime 2020-05-06 08:30:00-05:00 +2024-04-13 18:16:45,893: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:45 +2024-04-13 18:16:45,893: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:45,894: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:45,895: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:45,895: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:45,895: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:46,754: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:46,755: root: INFO: Current backtesting datetime 2020-05-06 15:00:00-05:00 +2024-04-13 18:16:46,755: root: INFO: Current backtesting datetime 2020-05-07 08:30:00-05:00 +2024-04-13 18:16:46,756: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:46 +2024-04-13 18:16:46,756: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:46,757: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:46,757: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:46,757: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:46,757: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:48,203: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:48,204: root: INFO: Current backtesting datetime 2020-05-07 15:00:00-05:00 +2024-04-13 18:16:48,205: root: INFO: Current backtesting datetime 2020-05-08 08:30:00-05:00 +2024-04-13 18:16:48,205: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:48 +2024-04-13 18:16:48,205: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:48,206: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:48,206: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:48,207: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:48,207: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:49,865: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:49,866: root: INFO: Current backtesting datetime 2020-05-08 15:00:00-05:00 +2024-04-13 18:16:49,866: root: INFO: Current backtesting datetime 2020-05-09 08:30:00-05:00 +2024-04-13 18:16:49,866: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:16:49,868: root: INFO: Current backtesting datetime 2020-05-09 08:29:00-05:00 +2024-04-13 18:16:49,869: root: INFO: Current backtesting datetime 2020-05-09 08:29:00-05:00 +2024-04-13 18:16:49,869: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:16:49,870: root: INFO: Current backtesting datetime 2020-05-11 07:30:00-05:00 +2024-04-13 18:16:49,870: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:16:49,871: root: INFO: Current backtesting datetime 2020-05-11 08:30:00-05:00 +2024-04-13 18:16:49,871: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:16:49,872: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:49 +2024-04-13 18:16:49,873: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:49,873: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:49,874: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:49,874: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:49,874: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:50,706: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:50,707: root: INFO: Current backtesting datetime 2020-05-11 15:00:00-05:00 +2024-04-13 18:16:50,707: root: INFO: Current backtesting datetime 2020-05-12 08:30:00-05:00 +2024-04-13 18:16:50,708: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:50 +2024-04-13 18:16:50,708: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:50,709: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:50,709: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:50,710: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:50,710: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:51,596: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:51,597: root: INFO: Current backtesting datetime 2020-05-12 15:00:00-05:00 +2024-04-13 18:16:51,597: root: INFO: Current backtesting datetime 2020-05-13 08:30:00-05:00 +2024-04-13 18:16:51,597: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:51 +2024-04-13 18:16:51,597: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:51,598: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:51,598: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:51,599: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:51,599: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:52,764: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:52,765: root: INFO: Current backtesting datetime 2020-05-13 15:00:00-05:00 +2024-04-13 18:16:52,765: root: INFO: Current backtesting datetime 2020-05-14 08:30:00-05:00 +2024-04-13 18:16:52,765: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:52 +2024-04-13 18:16:52,765: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:52,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:52,767: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:52,768: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:52,768: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:53,852: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:53,853: root: INFO: Current backtesting datetime 2020-05-14 15:00:00-05:00 +2024-04-13 18:16:53,853: root: INFO: Current backtesting datetime 2020-05-15 08:30:00-05:00 +2024-04-13 18:16:53,853: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:53 +2024-04-13 18:16:53,853: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:53,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:53,854: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:53,855: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:53,855: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:55,239: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:55,240: root: INFO: Current backtesting datetime 2020-05-15 15:00:00-05:00 +2024-04-13 18:16:55,241: root: INFO: Current backtesting datetime 2020-05-16 08:30:00-05:00 +2024-04-13 18:16:55,241: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:16:55,243: root: INFO: Current backtesting datetime 2020-05-16 08:29:00-05:00 +2024-04-13 18:16:55,244: root: INFO: Current backtesting datetime 2020-05-16 08:29:00-05:00 +2024-04-13 18:16:55,244: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:16:55,245: root: INFO: Current backtesting datetime 2020-05-18 07:30:00-05:00 +2024-04-13 18:16:55,245: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:16:55,246: root: INFO: Current backtesting datetime 2020-05-18 08:30:00-05:00 +2024-04-13 18:16:55,246: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:16:55,247: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:55 +2024-04-13 18:16:55,247: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:55,248: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:55,248: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:55,249: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:55,249: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:56,101: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:56,102: root: INFO: Current backtesting datetime 2020-05-18 15:00:00-05:00 +2024-04-13 18:16:56,102: root: INFO: Current backtesting datetime 2020-05-19 08:30:00-05:00 +2024-04-13 18:16:56,103: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:56 +2024-04-13 18:16:56,103: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:56,103: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:56,104: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:56,104: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:56,104: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:57,400: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:57,402: root: INFO: Current backtesting datetime 2020-05-19 15:00:00-05:00 +2024-04-13 18:16:57,402: root: INFO: Current backtesting datetime 2020-05-20 08:30:00-05:00 +2024-04-13 18:16:57,402: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:57 +2024-04-13 18:16:57,402: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:57,403: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:57,403: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:57,404: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:57,404: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:58,363: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:58,364: root: INFO: Current backtesting datetime 2020-05-20 15:00:00-05:00 +2024-04-13 18:16:58,364: root: INFO: Current backtesting datetime 2020-05-21 08:30:00-05:00 +2024-04-13 18:16:58,364: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:58 +2024-04-13 18:16:58,365: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:58,365: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:58,366: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:58,366: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:58,366: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:59,228: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:59,230: root: INFO: Current backtesting datetime 2020-05-21 15:00:00-05:00 +2024-04-13 18:16:59,230: root: INFO: Current backtesting datetime 2020-05-22 08:30:00-05:00 +2024-04-13 18:16:59,230: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:59 +2024-04-13 18:16:59,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:59,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:59,231: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:59,232: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:59,232: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:16:59,877: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:16:59,878: root: INFO: Current backtesting datetime 2020-05-22 15:00:00-05:00 +2024-04-13 18:16:59,878: root: INFO: Current backtesting datetime 2020-05-23 08:30:00-05:00 +2024-04-13 18:16:59,879: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:16:59,880: root: INFO: Current backtesting datetime 2020-05-23 08:29:00-05:00 +2024-04-13 18:16:59,881: root: INFO: Current backtesting datetime 2020-05-23 08:29:00-05:00 +2024-04-13 18:16:59,881: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:16:59,882: root: INFO: Current backtesting datetime 2020-05-26 07:30:00-05:00 +2024-04-13 18:16:59,883: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:16:59,884: root: INFO: Current backtesting datetime 2020-05-26 08:30:00-05:00 +2024-04-13 18:16:59,884: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:16:59,885: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:16:59 +2024-04-13 18:16:59,885: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:59,886: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:16:59,886: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:16:59,886: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:16:59,886: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:00,489: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:00,491: root: INFO: Current backtesting datetime 2020-05-26 15:00:00-05:00 +2024-04-13 18:17:00,491: root: INFO: Current backtesting datetime 2020-05-27 08:30:00-05:00 +2024-04-13 18:17:00,491: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:00 +2024-04-13 18:17:00,491: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:00,492: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:00,492: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:00,493: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:00,493: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:02,111: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:02,111: root: INFO: Current backtesting datetime 2020-05-27 15:00:00-05:00 +2024-04-13 18:17:02,112: root: INFO: Current backtesting datetime 2020-05-28 08:30:00-05:00 +2024-04-13 18:17:02,112: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:02 +2024-04-13 18:17:02,112: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:02,113: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:02,113: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:02,114: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:02,114: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:03,538: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:03,539: root: INFO: Current backtesting datetime 2020-05-28 15:00:00-05:00 +2024-04-13 18:17:03,540: root: INFO: Current backtesting datetime 2020-05-29 08:30:00-05:00 +2024-04-13 18:17:03,540: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:03 +2024-04-13 18:17:03,540: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:03,541: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:03,541: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:03,542: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:03,542: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:05,519: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:05,520: root: INFO: Current backtesting datetime 2020-05-29 15:00:00-05:00 +2024-04-13 18:17:05,520: root: INFO: Current backtesting datetime 2020-05-30 08:30:00-05:00 +2024-04-13 18:17:05,520: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:17:05,522: root: INFO: Current backtesting datetime 2020-05-30 08:29:00-05:00 +2024-04-13 18:17:05,523: root: INFO: Current backtesting datetime 2020-05-30 08:29:00-05:00 +2024-04-13 18:17:05,523: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:17:05,524: root: INFO: Current backtesting datetime 2020-06-01 07:30:00-05:00 +2024-04-13 18:17:05,524: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:17:05,525: root: INFO: Current backtesting datetime 2020-06-01 08:30:00-05:00 +2024-04-13 18:17:05,525: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:17:05,526: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:05 +2024-04-13 18:17:05,526: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:05,527: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:05,527: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:05,528: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:05,528: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:06,681: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:06,682: root: INFO: Current backtesting datetime 2020-06-01 15:00:00-05:00 +2024-04-13 18:17:06,683: root: INFO: Current backtesting datetime 2020-06-02 08:30:00-05:00 +2024-04-13 18:17:06,683: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:06 +2024-04-13 18:17:06,683: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:06,684: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:06,684: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:06,685: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:06,685: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:08,801: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:08,803: root: INFO: Current backtesting datetime 2020-06-02 15:00:00-05:00 +2024-04-13 18:17:08,803: root: INFO: Current backtesting datetime 2020-06-03 08:30:00-05:00 +2024-04-13 18:17:08,803: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:08 +2024-04-13 18:17:08,803: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:08,804: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:08,804: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:08,805: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:08,805: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:10,305: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:10,306: root: INFO: Current backtesting datetime 2020-06-03 15:00:00-05:00 +2024-04-13 18:17:10,306: root: INFO: Current backtesting datetime 2020-06-04 08:30:00-05:00 +2024-04-13 18:17:10,306: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:10 +2024-04-13 18:17:10,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:10,307: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:10,307: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:10,308: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:10,308: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:11,605: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:11,606: root: INFO: Current backtesting datetime 2020-06-04 15:00:00-05:00 +2024-04-13 18:17:11,607: root: INFO: Current backtesting datetime 2020-06-05 08:30:00-05:00 +2024-04-13 18:17:11,607: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:11 +2024-04-13 18:17:11,607: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:11,608: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:11,608: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:11,609: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:11,609: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:12,337: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:12,338: root: INFO: Current backtesting datetime 2020-06-05 15:00:00-05:00 +2024-04-13 18:17:12,339: root: INFO: Current backtesting datetime 2020-06-06 08:30:00-05:00 +2024-04-13 18:17:12,339: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:17:12,341: root: INFO: Current backtesting datetime 2020-06-06 08:29:00-05:00 +2024-04-13 18:17:12,342: root: INFO: Current backtesting datetime 2020-06-06 08:29:00-05:00 +2024-04-13 18:17:12,342: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:17:12,342: root: INFO: Current backtesting datetime 2020-06-08 07:30:00-05:00 +2024-04-13 18:17:12,343: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:17:12,344: root: INFO: Current backtesting datetime 2020-06-08 08:30:00-05:00 +2024-04-13 18:17:12,344: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:17:12,345: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:12 +2024-04-13 18:17:12,345: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:12,346: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:12,346: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:12,346: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:12,346: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:13,141: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:13,142: root: INFO: Current backtesting datetime 2020-06-08 15:00:00-05:00 +2024-04-13 18:17:13,142: root: INFO: Current backtesting datetime 2020-06-09 08:30:00-05:00 +2024-04-13 18:17:13,142: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:13 +2024-04-13 18:17:13,142: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:13,143: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:13,143: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:13,144: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:13,144: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:14,232: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:14,233: root: INFO: Current backtesting datetime 2020-06-09 15:00:00-05:00 +2024-04-13 18:17:14,233: root: INFO: Current backtesting datetime 2020-06-10 08:30:00-05:00 +2024-04-13 18:17:14,233: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:14 +2024-04-13 18:17:14,233: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:14,234: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:14,234: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:14,235: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:14,235: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:15,293: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:15,294: root: INFO: Current backtesting datetime 2020-06-10 15:00:00-05:00 +2024-04-13 18:17:15,294: root: INFO: Current backtesting datetime 2020-06-11 08:30:00-05:00 +2024-04-13 18:17:15,295: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:15 +2024-04-13 18:17:15,295: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:15,295: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:15,296: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:15,296: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:15,296: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:16,443: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:16,444: root: INFO: Current backtesting datetime 2020-06-11 15:00:00-05:00 +2024-04-13 18:17:16,445: root: INFO: Current backtesting datetime 2020-06-12 08:30:00-05:00 +2024-04-13 18:17:16,445: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:16 +2024-04-13 18:17:16,445: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:16,446: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:16,446: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:16,447: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:16,447: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:17,744: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:17,745: root: INFO: Current backtesting datetime 2020-06-12 15:00:00-05:00 +2024-04-13 18:17:17,745: root: INFO: Current backtesting datetime 2020-06-13 08:30:00-05:00 +2024-04-13 18:17:17,745: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:17:17,747: root: INFO: Current backtesting datetime 2020-06-13 08:29:00-05:00 +2024-04-13 18:17:17,748: root: INFO: Current backtesting datetime 2020-06-13 08:29:00-05:00 +2024-04-13 18:17:17,748: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:17:17,749: root: INFO: Current backtesting datetime 2020-06-15 07:30:00-05:00 +2024-04-13 18:17:17,749: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:17:17,750: root: INFO: Current backtesting datetime 2020-06-15 08:30:00-05:00 +2024-04-13 18:17:17,750: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:17:17,751: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:17 +2024-04-13 18:17:17,751: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:17,752: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:17,752: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:17,753: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:17,753: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:18,910: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:18,911: root: INFO: Current backtesting datetime 2020-06-15 15:00:00-05:00 +2024-04-13 18:17:18,911: root: INFO: Current backtesting datetime 2020-06-16 08:30:00-05:00 +2024-04-13 18:17:18,911: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:18 +2024-04-13 18:17:18,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:18,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:18,913: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:18,913: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:18,913: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:20,275: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:20,277: root: INFO: Current backtesting datetime 2020-06-16 15:00:00-05:00 +2024-04-13 18:17:20,277: root: INFO: Current backtesting datetime 2020-06-17 08:30:00-05:00 +2024-04-13 18:17:20,277: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:20 +2024-04-13 18:17:20,277: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:20,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:20,278: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:20,279: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:20,279: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:21,350: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:21,351: root: INFO: Current backtesting datetime 2020-06-17 15:00:00-05:00 +2024-04-13 18:17:21,351: root: INFO: Current backtesting datetime 2020-06-18 08:30:00-05:00 +2024-04-13 18:17:21,352: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:21 +2024-04-13 18:17:21,352: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:21,353: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:21,353: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:21,353: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:21,353: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:22,475: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:22,476: root: INFO: Current backtesting datetime 2020-06-18 15:00:00-05:00 +2024-04-13 18:17:22,477: root: INFO: Current backtesting datetime 2020-06-19 08:30:00-05:00 +2024-04-13 18:17:22,477: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:22 +2024-04-13 18:17:22,477: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:22,478: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:22,478: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:22,478: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:22,478: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:23,660: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:23,660: root: INFO: Current backtesting datetime 2020-06-19 15:00:00-05:00 +2024-04-13 18:17:23,661: root: INFO: Current backtesting datetime 2020-06-20 08:30:00-05:00 +2024-04-13 18:17:23,661: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:17:23,663: root: INFO: Current backtesting datetime 2020-06-20 08:29:00-05:00 +2024-04-13 18:17:23,664: root: INFO: Current backtesting datetime 2020-06-20 08:29:00-05:00 +2024-04-13 18:17:23,664: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:17:23,665: root: INFO: Current backtesting datetime 2020-06-22 07:30:00-05:00 +2024-04-13 18:17:23,665: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:17:23,667: root: INFO: Current backtesting datetime 2020-06-22 08:30:00-05:00 +2024-04-13 18:17:23,667: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:17:23,667: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:23 +2024-04-13 18:17:23,668: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:23,668: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:23,669: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:23,669: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:23,669: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:25,429: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:25,430: root: INFO: Current backtesting datetime 2020-06-22 15:00:00-05:00 +2024-04-13 18:17:25,430: root: INFO: Current backtesting datetime 2020-06-23 08:30:00-05:00 +2024-04-13 18:17:25,431: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:25 +2024-04-13 18:17:25,431: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:25,432: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:25,432: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:25,432: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:25,432: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:26,386: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:26,387: root: INFO: Current backtesting datetime 2020-06-23 15:00:00-05:00 +2024-04-13 18:17:26,387: root: INFO: Current backtesting datetime 2020-06-24 08:30:00-05:00 +2024-04-13 18:17:26,387: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:26 +2024-04-13 18:17:26,387: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:26,388: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:26,388: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:26,389: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:26,389: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:27,435: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:27,436: root: INFO: Current backtesting datetime 2020-06-24 15:00:00-05:00 +2024-04-13 18:17:27,436: root: INFO: Current backtesting datetime 2020-06-25 08:30:00-05:00 +2024-04-13 18:17:27,436: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:27 +2024-04-13 18:17:27,436: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:27,436: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:27,438: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:27,438: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:27,438: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:29,477: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:29,478: root: INFO: Current backtesting datetime 2020-06-25 15:00:00-05:00 +2024-04-13 18:17:29,478: root: INFO: Current backtesting datetime 2020-06-26 08:30:00-05:00 +2024-04-13 18:17:29,479: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:29 +2024-04-13 18:17:29,479: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:29,479: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:29,480: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:29,480: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:29,480: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:32,669: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:32,671: root: INFO: Current backtesting datetime 2020-06-26 15:00:00-05:00 +2024-04-13 18:17:32,671: root: INFO: Current backtesting datetime 2020-06-27 08:30:00-05:00 +2024-04-13 18:17:32,671: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:17:32,673: root: INFO: Current backtesting datetime 2020-06-27 08:29:00-05:00 +2024-04-13 18:17:32,674: root: INFO: Current backtesting datetime 2020-06-27 08:29:00-05:00 +2024-04-13 18:17:32,674: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:17:32,675: root: INFO: Current backtesting datetime 2020-06-29 07:30:00-05:00 +2024-04-13 18:17:32,675: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:17:32,676: root: INFO: Current backtesting datetime 2020-06-29 08:30:00-05:00 +2024-04-13 18:17:32,676: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:17:32,677: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:32 +2024-04-13 18:17:32,677: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:32,678: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:32,678: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:32,679: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:32,679: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:34,914: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:34,916: root: INFO: Current backtesting datetime 2020-06-29 15:00:00-05:00 +2024-04-13 18:17:34,916: root: INFO: Current backtesting datetime 2020-06-30 08:30:00-05:00 +2024-04-13 18:17:34,916: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:34 +2024-04-13 18:17:34,916: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:34,917: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:34,917: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:34,918: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:34,918: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:35,986: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:35,986: root: INFO: Current backtesting datetime 2020-06-30 15:00:00-05:00 +2024-04-13 18:17:35,986: root: INFO: Current backtesting datetime 2020-07-01 08:30:00-05:00 +2024-04-13 18:17:35,987: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:35 +2024-04-13 18:17:35,987: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:35,988: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:35,988: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:35,989: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:35,989: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:37,490: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:37,490: root: INFO: Current backtesting datetime 2020-07-01 15:00:00-05:00 +2024-04-13 18:17:37,491: root: INFO: Current backtesting datetime 2020-07-02 08:30:00-05:00 +2024-04-13 18:17:37,491: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:37 +2024-04-13 18:17:37,491: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:37,492: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:37,492: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:37,493: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:37,493: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:40,080: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:40,081: root: INFO: Current backtesting datetime 2020-07-02 15:00:00-05:00 +2024-04-13 18:17:40,081: root: INFO: Current backtesting datetime 2020-07-03 08:30:00-05:00 +2024-04-13 18:17:40,082: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:17:40,083: root: INFO: Current backtesting datetime 2020-07-03 08:29:00-05:00 +2024-04-13 18:17:40,084: root: INFO: Current backtesting datetime 2020-07-03 08:29:00-05:00 +2024-04-13 18:17:40,084: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:17:40,085: root: INFO: Current backtesting datetime 2020-07-06 07:30:00-05:00 +2024-04-13 18:17:40,086: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:17:40,087: root: INFO: Current backtesting datetime 2020-07-06 08:30:00-05:00 +2024-04-13 18:17:40,087: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:17:40,088: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:40 +2024-04-13 18:17:40,088: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:40,088: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:40,089: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:40,089: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:40,089: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:42,856: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:42,857: root: INFO: Current backtesting datetime 2020-07-06 15:00:00-05:00 +2024-04-13 18:17:42,857: root: INFO: Current backtesting datetime 2020-07-07 08:30:00-05:00 +2024-04-13 18:17:42,858: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:42 +2024-04-13 18:17:42,858: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:42,859: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:42,859: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:42,859: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:42,860: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:45,082: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:45,083: root: INFO: Current backtesting datetime 2020-07-07 15:00:00-05:00 +2024-04-13 18:17:45,084: root: INFO: Current backtesting datetime 2020-07-08 08:30:00-05:00 +2024-04-13 18:17:45,084: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:45 +2024-04-13 18:17:45,084: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:45,085: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:45,085: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:45,086: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:45,086: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:46,701: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:46,702: root: INFO: Current backtesting datetime 2020-07-08 15:00:00-05:00 +2024-04-13 18:17:46,702: root: INFO: Current backtesting datetime 2020-07-09 08:30:00-05:00 +2024-04-13 18:17:46,703: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:46 +2024-04-13 18:17:46,703: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:46,704: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:46,704: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:46,704: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:46,705: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:47,873: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:47,874: root: INFO: Current backtesting datetime 2020-07-09 15:00:00-05:00 +2024-04-13 18:17:47,874: root: INFO: Current backtesting datetime 2020-07-10 08:30:00-05:00 +2024-04-13 18:17:47,874: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:47 +2024-04-13 18:17:47,875: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:47,875: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:47,876: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:47,876: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:47,876: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:49,904: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:49,905: root: INFO: Current backtesting datetime 2020-07-10 15:00:00-05:00 +2024-04-13 18:17:49,905: root: INFO: Current backtesting datetime 2020-07-11 08:30:00-05:00 +2024-04-13 18:17:49,905: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:17:49,907: root: INFO: Current backtesting datetime 2020-07-11 08:29:00-05:00 +2024-04-13 18:17:49,908: root: INFO: Current backtesting datetime 2020-07-11 08:29:00-05:00 +2024-04-13 18:17:49,908: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:17:49,909: root: INFO: Current backtesting datetime 2020-07-13 07:30:00-05:00 +2024-04-13 18:17:49,909: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:17:49,910: root: INFO: Current backtesting datetime 2020-07-13 08:30:00-05:00 +2024-04-13 18:17:49,910: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:17:49,911: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:49 +2024-04-13 18:17:49,911: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:49,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:49,912: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:49,913: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:49,913: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:51,127: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:51,128: root: INFO: Current backtesting datetime 2020-07-13 15:00:00-05:00 +2024-04-13 18:17:51,128: root: INFO: Current backtesting datetime 2020-07-14 08:30:00-05:00 +2024-04-13 18:17:51,129: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:51 +2024-04-13 18:17:51,129: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:51,130: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:51,130: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:51,131: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:51,131: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:52,226: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:52,227: root: INFO: Current backtesting datetime 2020-07-14 15:00:00-05:00 +2024-04-13 18:17:52,227: root: INFO: Current backtesting datetime 2020-07-15 08:30:00-05:00 +2024-04-13 18:17:52,228: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:52 +2024-04-13 18:17:52,228: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:52,229: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:52,229: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:52,229: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:52,229: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:53,700: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:53,700: root: INFO: Current backtesting datetime 2020-07-15 15:00:00-05:00 +2024-04-13 18:17:53,701: root: INFO: Current backtesting datetime 2020-07-16 08:30:00-05:00 +2024-04-13 18:17:53,701: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:53 +2024-04-13 18:17:53,701: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:53,702: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:53,702: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:53,703: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:53,703: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:54,680: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:54,681: root: INFO: Current backtesting datetime 2020-07-16 15:00:00-05:00 +2024-04-13 18:17:54,681: root: INFO: Current backtesting datetime 2020-07-17 08:30:00-05:00 +2024-04-13 18:17:54,681: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:54 +2024-04-13 18:17:54,681: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:54,682: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:54,682: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:54,683: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:54,683: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:56,678: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:56,680: root: INFO: Current backtesting datetime 2020-07-17 15:00:00-05:00 +2024-04-13 18:17:56,680: root: INFO: Current backtesting datetime 2020-07-18 08:30:00-05:00 +2024-04-13 18:17:56,680: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:17:56,682: root: INFO: Current backtesting datetime 2020-07-18 08:29:00-05:00 +2024-04-13 18:17:56,683: root: INFO: Current backtesting datetime 2020-07-18 08:29:00-05:00 +2024-04-13 18:17:56,683: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:17:56,684: root: INFO: Current backtesting datetime 2020-07-20 07:30:00-05:00 +2024-04-13 18:17:56,684: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:17:56,685: root: INFO: Current backtesting datetime 2020-07-20 08:30:00-05:00 +2024-04-13 18:17:56,685: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:17:56,686: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:56 +2024-04-13 18:17:56,686: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:56,687: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:56,687: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:56,688: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:56,688: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:17:58,401: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:17:58,402: root: INFO: Current backtesting datetime 2020-07-20 15:00:00-05:00 +2024-04-13 18:17:58,402: root: INFO: Current backtesting datetime 2020-07-21 08:30:00-05:00 +2024-04-13 18:17:58,403: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:17:58 +2024-04-13 18:17:58,403: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:58,403: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:17:58,404: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:17:58,404: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:17:58,404: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:01,435: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:01,436: root: INFO: Current backtesting datetime 2020-07-21 15:00:00-05:00 +2024-04-13 18:18:01,436: root: INFO: Current backtesting datetime 2020-07-22 08:30:00-05:00 +2024-04-13 18:18:01,437: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:01 +2024-04-13 18:18:01,437: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:01,438: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:01,438: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:01,438: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:01,438: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:02,854: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:02,855: root: INFO: Current backtesting datetime 2020-07-22 15:00:00-05:00 +2024-04-13 18:18:02,855: root: INFO: Current backtesting datetime 2020-07-23 08:30:00-05:00 +2024-04-13 18:18:02,856: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:02 +2024-04-13 18:18:02,856: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:02,857: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:02,857: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:02,857: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:02,857: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:04,759: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:04,760: root: INFO: Current backtesting datetime 2020-07-23 15:00:00-05:00 +2024-04-13 18:18:04,760: root: INFO: Current backtesting datetime 2020-07-24 08:30:00-05:00 +2024-04-13 18:18:04,760: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:04 +2024-04-13 18:18:04,761: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:04,761: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:04,762: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:04,762: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:04,762: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:05,830: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:05,831: root: INFO: Current backtesting datetime 2020-07-24 15:00:00-05:00 +2024-04-13 18:18:05,831: root: INFO: Current backtesting datetime 2020-07-25 08:30:00-05:00 +2024-04-13 18:18:05,832: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:05,833: root: INFO: Current backtesting datetime 2020-07-25 08:29:00-05:00 +2024-04-13 18:18:05,834: root: INFO: Current backtesting datetime 2020-07-25 08:29:00-05:00 +2024-04-13 18:18:05,834: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:05,835: root: INFO: Current backtesting datetime 2020-07-27 07:30:00-05:00 +2024-04-13 18:18:05,836: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:05,836: root: INFO: Current backtesting datetime 2020-07-27 08:30:00-05:00 +2024-04-13 18:18:05,836: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:05,837: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:05 +2024-04-13 18:18:05,837: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:05,838: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:05,838: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:05,839: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:05,839: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:07,233: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:07,234: root: INFO: Current backtesting datetime 2020-07-27 15:00:00-05:00 +2024-04-13 18:18:07,234: root: INFO: Current backtesting datetime 2020-07-28 08:30:00-05:00 +2024-04-13 18:18:07,235: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:07 +2024-04-13 18:18:07,235: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:07,236: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:07,236: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:07,236: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:07,236: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:09,002: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:09,003: root: INFO: Current backtesting datetime 2020-07-28 15:00:00-05:00 +2024-04-13 18:18:09,004: root: INFO: Current backtesting datetime 2020-07-29 08:30:00-05:00 +2024-04-13 18:18:09,004: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:09 +2024-04-13 18:18:09,004: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:09,005: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:09,005: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:09,006: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:09,006: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:10,218: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:10,219: root: INFO: Current backtesting datetime 2020-07-29 15:00:00-05:00 +2024-04-13 18:18:10,220: root: INFO: Current backtesting datetime 2020-07-30 08:30:00-05:00 +2024-04-13 18:18:10,220: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:10 +2024-04-13 18:18:10,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:10,221: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:10,221: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:10,222: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:10,222: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:11,342: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:11,343: root: INFO: Current backtesting datetime 2020-07-30 15:00:00-05:00 +2024-04-13 18:18:11,343: root: INFO: Current backtesting datetime 2020-07-31 08:30:00-05:00 +2024-04-13 18:18:11,343: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:11 +2024-04-13 18:18:11,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:11,344: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:11,344: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:11,345: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:11,345: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:12,496: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:12,497: root: INFO: Current backtesting datetime 2020-07-31 15:00:00-05:00 +2024-04-13 18:18:12,497: root: INFO: Current backtesting datetime 2020-08-01 08:30:00-05:00 +2024-04-13 18:18:12,498: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:12,499: root: INFO: Current backtesting datetime 2020-08-01 08:29:00-05:00 +2024-04-13 18:18:12,500: root: INFO: Current backtesting datetime 2020-08-01 08:29:00-05:00 +2024-04-13 18:18:12,500: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:12,501: root: INFO: Current backtesting datetime 2020-08-03 07:30:00-05:00 +2024-04-13 18:18:12,502: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:12,503: root: INFO: Current backtesting datetime 2020-08-03 08:30:00-05:00 +2024-04-13 18:18:12,503: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:12,504: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:12 +2024-04-13 18:18:12,504: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:12,504: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:12,505: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:12,505: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:12,505: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:13,172: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:13,173: root: INFO: Current backtesting datetime 2020-08-03 15:00:00-05:00 +2024-04-13 18:18:13,174: root: INFO: Current backtesting datetime 2020-08-04 08:30:00-05:00 +2024-04-13 18:18:13,174: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:13 +2024-04-13 18:18:13,174: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:13,175: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:13,175: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:13,176: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:13,176: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:14,169: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:14,170: root: INFO: Current backtesting datetime 2020-08-04 15:00:00-05:00 +2024-04-13 18:18:14,170: root: INFO: Current backtesting datetime 2020-08-05 08:30:00-05:00 +2024-04-13 18:18:14,170: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:14 +2024-04-13 18:18:14,170: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:14,171: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:14,171: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:14,172: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:14,172: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:15,119: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:15,120: root: INFO: Current backtesting datetime 2020-08-05 15:00:00-05:00 +2024-04-13 18:18:15,120: root: INFO: Current backtesting datetime 2020-08-06 08:30:00-05:00 +2024-04-13 18:18:15,121: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:15 +2024-04-13 18:18:15,121: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:15,121: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:15,122: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:15,122: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:15,122: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:16,330: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:16,331: root: INFO: Current backtesting datetime 2020-08-06 15:00:00-05:00 +2024-04-13 18:18:16,333: root: INFO: Current backtesting datetime 2020-08-07 08:30:00-05:00 +2024-04-13 18:18:16,333: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:16 +2024-04-13 18:18:16,333: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:16,334: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:16,334: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:16,335: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:16,335: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:17,548: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:17,549: root: INFO: Current backtesting datetime 2020-08-07 15:00:00-05:00 +2024-04-13 18:18:17,550: root: INFO: Current backtesting datetime 2020-08-08 08:30:00-05:00 +2024-04-13 18:18:17,550: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:17,552: root: INFO: Current backtesting datetime 2020-08-08 08:29:00-05:00 +2024-04-13 18:18:17,553: root: INFO: Current backtesting datetime 2020-08-08 08:29:00-05:00 +2024-04-13 18:18:17,553: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:17,554: root: INFO: Current backtesting datetime 2020-08-10 07:30:00-05:00 +2024-04-13 18:18:17,554: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:17,555: root: INFO: Current backtesting datetime 2020-08-10 08:30:00-05:00 +2024-04-13 18:18:17,555: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:17,556: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:17 +2024-04-13 18:18:17,556: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:17,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:17,557: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:17,558: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:17,558: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:18,443: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:18,444: root: INFO: Current backtesting datetime 2020-08-10 15:00:00-05:00 +2024-04-13 18:18:18,444: root: INFO: Current backtesting datetime 2020-08-11 08:30:00-05:00 +2024-04-13 18:18:18,445: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:18 +2024-04-13 18:18:18,445: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:18,445: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:18,445: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:18,447: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:18,447: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:19,007: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:19,008: root: INFO: Current backtesting datetime 2020-08-11 15:00:00-05:00 +2024-04-13 18:18:19,008: root: INFO: Current backtesting datetime 2020-08-12 08:30:00-05:00 +2024-04-13 18:18:19,009: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:19 +2024-04-13 18:18:19,009: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:19,010: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:19,010: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:19,010: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:19,010: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:19,863: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:19,863: root: INFO: Current backtesting datetime 2020-08-12 15:00:00-05:00 +2024-04-13 18:18:19,864: root: INFO: Current backtesting datetime 2020-08-13 08:30:00-05:00 +2024-04-13 18:18:19,864: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:19 +2024-04-13 18:18:19,864: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:19,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:19,865: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:19,866: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:19,866: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:20,557: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:20,558: root: INFO: Current backtesting datetime 2020-08-13 15:00:00-05:00 +2024-04-13 18:18:20,558: root: INFO: Current backtesting datetime 2020-08-14 08:30:00-05:00 +2024-04-13 18:18:20,559: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:20 +2024-04-13 18:18:20,559: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:20,559: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:20,560: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:20,560: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:20,560: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:21,183: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:21,184: root: INFO: Current backtesting datetime 2020-08-14 15:00:00-05:00 +2024-04-13 18:18:21,184: root: INFO: Current backtesting datetime 2020-08-15 08:30:00-05:00 +2024-04-13 18:18:21,184: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:21,185: root: INFO: Current backtesting datetime 2020-08-15 08:29:00-05:00 +2024-04-13 18:18:21,187: root: INFO: Current backtesting datetime 2020-08-15 08:29:00-05:00 +2024-04-13 18:18:21,187: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:21,188: root: INFO: Current backtesting datetime 2020-08-17 07:30:00-05:00 +2024-04-13 18:18:21,188: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:21,189: root: INFO: Current backtesting datetime 2020-08-17 08:30:00-05:00 +2024-04-13 18:18:21,189: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:21,190: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:21 +2024-04-13 18:18:21,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:21,191: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:21,191: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:21,192: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:21,192: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:22,745: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:22,746: root: INFO: Current backtesting datetime 2020-08-17 15:00:00-05:00 +2024-04-13 18:18:22,746: root: INFO: Current backtesting datetime 2020-08-18 08:30:00-05:00 +2024-04-13 18:18:22,747: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:22 +2024-04-13 18:18:22,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:22,748: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:22,748: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:22,748: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:22,748: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:24,005: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:24,007: root: INFO: Current backtesting datetime 2020-08-18 15:00:00-05:00 +2024-04-13 18:18:24,007: root: INFO: Current backtesting datetime 2020-08-19 08:30:00-05:00 +2024-04-13 18:18:24,007: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:24 +2024-04-13 18:18:24,007: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:24,008: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:24,008: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:24,008: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:24,008: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:24,817: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:24,817: root: INFO: Current backtesting datetime 2020-08-19 15:00:00-05:00 +2024-04-13 18:18:24,818: root: INFO: Current backtesting datetime 2020-08-20 08:30:00-05:00 +2024-04-13 18:18:24,818: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:24 +2024-04-13 18:18:24,818: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:24,820: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:24,820: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:24,821: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:24,821: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:25,624: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:25,625: root: INFO: Current backtesting datetime 2020-08-20 15:00:00-05:00 +2024-04-13 18:18:25,625: root: INFO: Current backtesting datetime 2020-08-21 08:30:00-05:00 +2024-04-13 18:18:25,625: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:25 +2024-04-13 18:18:25,626: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:25,626: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:25,627: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:25,627: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:25,627: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:27,021: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:27,022: root: INFO: Current backtesting datetime 2020-08-21 15:00:00-05:00 +2024-04-13 18:18:27,022: root: INFO: Current backtesting datetime 2020-08-22 08:30:00-05:00 +2024-04-13 18:18:27,022: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:27,024: root: INFO: Current backtesting datetime 2020-08-22 08:29:00-05:00 +2024-04-13 18:18:27,025: root: INFO: Current backtesting datetime 2020-08-22 08:29:00-05:00 +2024-04-13 18:18:27,025: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:27,026: root: INFO: Current backtesting datetime 2020-08-24 07:30:00-05:00 +2024-04-13 18:18:27,026: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:27,027: root: INFO: Current backtesting datetime 2020-08-24 08:30:00-05:00 +2024-04-13 18:18:27,027: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:27,028: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:27 +2024-04-13 18:18:27,028: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:27,029: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:27,029: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:27,029: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:27,030: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:28,236: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:28,237: root: INFO: Current backtesting datetime 2020-08-24 15:00:00-05:00 +2024-04-13 18:18:28,238: root: INFO: Current backtesting datetime 2020-08-25 08:30:00-05:00 +2024-04-13 18:18:28,238: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:28 +2024-04-13 18:18:28,238: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:28,239: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:28,239: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:28,240: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:28,240: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:29,222: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:29,224: root: INFO: Current backtesting datetime 2020-08-25 15:00:00-05:00 +2024-04-13 18:18:29,224: root: INFO: Current backtesting datetime 2020-08-26 08:30:00-05:00 +2024-04-13 18:18:29,224: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:29 +2024-04-13 18:18:29,224: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:29,225: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:29,225: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:29,226: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:29,226: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:30,785: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:30,786: root: INFO: Current backtesting datetime 2020-08-26 15:00:00-05:00 +2024-04-13 18:18:30,787: root: INFO: Current backtesting datetime 2020-08-27 08:30:00-05:00 +2024-04-13 18:18:30,787: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:30 +2024-04-13 18:18:30,787: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:30,788: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:30,788: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:30,789: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:30,789: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:31,777: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:31,778: root: INFO: Current backtesting datetime 2020-08-27 15:00:00-05:00 +2024-04-13 18:18:31,779: root: INFO: Current backtesting datetime 2020-08-28 08:30:00-05:00 +2024-04-13 18:18:31,779: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:31 +2024-04-13 18:18:31,779: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:31,780: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:31,780: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:31,781: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:31,781: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:32,524: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:32,525: root: INFO: Current backtesting datetime 2020-08-28 15:00:00-05:00 +2024-04-13 18:18:32,525: root: INFO: Current backtesting datetime 2020-08-29 08:30:00-05:00 +2024-04-13 18:18:32,526: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:32,527: root: INFO: Current backtesting datetime 2020-08-29 08:29:00-05:00 +2024-04-13 18:18:32,529: root: INFO: Current backtesting datetime 2020-08-29 08:29:00-05:00 +2024-04-13 18:18:32,529: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:32,529: root: INFO: Current backtesting datetime 2020-08-31 07:30:00-05:00 +2024-04-13 18:18:32,530: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:32,531: root: INFO: Current backtesting datetime 2020-08-31 08:30:00-05:00 +2024-04-13 18:18:32,531: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:32,532: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:32 +2024-04-13 18:18:32,532: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:32,533: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:32,533: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:32,534: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:32,534: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:33,153: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:33,154: root: INFO: Current backtesting datetime 2020-08-31 15:00:00-05:00 +2024-04-13 18:18:33,154: root: INFO: Current backtesting datetime 2020-09-01 08:30:00-05:00 +2024-04-13 18:18:33,155: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:33 +2024-04-13 18:18:33,155: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:33,155: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:33,156: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:33,156: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:33,156: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:33,985: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:33,987: root: INFO: Current backtesting datetime 2020-09-01 15:00:00-05:00 +2024-04-13 18:18:33,987: root: INFO: Current backtesting datetime 2020-09-02 08:30:00-05:00 +2024-04-13 18:18:33,987: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:33 +2024-04-13 18:18:33,987: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:33,988: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:33,988: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:33,988: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:33,988: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:34,767: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:34,768: root: INFO: Current backtesting datetime 2020-09-02 15:00:00-05:00 +2024-04-13 18:18:34,768: root: INFO: Current backtesting datetime 2020-09-03 08:30:00-05:00 +2024-04-13 18:18:34,768: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:34 +2024-04-13 18:18:34,768: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:34,770: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:34,770: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:34,770: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:34,770: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:35,602: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:35,603: root: INFO: Current backtesting datetime 2020-09-03 15:00:00-05:00 +2024-04-13 18:18:35,603: root: INFO: Current backtesting datetime 2020-09-04 08:30:00-05:00 +2024-04-13 18:18:35,603: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:35 +2024-04-13 18:18:35,604: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:35,604: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:35,605: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:35,605: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:35,605: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:36,520: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:36,521: root: INFO: Current backtesting datetime 2020-09-04 15:00:00-05:00 +2024-04-13 18:18:36,521: root: INFO: Current backtesting datetime 2020-09-05 08:30:00-05:00 +2024-04-13 18:18:36,522: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:36,523: root: INFO: Current backtesting datetime 2020-09-05 08:29:00-05:00 +2024-04-13 18:18:36,524: root: INFO: Current backtesting datetime 2020-09-05 08:29:00-05:00 +2024-04-13 18:18:36,525: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:36,526: root: INFO: Current backtesting datetime 2020-09-08 07:30:00-05:00 +2024-04-13 18:18:36,526: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:36,527: root: INFO: Current backtesting datetime 2020-09-08 08:30:00-05:00 +2024-04-13 18:18:36,527: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:36,528: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:36 +2024-04-13 18:18:36,528: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:36,529: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:36,529: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:36,530: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:36,530: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:38,758: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:38,759: root: INFO: Current backtesting datetime 2020-09-08 15:00:00-05:00 +2024-04-13 18:18:38,760: root: INFO: Current backtesting datetime 2020-09-09 08:30:00-05:00 +2024-04-13 18:18:38,760: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:38 +2024-04-13 18:18:38,760: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:38,761: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:38,761: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:38,762: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:38,762: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:39,933: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:39,934: root: INFO: Current backtesting datetime 2020-09-09 15:00:00-05:00 +2024-04-13 18:18:39,934: root: INFO: Current backtesting datetime 2020-09-10 08:30:00-05:00 +2024-04-13 18:18:39,934: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:39 +2024-04-13 18:18:39,935: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:39,935: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:39,936: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:39,936: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:39,936: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:41,329: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:41,330: root: INFO: Current backtesting datetime 2020-09-10 15:00:00-05:00 +2024-04-13 18:18:41,331: root: INFO: Current backtesting datetime 2020-09-11 08:30:00-05:00 +2024-04-13 18:18:41,331: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:41 +2024-04-13 18:18:41,331: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:41,332: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:41,332: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:41,333: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:41,333: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:43,695: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:43,697: root: INFO: Current backtesting datetime 2020-09-11 15:00:00-05:00 +2024-04-13 18:18:43,697: root: INFO: Current backtesting datetime 2020-09-12 08:30:00-05:00 +2024-04-13 18:18:43,697: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:43,698: root: INFO: Current backtesting datetime 2020-09-12 08:29:00-05:00 +2024-04-13 18:18:43,700: root: INFO: Current backtesting datetime 2020-09-12 08:29:00-05:00 +2024-04-13 18:18:43,700: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:43,700: root: INFO: Current backtesting datetime 2020-09-14 07:30:00-05:00 +2024-04-13 18:18:43,701: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:43,702: root: INFO: Current backtesting datetime 2020-09-14 08:30:00-05:00 +2024-04-13 18:18:43,702: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:43,703: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:43 +2024-04-13 18:18:43,703: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:43,704: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:43,704: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:43,704: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:43,704: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:44,906: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:44,907: root: INFO: Current backtesting datetime 2020-09-14 15:00:00-05:00 +2024-04-13 18:18:44,907: root: INFO: Current backtesting datetime 2020-09-15 08:30:00-05:00 +2024-04-13 18:18:44,908: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:44 +2024-04-13 18:18:44,908: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:44,909: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:44,909: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:44,910: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:44,910: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:46,505: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:46,505: root: INFO: Current backtesting datetime 2020-09-15 15:00:00-05:00 +2024-04-13 18:18:46,506: root: INFO: Current backtesting datetime 2020-09-16 08:30:00-05:00 +2024-04-13 18:18:46,506: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:46 +2024-04-13 18:18:46,506: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:46,507: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:46,507: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:46,508: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:46,508: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:47,105: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:47,107: root: INFO: Current backtesting datetime 2020-09-16 15:00:00-05:00 +2024-04-13 18:18:47,107: root: INFO: Current backtesting datetime 2020-09-17 08:30:00-05:00 +2024-04-13 18:18:47,108: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:47 +2024-04-13 18:18:47,108: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:47,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:47,109: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:47,109: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:47,109: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:48,168: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:48,169: root: INFO: Current backtesting datetime 2020-09-17 15:00:00-05:00 +2024-04-13 18:18:48,169: root: INFO: Current backtesting datetime 2020-09-18 08:30:00-05:00 +2024-04-13 18:18:48,169: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:48 +2024-04-13 18:18:48,169: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:48,170: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:48,170: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:48,171: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:48,171: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:49,064: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:49,066: root: INFO: Current backtesting datetime 2020-09-18 15:00:00-05:00 +2024-04-13 18:18:49,066: root: INFO: Current backtesting datetime 2020-09-19 08:30:00-05:00 +2024-04-13 18:18:49,066: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:49,068: root: INFO: Current backtesting datetime 2020-09-19 08:29:00-05:00 +2024-04-13 18:18:49,069: root: INFO: Current backtesting datetime 2020-09-19 08:29:00-05:00 +2024-04-13 18:18:49,069: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:49,070: root: INFO: Current backtesting datetime 2020-09-21 07:30:00-05:00 +2024-04-13 18:18:49,070: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:49,072: root: INFO: Current backtesting datetime 2020-09-21 08:30:00-05:00 +2024-04-13 18:18:49,072: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:49,073: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:49 +2024-04-13 18:18:49,073: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:49,073: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:49,074: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:49,074: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:49,074: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:50,140: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:50,142: root: INFO: Current backtesting datetime 2020-09-21 15:00:00-05:00 +2024-04-13 18:18:50,142: root: INFO: Current backtesting datetime 2020-09-22 08:30:00-05:00 +2024-04-13 18:18:50,142: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:50 +2024-04-13 18:18:50,142: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:50,143: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:50,143: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:50,144: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:50,144: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:51,183: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:51,184: root: INFO: Current backtesting datetime 2020-09-22 15:00:00-05:00 +2024-04-13 18:18:51,184: root: INFO: Current backtesting datetime 2020-09-23 08:30:00-05:00 +2024-04-13 18:18:51,185: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:51 +2024-04-13 18:18:51,185: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:51,186: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:51,186: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:51,186: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:51,186: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:52,087: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:52,088: root: INFO: Current backtesting datetime 2020-09-23 15:00:00-05:00 +2024-04-13 18:18:52,088: root: INFO: Current backtesting datetime 2020-09-24 08:30:00-05:00 +2024-04-13 18:18:52,088: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:52 +2024-04-13 18:18:52,088: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:52,089: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:52,089: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:52,090: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:52,090: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:53,081: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:53,081: root: INFO: Current backtesting datetime 2020-09-24 15:00:00-05:00 +2024-04-13 18:18:53,082: root: INFO: Current backtesting datetime 2020-09-25 08:30:00-05:00 +2024-04-13 18:18:53,082: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:53 +2024-04-13 18:18:53,082: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:53,083: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:53,083: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:53,084: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:53,084: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:54,497: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:54,498: root: INFO: Current backtesting datetime 2020-09-25 15:00:00-05:00 +2024-04-13 18:18:54,498: root: INFO: Current backtesting datetime 2020-09-26 08:30:00-05:00 +2024-04-13 18:18:54,498: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:54,500: root: INFO: Current backtesting datetime 2020-09-26 08:29:00-05:00 +2024-04-13 18:18:54,501: root: INFO: Current backtesting datetime 2020-09-26 08:29:00-05:00 +2024-04-13 18:18:54,501: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:54,502: root: INFO: Current backtesting datetime 2020-09-28 07:30:00-05:00 +2024-04-13 18:18:54,502: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:54,503: root: INFO: Current backtesting datetime 2020-09-28 08:30:00-05:00 +2024-04-13 18:18:54,503: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:54,504: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:54 +2024-04-13 18:18:54,504: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:54,505: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:54,505: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:54,505: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:54,506: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:55,181: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:55,182: root: INFO: Current backtesting datetime 2020-09-28 15:00:00-05:00 +2024-04-13 18:18:55,184: root: INFO: Current backtesting datetime 2020-09-29 08:30:00-05:00 +2024-04-13 18:18:55,184: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:55 +2024-04-13 18:18:55,184: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:55,185: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:55,185: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:55,186: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:55,186: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:56,153: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:56,154: root: INFO: Current backtesting datetime 2020-09-29 15:00:00-05:00 +2024-04-13 18:18:56,155: root: INFO: Current backtesting datetime 2020-09-30 08:30:00-05:00 +2024-04-13 18:18:56,155: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:56 +2024-04-13 18:18:56,155: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:56,156: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:56,156: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:56,157: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:56,157: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:57,557: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:57,558: root: INFO: Current backtesting datetime 2020-09-30 15:00:00-05:00 +2024-04-13 18:18:57,559: root: INFO: Current backtesting datetime 2020-10-01 08:30:00-05:00 +2024-04-13 18:18:57,559: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:57 +2024-04-13 18:18:57,559: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:57,560: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:57,560: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:57,561: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:57,561: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:58,493: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:58,494: root: INFO: Current backtesting datetime 2020-10-01 15:00:00-05:00 +2024-04-13 18:18:58,494: root: INFO: Current backtesting datetime 2020-10-02 08:30:00-05:00 +2024-04-13 18:18:58,494: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:58 +2024-04-13 18:18:58,494: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:58,495: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:58,495: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:58,496: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:58,496: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:18:59,586: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:18:59,587: root: INFO: Current backtesting datetime 2020-10-02 15:00:00-05:00 +2024-04-13 18:18:59,587: root: INFO: Current backtesting datetime 2020-10-03 08:30:00-05:00 +2024-04-13 18:18:59,588: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:18:59,589: root: INFO: Current backtesting datetime 2020-10-03 08:29:00-05:00 +2024-04-13 18:18:59,590: root: INFO: Current backtesting datetime 2020-10-03 08:29:00-05:00 +2024-04-13 18:18:59,590: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:18:59,591: root: INFO: Current backtesting datetime 2020-10-05 07:30:00-05:00 +2024-04-13 18:18:59,591: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:18:59,592: root: INFO: Current backtesting datetime 2020-10-05 08:30:00-05:00 +2024-04-13 18:18:59,592: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:18:59,593: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:18:59 +2024-04-13 18:18:59,593: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:59,594: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:18:59,594: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:18:59,595: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:18:59,595: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:00,602: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:00,603: root: INFO: Current backtesting datetime 2020-10-05 15:00:00-05:00 +2024-04-13 18:19:00,603: root: INFO: Current backtesting datetime 2020-10-06 08:30:00-05:00 +2024-04-13 18:19:00,603: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:00 +2024-04-13 18:19:00,603: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:00,604: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:00,604: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:00,605: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:00,605: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:01,470: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:01,472: root: INFO: Current backtesting datetime 2020-10-06 15:00:00-05:00 +2024-04-13 18:19:01,472: root: INFO: Current backtesting datetime 2020-10-07 08:30:00-05:00 +2024-04-13 18:19:01,472: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:01 +2024-04-13 18:19:01,472: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:01,473: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:01,473: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:01,474: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:01,474: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:02,488: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:02,489: root: INFO: Current backtesting datetime 2020-10-07 15:00:00-05:00 +2024-04-13 18:19:02,490: root: INFO: Current backtesting datetime 2020-10-08 08:30:00-05:00 +2024-04-13 18:19:02,490: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:02 +2024-04-13 18:19:02,490: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:02,491: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:02,491: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:02,492: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:02,492: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:03,343: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:03,344: root: INFO: Current backtesting datetime 2020-10-08 15:00:00-05:00 +2024-04-13 18:19:03,344: root: INFO: Current backtesting datetime 2020-10-09 08:30:00-05:00 +2024-04-13 18:19:03,344: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:03 +2024-04-13 18:19:03,344: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:03,345: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:03,345: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:03,346: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:03,346: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:04,475: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:04,476: root: INFO: Current backtesting datetime 2020-10-09 15:00:00-05:00 +2024-04-13 18:19:04,476: root: INFO: Current backtesting datetime 2020-10-10 08:30:00-05:00 +2024-04-13 18:19:04,477: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:19:04,478: root: INFO: Current backtesting datetime 2020-10-10 08:29:00-05:00 +2024-04-13 18:19:04,480: root: INFO: Current backtesting datetime 2020-10-10 08:29:00-05:00 +2024-04-13 18:19:04,480: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:19:04,481: root: INFO: Current backtesting datetime 2020-10-12 07:30:00-05:00 +2024-04-13 18:19:04,481: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:19:04,482: root: INFO: Current backtesting datetime 2020-10-12 08:30:00-05:00 +2024-04-13 18:19:04,482: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:19:04,483: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:04 +2024-04-13 18:19:04,483: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:04,484: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:04,484: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:04,485: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:04,485: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:05,307: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:05,308: root: INFO: Current backtesting datetime 2020-10-12 15:00:00-05:00 +2024-04-13 18:19:05,308: root: INFO: Current backtesting datetime 2020-10-13 08:30:00-05:00 +2024-04-13 18:19:05,309: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:05 +2024-04-13 18:19:05,309: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:05,310: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:05,310: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:05,310: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:05,310: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:06,346: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:06,347: root: INFO: Current backtesting datetime 2020-10-13 15:00:00-05:00 +2024-04-13 18:19:06,348: root: INFO: Current backtesting datetime 2020-10-14 08:30:00-05:00 +2024-04-13 18:19:06,348: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:06 +2024-04-13 18:19:06,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:06,349: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:06,349: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:06,350: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:06,350: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:07,173: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:07,174: root: INFO: Current backtesting datetime 2020-10-14 15:00:00-05:00 +2024-04-13 18:19:07,174: root: INFO: Current backtesting datetime 2020-10-15 08:30:00-05:00 +2024-04-13 18:19:07,175: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:07 +2024-04-13 18:19:07,175: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:07,175: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:07,176: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:07,176: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:07,176: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:08,056: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:08,057: root: INFO: Current backtesting datetime 2020-10-15 15:00:00-05:00 +2024-04-13 18:19:08,058: root: INFO: Current backtesting datetime 2020-10-16 08:30:00-05:00 +2024-04-13 18:19:08,058: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:08 +2024-04-13 18:19:08,058: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:08,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:08,059: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:08,060: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:08,060: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:08,913: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:08,914: root: INFO: Current backtesting datetime 2020-10-16 15:00:00-05:00 +2024-04-13 18:19:08,914: root: INFO: Current backtesting datetime 2020-10-17 08:30:00-05:00 +2024-04-13 18:19:08,914: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:19:08,916: root: INFO: Current backtesting datetime 2020-10-17 08:29:00-05:00 +2024-04-13 18:19:08,917: root: INFO: Current backtesting datetime 2020-10-17 08:29:00-05:00 +2024-04-13 18:19:08,917: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:19:08,919: root: INFO: Current backtesting datetime 2020-10-19 07:30:00-05:00 +2024-04-13 18:19:08,919: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:19:08,920: root: INFO: Current backtesting datetime 2020-10-19 08:30:00-05:00 +2024-04-13 18:19:08,920: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:19:08,921: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:08 +2024-04-13 18:19:08,921: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:08,922: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:08,922: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:08,923: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:08,923: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:09,484: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:09,485: root: INFO: Current backtesting datetime 2020-10-19 15:00:00-05:00 +2024-04-13 18:19:09,485: root: INFO: Current backtesting datetime 2020-10-20 08:30:00-05:00 +2024-04-13 18:19:09,486: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:09 +2024-04-13 18:19:09,486: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:09,487: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:09,487: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:09,487: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:09,487: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:10,011: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:10,012: root: INFO: Current backtesting datetime 2020-10-20 15:00:00-05:00 +2024-04-13 18:19:10,012: root: INFO: Current backtesting datetime 2020-10-21 08:30:00-05:00 +2024-04-13 18:19:10,012: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:10 +2024-04-13 18:19:10,013: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:10,014: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:10,014: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:10,014: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:10,014: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:11,539: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:11,540: root: INFO: Current backtesting datetime 2020-10-21 15:00:00-05:00 +2024-04-13 18:19:11,541: root: INFO: Current backtesting datetime 2020-10-22 08:30:00-05:00 +2024-04-13 18:19:11,541: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:11 +2024-04-13 18:19:11,541: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:11,542: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:11,542: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:11,543: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:11,543: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:13,973: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:13,974: root: INFO: Current backtesting datetime 2020-10-22 15:00:00-05:00 +2024-04-13 18:19:13,974: root: INFO: Current backtesting datetime 2020-10-23 08:30:00-05:00 +2024-04-13 18:19:13,974: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:13 +2024-04-13 18:19:13,975: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:13,975: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:13,976: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:13,976: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:13,976: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:16,007: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:16,008: root: INFO: Current backtesting datetime 2020-10-23 15:00:00-05:00 +2024-04-13 18:19:16,008: root: INFO: Current backtesting datetime 2020-10-24 08:30:00-05:00 +2024-04-13 18:19:16,009: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:19:16,010: root: INFO: Current backtesting datetime 2020-10-24 08:29:00-05:00 +2024-04-13 18:19:16,011: root: INFO: Current backtesting datetime 2020-10-24 08:29:00-05:00 +2024-04-13 18:19:16,011: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:19:16,012: root: INFO: Current backtesting datetime 2020-10-26 07:30:00-05:00 +2024-04-13 18:19:16,013: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:19:16,013: root: INFO: Current backtesting datetime 2020-10-26 08:30:00-05:00 +2024-04-13 18:19:16,013: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:19:16,014: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:16 +2024-04-13 18:19:16,015: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:16,015: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:16,016: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:16,016: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:16,016: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:19,357: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:19,358: root: INFO: Current backtesting datetime 2020-10-26 15:00:00-05:00 +2024-04-13 18:19:19,358: root: INFO: Current backtesting datetime 2020-10-27 08:30:00-05:00 +2024-04-13 18:19:19,358: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:19 +2024-04-13 18:19:19,359: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:19,359: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:19,359: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:19,360: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:19,360: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:20,998: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:21,000: root: INFO: Current backtesting datetime 2020-10-27 15:00:00-05:00 +2024-04-13 18:19:21,000: root: INFO: Current backtesting datetime 2020-10-28 08:30:00-05:00 +2024-04-13 18:19:21,000: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:21 +2024-04-13 18:19:21,000: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:21,001: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:21,001: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:21,002: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:21,002: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:22,379: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:22,380: root: INFO: Current backtesting datetime 2020-10-28 15:00:00-05:00 +2024-04-13 18:19:22,380: root: INFO: Current backtesting datetime 2020-10-29 08:30:00-05:00 +2024-04-13 18:19:22,381: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:22 +2024-04-13 18:19:22,381: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:22,382: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:22,382: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:22,382: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:22,382: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:23,279: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:23,280: root: INFO: Current backtesting datetime 2020-10-29 15:00:00-05:00 +2024-04-13 18:19:23,281: root: INFO: Current backtesting datetime 2020-10-30 08:30:00-05:00 +2024-04-13 18:19:23,281: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:23 +2024-04-13 18:19:23,281: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:23,282: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:23,282: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:23,283: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:23,283: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:24,480: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:24,481: root: INFO: Current backtesting datetime 2020-10-30 15:00:00-05:00 +2024-04-13 18:19:24,482: root: INFO: Current backtesting datetime 2020-10-31 08:30:00-05:00 +2024-04-13 18:19:24,482: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:19:24,483: root: INFO: Current backtesting datetime 2020-10-31 08:29:00-05:00 +2024-04-13 18:19:24,485: root: INFO: Current backtesting datetime 2020-10-31 08:29:00-05:00 +2024-04-13 18:19:24,485: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:19:24,486: root: INFO: Current backtesting datetime 2020-11-02 08:30:00-05:00 +2024-04-13 18:19:24,486: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:19:24,487: root: INFO: Current backtesting datetime 2020-11-02 09:30:00-05:00 +2024-04-13 18:19:24,487: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:19:24,488: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:24 +2024-04-13 18:19:24,488: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:24,489: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:24,489: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:24,489: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:24,490: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:25,777: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:25,778: root: INFO: Current backtesting datetime 2020-11-02 16:00:00-05:00 +2024-04-13 18:19:25,778: root: INFO: Current backtesting datetime 2020-11-03 09:30:00-05:00 +2024-04-13 18:19:25,779: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:25 +2024-04-13 18:19:25,779: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:25,780: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:25,780: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:25,780: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:25,780: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:27,152: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:27,154: root: INFO: Current backtesting datetime 2020-11-03 16:00:00-05:00 +2024-04-13 18:19:27,154: root: INFO: Current backtesting datetime 2020-11-04 09:30:00-05:00 +2024-04-13 18:19:27,154: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:27 +2024-04-13 18:19:27,154: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:27,155: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:27,155: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:27,156: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:27,156: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:28,595: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:28,596: root: INFO: Current backtesting datetime 2020-11-04 16:00:00-05:00 +2024-04-13 18:19:28,596: root: INFO: Current backtesting datetime 2020-11-05 09:30:00-05:00 +2024-04-13 18:19:28,597: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:28 +2024-04-13 18:19:28,597: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:28,598: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:28,598: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:28,599: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:28,599: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:29,995: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:29,996: root: INFO: Current backtesting datetime 2020-11-05 16:00:00-05:00 +2024-04-13 18:19:29,996: root: INFO: Current backtesting datetime 2020-11-06 09:30:00-05:00 +2024-04-13 18:19:29,997: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:29 +2024-04-13 18:19:29,997: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:29,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:29,998: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:29,998: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:29,998: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:31,587: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:31,588: root: INFO: Current backtesting datetime 2020-11-06 16:00:00-05:00 +2024-04-13 18:19:31,589: root: INFO: Current backtesting datetime 2020-11-07 09:30:00-05:00 +2024-04-13 18:19:31,589: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:19:31,590: root: INFO: Current backtesting datetime 2020-11-07 09:29:00-05:00 +2024-04-13 18:19:31,591: root: INFO: Current backtesting datetime 2020-11-07 09:29:00-05:00 +2024-04-13 18:19:31,591: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:19:31,592: root: INFO: Current backtesting datetime 2020-11-09 08:30:00-05:00 +2024-04-13 18:19:31,593: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:19:31,594: root: INFO: Current backtesting datetime 2020-11-09 09:30:00-05:00 +2024-04-13 18:19:31,594: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:19:31,595: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:31 +2024-04-13 18:19:31,595: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:31,595: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:31,596: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:31,596: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:31,596: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:33,644: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:33,645: root: INFO: Current backtesting datetime 2020-11-09 16:00:00-05:00 +2024-04-13 18:19:33,645: root: INFO: Current backtesting datetime 2020-11-10 09:30:00-05:00 +2024-04-13 18:19:33,646: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:33 +2024-04-13 18:19:33,646: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:33,647: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:33,647: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:33,648: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:33,648: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:34,655: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:34,656: root: INFO: Current backtesting datetime 2020-11-10 16:00:00-05:00 +2024-04-13 18:19:34,656: root: INFO: Current backtesting datetime 2020-11-11 09:30:00-05:00 +2024-04-13 18:19:34,657: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:34 +2024-04-13 18:19:34,657: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:34,658: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:34,658: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:34,658: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:34,658: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:35,874: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:35,876: root: INFO: Current backtesting datetime 2020-11-11 16:00:00-05:00 +2024-04-13 18:19:35,876: root: INFO: Current backtesting datetime 2020-11-12 09:30:00-05:00 +2024-04-13 18:19:35,876: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:35 +2024-04-13 18:19:35,876: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:35,877: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:35,877: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:35,878: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:35,878: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:37,696: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:37,697: root: INFO: Current backtesting datetime 2020-11-12 16:00:00-05:00 +2024-04-13 18:19:37,698: root: INFO: Current backtesting datetime 2020-11-13 09:30:00-05:00 +2024-04-13 18:19:37,698: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:37 +2024-04-13 18:19:37,698: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:37,699: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:37,699: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:37,700: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:37,700: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:38,768: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:38,769: root: INFO: Current backtesting datetime 2020-11-13 16:00:00-05:00 +2024-04-13 18:19:38,769: root: INFO: Current backtesting datetime 2020-11-14 09:30:00-05:00 +2024-04-13 18:19:38,769: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:19:38,771: root: INFO: Current backtesting datetime 2020-11-14 09:29:00-05:00 +2024-04-13 18:19:38,772: root: INFO: Current backtesting datetime 2020-11-14 09:29:00-05:00 +2024-04-13 18:19:38,772: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:19:38,773: root: INFO: Current backtesting datetime 2020-11-16 08:30:00-05:00 +2024-04-13 18:19:38,773: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:19:38,774: root: INFO: Current backtesting datetime 2020-11-16 09:30:00-05:00 +2024-04-13 18:19:38,774: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:19:38,775: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:38 +2024-04-13 18:19:38,775: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:38,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:38,776: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:38,777: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:38,777: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:39,656: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:39,657: root: INFO: Current backtesting datetime 2020-11-16 16:00:00-05:00 +2024-04-13 18:19:39,657: root: INFO: Current backtesting datetime 2020-11-17 09:30:00-05:00 +2024-04-13 18:19:39,658: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:39 +2024-04-13 18:19:39,658: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:39,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:39,659: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:39,659: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:39,660: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:40,865: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:40,866: root: INFO: Current backtesting datetime 2020-11-17 16:00:00-05:00 +2024-04-13 18:19:40,867: root: INFO: Current backtesting datetime 2020-11-18 09:30:00-05:00 +2024-04-13 18:19:40,868: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:40 +2024-04-13 18:19:40,868: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:40,869: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:40,869: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:40,870: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:40,870: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:41,847: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:41,848: root: INFO: Current backtesting datetime 2020-11-18 16:00:00-05:00 +2024-04-13 18:19:41,848: root: INFO: Current backtesting datetime 2020-11-19 09:30:00-05:00 +2024-04-13 18:19:41,849: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:41 +2024-04-13 18:19:41,849: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:41,850: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:41,850: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:41,851: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:41,851: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:43,169: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:43,170: root: INFO: Current backtesting datetime 2020-11-19 16:00:00-05:00 +2024-04-13 18:19:43,170: root: INFO: Current backtesting datetime 2020-11-20 09:30:00-05:00 +2024-04-13 18:19:43,171: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:43 +2024-04-13 18:19:43,171: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:43,172: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:43,172: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:43,173: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:43,173: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:44,202: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:44,203: root: INFO: Current backtesting datetime 2020-11-20 16:00:00-05:00 +2024-04-13 18:19:44,204: root: INFO: Current backtesting datetime 2020-11-21 09:30:00-05:00 +2024-04-13 18:19:44,204: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:19:44,206: root: INFO: Current backtesting datetime 2020-11-21 09:29:00-05:00 +2024-04-13 18:19:44,207: root: INFO: Current backtesting datetime 2020-11-21 09:29:00-05:00 +2024-04-13 18:19:44,207: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:19:44,208: root: INFO: Current backtesting datetime 2020-11-23 08:30:00-05:00 +2024-04-13 18:19:44,209: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:19:44,209: root: INFO: Current backtesting datetime 2020-11-23 09:30:00-05:00 +2024-04-13 18:19:44,210: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:19:44,211: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:44 +2024-04-13 18:19:44,211: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:44,211: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:44,212: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:44,212: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:44,212: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:46,010: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:46,011: root: INFO: Current backtesting datetime 2020-11-23 16:00:00-05:00 +2024-04-13 18:19:46,011: root: INFO: Current backtesting datetime 2020-11-24 09:30:00-05:00 +2024-04-13 18:19:46,012: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:46 +2024-04-13 18:19:46,012: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:46,013: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:46,013: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:46,014: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:46,014: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:47,190: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:47,191: root: INFO: Current backtesting datetime 2020-11-24 16:00:00-05:00 +2024-04-13 18:19:47,191: root: INFO: Current backtesting datetime 2020-11-25 09:30:00-05:00 +2024-04-13 18:19:47,191: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:47 +2024-04-13 18:19:47,192: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:47,192: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:47,193: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:47,193: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:47,193: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:48,285: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:48,286: root: INFO: Current backtesting datetime 2020-11-25 16:00:00-05:00 +2024-04-13 18:19:48,286: root: INFO: Current backtesting datetime 2020-11-26 09:30:00-05:00 +2024-04-13 18:19:48,286: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:19:48,288: root: INFO: Current backtesting datetime 2020-11-26 09:29:00-05:00 +2024-04-13 18:19:48,289: root: INFO: Current backtesting datetime 2020-11-26 09:29:00-05:00 +2024-04-13 18:19:48,289: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:19:48,290: root: INFO: Current backtesting datetime 2020-11-27 08:30:00-05:00 +2024-04-13 18:19:48,290: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:19:48,291: root: INFO: Current backtesting datetime 2020-11-27 09:30:00-05:00 +2024-04-13 18:19:48,291: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:19:48,292: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:48 +2024-04-13 18:19:48,292: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:48,293: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:48,293: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:48,293: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:48,293: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:49,272: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:49,273: root: INFO: Current backtesting datetime 2020-11-27 13:00:00-05:00 +2024-04-13 18:19:49,274: root: INFO: Current backtesting datetime 2020-11-28 09:30:00-05:00 +2024-04-13 18:19:49,274: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:19:49,275: root: INFO: Current backtesting datetime 2020-11-28 09:29:00-05:00 +2024-04-13 18:19:49,277: root: INFO: Current backtesting datetime 2020-11-28 09:29:00-05:00 +2024-04-13 18:19:49,277: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:19:49,278: root: INFO: Current backtesting datetime 2020-11-30 08:30:00-05:00 +2024-04-13 18:19:49,278: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:19:49,279: root: INFO: Current backtesting datetime 2020-11-30 09:30:00-05:00 +2024-04-13 18:19:49,279: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:19:49,280: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:49 +2024-04-13 18:19:49,280: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:49,281: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:49,281: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:49,282: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:49,282: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:51,371: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:51,372: root: INFO: Current backtesting datetime 2020-11-30 16:00:00-05:00 +2024-04-13 18:19:51,372: root: INFO: Current backtesting datetime 2020-12-01 09:30:00-05:00 +2024-04-13 18:19:51,372: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:51 +2024-04-13 18:19:51,373: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:51,373: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:51,374: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:51,374: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:51,374: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:53,577: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:53,578: root: INFO: Current backtesting datetime 2020-12-01 16:00:00-05:00 +2024-04-13 18:19:53,578: root: INFO: Current backtesting datetime 2020-12-02 09:30:00-05:00 +2024-04-13 18:19:53,578: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:53 +2024-04-13 18:19:53,579: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:53,579: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:53,580: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:53,580: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:53,580: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:55,103: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:55,104: root: INFO: Current backtesting datetime 2020-12-02 16:00:00-05:00 +2024-04-13 18:19:55,105: root: INFO: Current backtesting datetime 2020-12-03 09:30:00-05:00 +2024-04-13 18:19:55,105: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:55 +2024-04-13 18:19:55,105: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:55,106: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:55,106: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:55,107: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:55,107: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:56,596: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:56,597: root: INFO: Current backtesting datetime 2020-12-03 16:00:00-05:00 +2024-04-13 18:19:56,597: root: INFO: Current backtesting datetime 2020-12-04 09:30:00-05:00 +2024-04-13 18:19:56,598: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:56 +2024-04-13 18:19:56,598: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:56,598: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:56,599: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:56,599: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:56,599: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:19:58,068: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:19:58,069: root: INFO: Current backtesting datetime 2020-12-04 16:00:00-05:00 +2024-04-13 18:19:58,069: root: INFO: Current backtesting datetime 2020-12-05 09:30:00-05:00 +2024-04-13 18:19:58,069: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:19:58,071: root: INFO: Current backtesting datetime 2020-12-05 09:29:00-05:00 +2024-04-13 18:19:58,072: root: INFO: Current backtesting datetime 2020-12-05 09:29:00-05:00 +2024-04-13 18:19:58,072: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:19:58,073: root: INFO: Current backtesting datetime 2020-12-07 08:30:00-05:00 +2024-04-13 18:19:58,073: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:19:58,074: root: INFO: Current backtesting datetime 2020-12-07 09:30:00-05:00 +2024-04-13 18:19:58,074: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:19:58,075: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:19:58 +2024-04-13 18:19:58,075: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:58,076: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:19:58,076: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:19:58,077: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:19:58,077: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:00,689: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:00,690: root: INFO: Current backtesting datetime 2020-12-07 16:00:00-05:00 +2024-04-13 18:20:00,691: root: INFO: Current backtesting datetime 2020-12-08 09:30:00-05:00 +2024-04-13 18:20:00,691: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:00 +2024-04-13 18:20:00,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:00,692: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:00,692: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:00,693: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:00,693: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:02,162: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:02,163: root: INFO: Current backtesting datetime 2020-12-08 16:00:00-05:00 +2024-04-13 18:20:02,164: root: INFO: Current backtesting datetime 2020-12-09 09:30:00-05:00 +2024-04-13 18:20:02,164: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:02 +2024-04-13 18:20:02,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:02,165: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:02,165: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:02,166: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:02,166: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:05,311: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:05,313: root: INFO: Current backtesting datetime 2020-12-09 16:00:00-05:00 +2024-04-13 18:20:05,313: root: INFO: Current backtesting datetime 2020-12-10 09:30:00-05:00 +2024-04-13 18:20:05,313: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:05 +2024-04-13 18:20:05,313: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:05,314: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:05,314: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:05,315: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:05,315: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:06,559: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:06,560: root: INFO: Current backtesting datetime 2020-12-10 16:00:00-05:00 +2024-04-13 18:20:06,560: root: INFO: Current backtesting datetime 2020-12-11 09:30:00-05:00 +2024-04-13 18:20:06,561: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:06 +2024-04-13 18:20:06,561: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:06,562: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:06,562: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:06,563: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:06,563: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:07,946: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:07,947: root: INFO: Current backtesting datetime 2020-12-11 16:00:00-05:00 +2024-04-13 18:20:07,947: root: INFO: Current backtesting datetime 2020-12-12 09:30:00-05:00 +2024-04-13 18:20:07,947: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:07,949: root: INFO: Current backtesting datetime 2020-12-12 09:29:00-05:00 +2024-04-13 18:20:07,950: root: INFO: Current backtesting datetime 2020-12-12 09:29:00-05:00 +2024-04-13 18:20:07,951: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:07,951: root: INFO: Current backtesting datetime 2020-12-14 08:30:00-05:00 +2024-04-13 18:20:07,952: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:07,953: root: INFO: Current backtesting datetime 2020-12-14 09:30:00-05:00 +2024-04-13 18:20:07,953: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:07,954: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:07 +2024-04-13 18:20:07,954: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:07,955: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:07,955: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:07,955: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:07,956: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:09,538: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:09,539: root: INFO: Current backtesting datetime 2020-12-14 16:00:00-05:00 +2024-04-13 18:20:09,539: root: INFO: Current backtesting datetime 2020-12-15 09:30:00-05:00 +2024-04-13 18:20:09,540: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:09 +2024-04-13 18:20:09,540: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:09,540: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:09,541: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:09,541: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:09,541: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:10,592: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:10,593: root: INFO: Current backtesting datetime 2020-12-15 16:00:00-05:00 +2024-04-13 18:20:10,593: root: INFO: Current backtesting datetime 2020-12-16 09:30:00-05:00 +2024-04-13 18:20:10,593: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:10 +2024-04-13 18:20:10,593: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:10,594: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:10,594: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:10,595: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:10,595: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:11,890: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:11,891: root: INFO: Current backtesting datetime 2020-12-16 16:00:00-05:00 +2024-04-13 18:20:11,891: root: INFO: Current backtesting datetime 2020-12-17 09:30:00-05:00 +2024-04-13 18:20:11,892: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:11 +2024-04-13 18:20:11,892: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:11,893: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:11,893: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:11,893: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:11,893: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:12,964: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:12,965: root: INFO: Current backtesting datetime 2020-12-17 16:00:00-05:00 +2024-04-13 18:20:12,965: root: INFO: Current backtesting datetime 2020-12-18 09:30:00-05:00 +2024-04-13 18:20:12,966: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:12 +2024-04-13 18:20:12,966: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:12,967: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:12,967: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:12,967: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:12,967: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:14,304: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:14,305: root: INFO: Current backtesting datetime 2020-12-18 16:00:00-05:00 +2024-04-13 18:20:14,306: root: INFO: Current backtesting datetime 2020-12-19 09:30:00-05:00 +2024-04-13 18:20:14,306: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:14,307: root: INFO: Current backtesting datetime 2020-12-19 09:29:00-05:00 +2024-04-13 18:20:14,309: root: INFO: Current backtesting datetime 2020-12-19 09:29:00-05:00 +2024-04-13 18:20:14,309: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:14,310: root: INFO: Current backtesting datetime 2020-12-21 08:30:00-05:00 +2024-04-13 18:20:14,310: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:14,311: root: INFO: Current backtesting datetime 2020-12-21 09:30:00-05:00 +2024-04-13 18:20:14,311: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:14,312: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:14 +2024-04-13 18:20:14,312: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:14,313: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:14,313: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:14,314: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:14,314: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:15,530: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:15,531: root: INFO: Current backtesting datetime 2020-12-21 16:00:00-05:00 +2024-04-13 18:20:15,531: root: INFO: Current backtesting datetime 2020-12-22 09:30:00-05:00 +2024-04-13 18:20:15,532: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:15 +2024-04-13 18:20:15,532: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:15,533: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:15,533: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:15,533: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:15,533: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:17,025: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:17,026: root: INFO: Current backtesting datetime 2020-12-22 16:00:00-05:00 +2024-04-13 18:20:17,026: root: INFO: Current backtesting datetime 2020-12-23 09:30:00-05:00 +2024-04-13 18:20:17,027: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:17 +2024-04-13 18:20:17,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:17,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:17,028: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:17,028: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:17,028: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:17,791: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:17,792: root: INFO: Current backtesting datetime 2020-12-23 16:00:00-05:00 +2024-04-13 18:20:17,792: root: INFO: Current backtesting datetime 2020-12-24 09:30:00-05:00 +2024-04-13 18:20:17,793: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:17 +2024-04-13 18:20:17,793: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:17,793: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:17,794: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:17,794: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:17,794: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:18,688: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:18,689: root: INFO: Current backtesting datetime 2020-12-24 13:00:00-05:00 +2024-04-13 18:20:18,689: root: INFO: Current backtesting datetime 2020-12-25 09:30:00-05:00 +2024-04-13 18:20:18,690: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:18,691: root: INFO: Current backtesting datetime 2020-12-25 09:29:00-05:00 +2024-04-13 18:20:18,692: root: INFO: Current backtesting datetime 2020-12-25 09:29:00-05:00 +2024-04-13 18:20:18,692: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:18,693: root: INFO: Current backtesting datetime 2020-12-28 08:30:00-05:00 +2024-04-13 18:20:18,694: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:18,694: root: INFO: Current backtesting datetime 2020-12-28 09:30:00-05:00 +2024-04-13 18:20:18,694: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:18,695: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:18 +2024-04-13 18:20:18,696: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:18,696: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:18,697: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:18,697: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:18,697: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:19,650: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:19,651: root: INFO: Current backtesting datetime 2020-12-28 16:00:00-05:00 +2024-04-13 18:20:19,651: root: INFO: Current backtesting datetime 2020-12-29 09:30:00-05:00 +2024-04-13 18:20:19,652: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:19 +2024-04-13 18:20:19,652: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:19,652: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:19,653: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:19,653: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:19,653: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:20,369: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:20,370: root: INFO: Current backtesting datetime 2020-12-29 16:00:00-05:00 +2024-04-13 18:20:20,370: root: INFO: Current backtesting datetime 2020-12-30 09:30:00-05:00 +2024-04-13 18:20:20,371: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:20 +2024-04-13 18:20:20,371: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:20,372: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:20,372: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:20,372: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:20,372: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:21,123: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:21,124: root: INFO: Current backtesting datetime 2020-12-30 16:00:00-05:00 +2024-04-13 18:20:21,124: root: INFO: Current backtesting datetime 2020-12-31 09:30:00-05:00 +2024-04-13 18:20:21,125: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:21 +2024-04-13 18:20:21,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:21,126: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:21,126: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:21,127: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:21,127: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:22,194: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:22,195: root: INFO: Current backtesting datetime 2020-12-31 16:00:00-05:00 +2024-04-13 18:20:22,195: root: INFO: Current backtesting datetime 2021-01-01 09:30:00-05:00 +2024-04-13 18:20:22,196: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:22,197: root: INFO: Current backtesting datetime 2021-01-01 09:29:00-05:00 +2024-04-13 18:20:22,198: root: INFO: Current backtesting datetime 2021-01-01 09:29:00-05:00 +2024-04-13 18:20:22,198: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:22,199: root: INFO: Current backtesting datetime 2021-01-04 08:30:00-05:00 +2024-04-13 18:20:22,199: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:22,200: root: INFO: Current backtesting datetime 2021-01-04 09:30:00-05:00 +2024-04-13 18:20:22,200: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:22,201: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:22 +2024-04-13 18:20:22,201: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:22,202: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:22,202: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:22,203: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:22,203: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:23,100: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:23,101: root: INFO: Current backtesting datetime 2021-01-04 16:00:00-05:00 +2024-04-13 18:20:23,101: root: INFO: Current backtesting datetime 2021-01-05 09:30:00-05:00 +2024-04-13 18:20:23,101: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:23 +2024-04-13 18:20:23,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:23,102: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:23,102: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:23,103: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:23,103: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:24,009: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:24,011: root: INFO: Current backtesting datetime 2021-01-05 16:00:00-05:00 +2024-04-13 18:20:24,011: root: INFO: Current backtesting datetime 2021-01-06 09:30:00-05:00 +2024-04-13 18:20:24,011: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:24 +2024-04-13 18:20:24,011: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:24,012: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:24,012: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:24,013: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:24,013: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:24,868: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:24,869: root: INFO: Current backtesting datetime 2021-01-06 16:00:00-05:00 +2024-04-13 18:20:24,870: root: INFO: Current backtesting datetime 2021-01-07 09:30:00-05:00 +2024-04-13 18:20:24,870: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:24 +2024-04-13 18:20:24,870: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:24,871: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:24,871: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:24,872: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:24,872: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:25,722: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:25,723: root: INFO: Current backtesting datetime 2021-01-07 16:00:00-05:00 +2024-04-13 18:20:25,724: root: INFO: Current backtesting datetime 2021-01-08 09:30:00-05:00 +2024-04-13 18:20:25,724: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:25 +2024-04-13 18:20:25,724: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:25,725: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:25,725: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:25,726: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:25,726: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:27,183: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:27,184: root: INFO: Current backtesting datetime 2021-01-08 16:00:00-05:00 +2024-04-13 18:20:27,185: root: INFO: Current backtesting datetime 2021-01-09 09:30:00-05:00 +2024-04-13 18:20:27,185: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:27,186: root: INFO: Current backtesting datetime 2021-01-09 09:29:00-05:00 +2024-04-13 18:20:27,188: root: INFO: Current backtesting datetime 2021-01-09 09:29:00-05:00 +2024-04-13 18:20:27,188: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:27,189: root: INFO: Current backtesting datetime 2021-01-11 08:30:00-05:00 +2024-04-13 18:20:27,189: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:27,190: root: INFO: Current backtesting datetime 2021-01-11 09:30:00-05:00 +2024-04-13 18:20:27,190: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:27,191: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:27 +2024-04-13 18:20:27,191: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:27,192: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:27,192: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:27,192: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:27,192: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:28,555: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:28,556: root: INFO: Current backtesting datetime 2021-01-11 16:00:00-05:00 +2024-04-13 18:20:28,556: root: INFO: Current backtesting datetime 2021-01-12 09:30:00-05:00 +2024-04-13 18:20:28,556: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:28 +2024-04-13 18:20:28,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:28,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:28,558: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:28,558: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:28,558: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:29,756: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:29,757: root: INFO: Current backtesting datetime 2021-01-12 16:00:00-05:00 +2024-04-13 18:20:29,757: root: INFO: Current backtesting datetime 2021-01-13 09:30:00-05:00 +2024-04-13 18:20:29,757: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:29 +2024-04-13 18:20:29,757: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:29,758: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:29,758: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:29,759: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:29,759: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:30,695: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:30,696: root: INFO: Current backtesting datetime 2021-01-13 16:00:00-05:00 +2024-04-13 18:20:30,696: root: INFO: Current backtesting datetime 2021-01-14 09:30:00-05:00 +2024-04-13 18:20:30,697: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:30 +2024-04-13 18:20:30,697: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:30,698: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:30,698: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:30,698: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:30,698: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:31,496: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:31,497: root: INFO: Current backtesting datetime 2021-01-14 16:00:00-05:00 +2024-04-13 18:20:31,497: root: INFO: Current backtesting datetime 2021-01-15 09:30:00-05:00 +2024-04-13 18:20:31,498: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:31 +2024-04-13 18:20:31,498: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:31,498: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:31,499: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:31,499: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:31,499: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:32,322: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:32,323: root: INFO: Current backtesting datetime 2021-01-15 16:00:00-05:00 +2024-04-13 18:20:32,323: root: INFO: Current backtesting datetime 2021-01-16 09:30:00-05:00 +2024-04-13 18:20:32,323: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:32,325: root: INFO: Current backtesting datetime 2021-01-16 09:29:00-05:00 +2024-04-13 18:20:32,327: root: INFO: Current backtesting datetime 2021-01-16 09:29:00-05:00 +2024-04-13 18:20:32,327: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:32,327: root: INFO: Current backtesting datetime 2021-01-19 08:30:00-05:00 +2024-04-13 18:20:32,328: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:32,329: root: INFO: Current backtesting datetime 2021-01-19 09:30:00-05:00 +2024-04-13 18:20:32,329: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:32,330: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:32 +2024-04-13 18:20:32,330: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:32,331: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:32,331: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:32,332: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:32,332: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:33,665: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:33,666: root: INFO: Current backtesting datetime 2021-01-19 16:00:00-05:00 +2024-04-13 18:20:33,667: root: INFO: Current backtesting datetime 2021-01-20 09:30:00-05:00 +2024-04-13 18:20:33,667: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:33 +2024-04-13 18:20:33,667: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:33,668: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:33,668: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:33,669: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:33,669: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:34,551: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:34,552: root: INFO: Current backtesting datetime 2021-01-20 16:00:00-05:00 +2024-04-13 18:20:34,552: root: INFO: Current backtesting datetime 2021-01-21 09:30:00-05:00 +2024-04-13 18:20:34,552: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:34 +2024-04-13 18:20:34,553: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:34,553: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:34,554: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:34,554: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:34,554: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:35,370: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:35,371: root: INFO: Current backtesting datetime 2021-01-21 16:00:00-05:00 +2024-04-13 18:20:35,372: root: INFO: Current backtesting datetime 2021-01-22 09:30:00-05:00 +2024-04-13 18:20:35,372: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:35 +2024-04-13 18:20:35,372: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:35,373: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:35,373: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:35,374: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:35,374: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:36,060: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:36,061: root: INFO: Current backtesting datetime 2021-01-22 16:00:00-05:00 +2024-04-13 18:20:36,061: root: INFO: Current backtesting datetime 2021-01-23 09:30:00-05:00 +2024-04-13 18:20:36,062: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:36,063: root: INFO: Current backtesting datetime 2021-01-23 09:29:00-05:00 +2024-04-13 18:20:36,064: root: INFO: Current backtesting datetime 2021-01-23 09:29:00-05:00 +2024-04-13 18:20:36,064: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:36,065: root: INFO: Current backtesting datetime 2021-01-25 08:30:00-05:00 +2024-04-13 18:20:36,066: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:36,067: root: INFO: Current backtesting datetime 2021-01-25 09:30:00-05:00 +2024-04-13 18:20:36,067: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:36,068: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:36 +2024-04-13 18:20:36,068: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:36,069: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:36,069: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:36,069: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:36,069: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:37,745: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:37,746: root: INFO: Current backtesting datetime 2021-01-25 16:00:00-05:00 +2024-04-13 18:20:37,746: root: INFO: Current backtesting datetime 2021-01-26 09:30:00-05:00 +2024-04-13 18:20:37,746: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:37 +2024-04-13 18:20:37,746: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:37,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:37,747: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:37,748: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:37,748: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:38,962: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:38,963: root: INFO: Current backtesting datetime 2021-01-26 16:00:00-05:00 +2024-04-13 18:20:38,963: root: INFO: Current backtesting datetime 2021-01-27 09:30:00-05:00 +2024-04-13 18:20:38,964: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:38 +2024-04-13 18:20:38,964: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:38,965: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:38,965: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:38,965: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:38,966: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:39,927: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:39,928: root: INFO: Current backtesting datetime 2021-01-27 16:00:00-05:00 +2024-04-13 18:20:39,928: root: INFO: Current backtesting datetime 2021-01-28 09:30:00-05:00 +2024-04-13 18:20:39,928: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:39 +2024-04-13 18:20:39,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:39,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:39,930: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:39,930: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:39,930: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:41,795: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:41,796: root: INFO: Current backtesting datetime 2021-01-28 16:00:00-05:00 +2024-04-13 18:20:41,797: root: INFO: Current backtesting datetime 2021-01-29 09:30:00-05:00 +2024-04-13 18:20:41,797: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:41 +2024-04-13 18:20:41,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:41,798: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:41,798: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:41,798: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:41,798: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:43,054: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:43,055: root: INFO: Current backtesting datetime 2021-01-29 16:00:00-05:00 +2024-04-13 18:20:43,056: root: INFO: Current backtesting datetime 2021-01-30 09:30:00-05:00 +2024-04-13 18:20:43,056: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:43,057: root: INFO: Current backtesting datetime 2021-01-30 09:29:00-05:00 +2024-04-13 18:20:43,059: root: INFO: Current backtesting datetime 2021-01-30 09:29:00-05:00 +2024-04-13 18:20:43,059: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:43,061: root: INFO: Current backtesting datetime 2021-02-01 08:30:00-05:00 +2024-04-13 18:20:43,061: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:43,062: root: INFO: Current backtesting datetime 2021-02-01 09:30:00-05:00 +2024-04-13 18:20:43,062: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:43,063: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:43 +2024-04-13 18:20:43,063: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:43,064: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:43,064: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:43,065: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:43,065: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:44,581: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:44,582: root: INFO: Current backtesting datetime 2021-02-01 16:00:00-05:00 +2024-04-13 18:20:44,582: root: INFO: Current backtesting datetime 2021-02-02 09:30:00-05:00 +2024-04-13 18:20:44,583: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:44 +2024-04-13 18:20:44,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:44,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:44,584: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:44,584: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:44,584: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:45,760: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:45,761: root: INFO: Current backtesting datetime 2021-02-02 16:00:00-05:00 +2024-04-13 18:20:45,762: root: INFO: Current backtesting datetime 2021-02-03 09:30:00-05:00 +2024-04-13 18:20:45,762: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:45 +2024-04-13 18:20:45,762: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:45,763: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:45,763: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:45,764: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:45,764: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:46,736: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:46,737: root: INFO: Current backtesting datetime 2021-02-03 16:00:00-05:00 +2024-04-13 18:20:46,738: root: INFO: Current backtesting datetime 2021-02-04 09:30:00-05:00 +2024-04-13 18:20:46,738: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:46 +2024-04-13 18:20:46,738: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:46,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:46,739: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:46,740: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:46,740: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:48,483: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:48,485: root: INFO: Current backtesting datetime 2021-02-04 16:00:00-05:00 +2024-04-13 18:20:48,485: root: INFO: Current backtesting datetime 2021-02-05 09:30:00-05:00 +2024-04-13 18:20:48,485: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:48 +2024-04-13 18:20:48,485: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:48,486: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:48,486: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:48,487: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:48,487: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:50,362: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:50,364: root: INFO: Current backtesting datetime 2021-02-05 16:00:00-05:00 +2024-04-13 18:20:50,364: root: INFO: Current backtesting datetime 2021-02-06 09:30:00-05:00 +2024-04-13 18:20:50,364: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:50,366: root: INFO: Current backtesting datetime 2021-02-06 09:29:00-05:00 +2024-04-13 18:20:50,367: root: INFO: Current backtesting datetime 2021-02-06 09:29:00-05:00 +2024-04-13 18:20:50,367: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:50,368: root: INFO: Current backtesting datetime 2021-02-08 08:30:00-05:00 +2024-04-13 18:20:50,368: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:50,369: root: INFO: Current backtesting datetime 2021-02-08 09:30:00-05:00 +2024-04-13 18:20:50,369: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:50,371: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:50 +2024-04-13 18:20:50,371: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:50,371: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:50,372: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:50,372: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:50,372: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:51,437: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:51,438: root: INFO: Current backtesting datetime 2021-02-08 16:00:00-05:00 +2024-04-13 18:20:51,438: root: INFO: Current backtesting datetime 2021-02-09 09:30:00-05:00 +2024-04-13 18:20:51,439: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:51 +2024-04-13 18:20:51,439: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:51,440: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:51,440: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:51,440: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:51,440: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:52,043: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:52,044: root: INFO: Current backtesting datetime 2021-02-09 16:00:00-05:00 +2024-04-13 18:20:52,044: root: INFO: Current backtesting datetime 2021-02-10 09:30:00-05:00 +2024-04-13 18:20:52,044: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:52 +2024-04-13 18:20:52,045: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:52,045: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:52,045: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:52,046: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:52,046: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:52,831: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:52,832: root: INFO: Current backtesting datetime 2021-02-10 16:00:00-05:00 +2024-04-13 18:20:52,833: root: INFO: Current backtesting datetime 2021-02-11 09:30:00-05:00 +2024-04-13 18:20:52,833: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:52 +2024-04-13 18:20:52,833: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:52,834: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:52,834: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:52,835: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:52,835: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:53,495: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:53,496: root: INFO: Current backtesting datetime 2021-02-11 16:00:00-05:00 +2024-04-13 18:20:53,497: root: INFO: Current backtesting datetime 2021-02-12 09:30:00-05:00 +2024-04-13 18:20:53,497: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:53 +2024-04-13 18:20:53,497: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:53,498: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:53,498: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:53,499: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:53,499: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:54,018: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:54,019: root: INFO: Current backtesting datetime 2021-02-12 16:00:00-05:00 +2024-04-13 18:20:54,020: root: INFO: Current backtesting datetime 2021-02-13 09:30:00-05:00 +2024-04-13 18:20:54,020: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:54,022: root: INFO: Current backtesting datetime 2021-02-13 09:29:00-05:00 +2024-04-13 18:20:54,024: root: INFO: Current backtesting datetime 2021-02-13 09:29:00-05:00 +2024-04-13 18:20:54,024: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:54,024: root: INFO: Current backtesting datetime 2021-02-16 08:30:00-05:00 +2024-04-13 18:20:54,025: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:54,026: root: INFO: Current backtesting datetime 2021-02-16 09:30:00-05:00 +2024-04-13 18:20:54,026: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:54,027: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:54 +2024-04-13 18:20:54,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:54,028: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:54,028: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:54,028: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:54,029: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:54,742: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:54,743: root: INFO: Current backtesting datetime 2021-02-16 16:00:00-05:00 +2024-04-13 18:20:54,743: root: INFO: Current backtesting datetime 2021-02-17 09:30:00-05:00 +2024-04-13 18:20:54,744: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:54 +2024-04-13 18:20:54,744: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:54,745: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:54,745: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:54,745: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:54,745: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:55,111: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:55,112: root: INFO: Current backtesting datetime 2021-02-17 16:00:00-05:00 +2024-04-13 18:20:55,113: root: INFO: Current backtesting datetime 2021-02-18 09:30:00-05:00 +2024-04-13 18:20:55,113: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:55 +2024-04-13 18:20:55,113: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:55,114: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:55,114: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:55,114: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:55,115: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:56,369: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:56,370: root: INFO: Current backtesting datetime 2021-02-18 16:00:00-05:00 +2024-04-13 18:20:56,371: root: INFO: Current backtesting datetime 2021-02-19 09:30:00-05:00 +2024-04-13 18:20:56,371: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:56 +2024-04-13 18:20:56,371: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:56,372: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:56,372: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:56,373: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:56,373: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:57,296: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:57,297: root: INFO: Current backtesting datetime 2021-02-19 16:00:00-05:00 +2024-04-13 18:20:57,297: root: INFO: Current backtesting datetime 2021-02-20 09:30:00-05:00 +2024-04-13 18:20:57,298: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:20:57,299: root: INFO: Current backtesting datetime 2021-02-20 09:29:00-05:00 +2024-04-13 18:20:57,301: root: INFO: Current backtesting datetime 2021-02-20 09:29:00-05:00 +2024-04-13 18:20:57,301: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:20:57,302: root: INFO: Current backtesting datetime 2021-02-22 08:30:00-05:00 +2024-04-13 18:20:57,302: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:20:57,303: root: INFO: Current backtesting datetime 2021-02-22 09:30:00-05:00 +2024-04-13 18:20:57,303: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:20:57,304: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:57 +2024-04-13 18:20:57,304: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:57,305: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:57,305: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:57,306: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:57,306: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:58,348: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:58,349: root: INFO: Current backtesting datetime 2021-02-22 16:00:00-05:00 +2024-04-13 18:20:58,349: root: INFO: Current backtesting datetime 2021-02-23 09:30:00-05:00 +2024-04-13 18:20:58,350: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:58 +2024-04-13 18:20:58,350: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:58,350: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:58,351: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:58,351: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:58,351: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:20:59,242: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:20:59,243: root: INFO: Current backtesting datetime 2021-02-23 16:00:00-05:00 +2024-04-13 18:20:59,243: root: INFO: Current backtesting datetime 2021-02-24 09:30:00-05:00 +2024-04-13 18:20:59,244: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:20:59 +2024-04-13 18:20:59,244: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:59,245: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:20:59,245: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:20:59,245: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:20:59,245: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:00,129: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:00,130: root: INFO: Current backtesting datetime 2021-02-24 16:00:00-05:00 +2024-04-13 18:21:00,131: root: INFO: Current backtesting datetime 2021-02-25 09:30:00-05:00 +2024-04-13 18:21:00,131: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:00 +2024-04-13 18:21:00,131: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:00,132: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:00,132: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:00,133: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:00,133: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:01,013: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:01,014: root: INFO: Current backtesting datetime 2021-02-25 16:00:00-05:00 +2024-04-13 18:21:01,014: root: INFO: Current backtesting datetime 2021-02-26 09:30:00-05:00 +2024-04-13 18:21:01,014: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:01 +2024-04-13 18:21:01,014: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:01,015: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:01,015: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:01,016: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:01,016: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:01,971: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:01,973: root: INFO: Current backtesting datetime 2021-02-26 16:00:00-05:00 +2024-04-13 18:21:01,974: root: INFO: Current backtesting datetime 2021-02-27 09:30:00-05:00 +2024-04-13 18:21:01,974: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:21:01,977: root: INFO: Current backtesting datetime 2021-02-27 09:29:00-05:00 +2024-04-13 18:21:01,979: root: INFO: Current backtesting datetime 2021-02-27 09:29:00-05:00 +2024-04-13 18:21:01,979: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:21:01,980: root: INFO: Current backtesting datetime 2021-03-01 08:30:00-05:00 +2024-04-13 18:21:01,981: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:21:01,982: root: INFO: Current backtesting datetime 2021-03-01 09:30:00-05:00 +2024-04-13 18:21:01,982: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:21:01,984: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:01 +2024-04-13 18:21:01,984: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:01,986: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:01,986: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:01,987: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:01,987: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:03,169: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:03,170: root: INFO: Current backtesting datetime 2021-03-01 16:00:00-05:00 +2024-04-13 18:21:03,171: root: INFO: Current backtesting datetime 2021-03-02 09:30:00-05:00 +2024-04-13 18:21:03,171: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:03 +2024-04-13 18:21:03,171: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:03,172: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:03,172: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:03,173: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:03,173: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:04,109: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:04,110: root: INFO: Current backtesting datetime 2021-03-02 16:00:00-05:00 +2024-04-13 18:21:04,111: root: INFO: Current backtesting datetime 2021-03-03 09:30:00-05:00 +2024-04-13 18:21:04,112: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:04 +2024-04-13 18:21:04,112: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:04,112: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:04,113: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:04,113: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:04,113: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:05,562: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:05,563: root: INFO: Current backtesting datetime 2021-03-03 16:00:00-05:00 +2024-04-13 18:21:05,563: root: INFO: Current backtesting datetime 2021-03-04 09:30:00-05:00 +2024-04-13 18:21:05,564: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:05 +2024-04-13 18:21:05,564: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:05,565: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:05,565: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:05,566: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:05,566: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:06,806: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:06,807: root: INFO: Current backtesting datetime 2021-03-04 16:00:00-05:00 +2024-04-13 18:21:06,807: root: INFO: Current backtesting datetime 2021-03-05 09:30:00-05:00 +2024-04-13 18:21:06,808: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:06 +2024-04-13 18:21:06,808: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:06,809: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:06,809: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:06,809: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:06,810: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:07,765: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:07,766: root: INFO: Current backtesting datetime 2021-03-05 16:00:00-05:00 +2024-04-13 18:21:07,767: root: INFO: Current backtesting datetime 2021-03-06 09:30:00-05:00 +2024-04-13 18:21:07,767: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:21:07,768: root: INFO: Current backtesting datetime 2021-03-06 09:29:00-05:00 +2024-04-13 18:21:07,769: root: INFO: Current backtesting datetime 2021-03-06 09:29:00-05:00 +2024-04-13 18:21:07,770: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:21:07,770: root: INFO: Current backtesting datetime 2021-03-08 08:30:00-05:00 +2024-04-13 18:21:07,771: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:21:07,772: root: INFO: Current backtesting datetime 2021-03-08 09:30:00-05:00 +2024-04-13 18:21:07,772: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:21:07,773: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:07 +2024-04-13 18:21:07,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:07,774: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:07,774: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:07,774: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:07,775: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:08,925: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:08,926: root: INFO: Current backtesting datetime 2021-03-08 16:00:00-05:00 +2024-04-13 18:21:08,927: root: INFO: Current backtesting datetime 2021-03-09 09:30:00-05:00 +2024-04-13 18:21:08,927: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:08 +2024-04-13 18:21:08,927: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:08,928: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:08,928: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:08,929: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:08,929: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:11,151: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:11,152: root: INFO: Current backtesting datetime 2021-03-09 16:00:00-05:00 +2024-04-13 18:21:11,153: root: INFO: Current backtesting datetime 2021-03-10 09:30:00-05:00 +2024-04-13 18:21:11,153: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:11 +2024-04-13 18:21:11,153: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:11,154: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:11,154: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:11,155: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:11,155: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:12,485: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:12,486: root: INFO: Current backtesting datetime 2021-03-10 16:00:00-05:00 +2024-04-13 18:21:12,487: root: INFO: Current backtesting datetime 2021-03-11 09:30:00-05:00 +2024-04-13 18:21:12,487: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:12 +2024-04-13 18:21:12,487: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:12,488: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:12,488: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:12,489: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:12,489: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:14,704: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:14,705: root: INFO: Current backtesting datetime 2021-03-11 16:00:00-05:00 +2024-04-13 18:21:14,706: root: INFO: Current backtesting datetime 2021-03-12 09:30:00-05:00 +2024-04-13 18:21:14,706: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:14 +2024-04-13 18:21:14,706: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:14,707: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:14,707: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:14,708: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:14,708: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:16,031: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:16,032: root: INFO: Current backtesting datetime 2021-03-12 16:00:00-05:00 +2024-04-13 18:21:16,032: root: INFO: Current backtesting datetime 2021-03-13 09:30:00-05:00 +2024-04-13 18:21:16,033: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:21:16,034: root: INFO: Current backtesting datetime 2021-03-13 09:29:00-05:00 +2024-04-13 18:21:16,035: root: INFO: Current backtesting datetime 2021-03-13 09:29:00-05:00 +2024-04-13 18:21:16,035: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:21:16,036: root: INFO: Current backtesting datetime 2021-03-15 07:30:00-05:00 +2024-04-13 18:21:16,037: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:21:16,038: root: INFO: Current backtesting datetime 2021-03-15 08:30:00-05:00 +2024-04-13 18:21:16,038: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:21:16,039: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:16 +2024-04-13 18:21:16,039: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:16,040: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:16,040: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:16,041: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:16,041: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:17,358: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:17,359: root: INFO: Current backtesting datetime 2021-03-15 15:00:00-05:00 +2024-04-13 18:21:17,359: root: INFO: Current backtesting datetime 2021-03-16 08:30:00-05:00 +2024-04-13 18:21:17,359: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:17 +2024-04-13 18:21:17,360: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:17,360: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:17,361: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:17,361: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:17,361: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:18,982: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:18,983: root: INFO: Current backtesting datetime 2021-03-16 15:00:00-05:00 +2024-04-13 18:21:18,983: root: INFO: Current backtesting datetime 2021-03-17 08:30:00-05:00 +2024-04-13 18:21:18,984: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:18 +2024-04-13 18:21:18,984: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:18,985: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:18,985: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:18,985: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:18,985: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:20,114: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:20,115: root: INFO: Current backtesting datetime 2021-03-17 15:00:00-05:00 +2024-04-13 18:21:20,116: root: INFO: Current backtesting datetime 2021-03-18 08:30:00-05:00 +2024-04-13 18:21:20,116: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:20 +2024-04-13 18:21:20,116: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:20,117: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:20,117: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:20,124: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:20,124: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:21,455: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:21,456: root: INFO: Current backtesting datetime 2021-03-18 15:00:00-05:00 +2024-04-13 18:21:21,456: root: INFO: Current backtesting datetime 2021-03-19 08:30:00-05:00 +2024-04-13 18:21:21,458: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:21 +2024-04-13 18:21:21,458: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:21,459: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:21,459: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:21,466: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:21,466: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:22,905: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:22,906: root: INFO: Current backtesting datetime 2021-03-19 15:00:00-05:00 +2024-04-13 18:21:22,906: root: INFO: Current backtesting datetime 2021-03-20 08:30:00-05:00 +2024-04-13 18:21:22,906: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:21:22,907: root: INFO: Current backtesting datetime 2021-03-20 08:29:00-05:00 +2024-04-13 18:21:22,909: root: INFO: Current backtesting datetime 2021-03-20 08:29:00-05:00 +2024-04-13 18:21:22,909: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:21:22,910: root: INFO: Current backtesting datetime 2021-03-22 07:30:00-05:00 +2024-04-13 18:21:22,910: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:21:22,911: root: INFO: Current backtesting datetime 2021-03-22 08:30:00-05:00 +2024-04-13 18:21:22,911: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:21:22,912: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:22 +2024-04-13 18:21:22,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:22,913: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:22,913: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:22,914: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:22,914: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:24,454: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:24,455: root: INFO: Current backtesting datetime 2021-03-22 15:00:00-05:00 +2024-04-13 18:21:24,456: root: INFO: Current backtesting datetime 2021-03-23 08:30:00-05:00 +2024-04-13 18:21:24,456: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:24 +2024-04-13 18:21:24,456: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:24,457: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:24,457: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:24,458: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:24,458: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:26,133: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:26,134: root: INFO: Current backtesting datetime 2021-03-23 15:00:00-05:00 +2024-04-13 18:21:26,134: root: INFO: Current backtesting datetime 2021-03-24 08:30:00-05:00 +2024-04-13 18:21:26,135: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:26 +2024-04-13 18:21:26,135: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:26,136: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:26,136: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:26,142: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:26,142: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:27,328: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:27,330: root: INFO: Current backtesting datetime 2021-03-24 15:00:00-05:00 +2024-04-13 18:21:27,330: root: INFO: Current backtesting datetime 2021-03-25 08:30:00-05:00 +2024-04-13 18:21:27,331: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:27 +2024-04-13 18:21:27,331: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:27,332: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:27,333: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:27,342: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:27,342: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:28,741: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:28,742: root: INFO: Current backtesting datetime 2021-03-25 15:00:00-05:00 +2024-04-13 18:21:28,742: root: INFO: Current backtesting datetime 2021-03-26 08:30:00-05:00 +2024-04-13 18:21:28,742: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:28 +2024-04-13 18:21:28,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:28,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:28,743: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:28,744: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:28,744: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:30,168: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:30,170: root: INFO: Current backtesting datetime 2021-03-26 15:00:00-05:00 +2024-04-13 18:21:30,170: root: INFO: Current backtesting datetime 2021-03-27 08:30:00-05:00 +2024-04-13 18:21:30,170: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:21:30,172: root: INFO: Current backtesting datetime 2021-03-27 08:29:00-05:00 +2024-04-13 18:21:30,173: root: INFO: Current backtesting datetime 2021-03-27 08:29:00-05:00 +2024-04-13 18:21:30,173: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:21:30,174: root: INFO: Current backtesting datetime 2021-03-29 07:30:00-05:00 +2024-04-13 18:21:30,174: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:21:30,175: root: INFO: Current backtesting datetime 2021-03-29 08:30:00-05:00 +2024-04-13 18:21:30,175: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:21:30,176: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:30 +2024-04-13 18:21:30,177: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:30,177: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:30,178: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:30,178: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:30,178: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:31,346: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:31,347: root: INFO: Current backtesting datetime 2021-03-29 15:00:00-05:00 +2024-04-13 18:21:31,347: root: INFO: Current backtesting datetime 2021-03-30 08:30:00-05:00 +2024-04-13 18:21:31,348: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:31 +2024-04-13 18:21:31,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:31,349: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:31,349: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:31,349: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:31,349: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:32,091: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:32,092: root: INFO: Current backtesting datetime 2021-03-30 15:00:00-05:00 +2024-04-13 18:21:32,093: root: INFO: Current backtesting datetime 2021-03-31 08:30:00-05:00 +2024-04-13 18:21:32,093: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:32 +2024-04-13 18:21:32,093: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:32,094: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:32,094: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:32,095: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:32,095: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:33,745: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:33,746: root: INFO: Current backtesting datetime 2021-03-31 15:00:00-05:00 +2024-04-13 18:21:33,747: root: INFO: Current backtesting datetime 2021-04-01 08:30:00-05:00 +2024-04-13 18:21:33,747: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:33 +2024-04-13 18:21:33,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:33,748: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:33,748: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:33,749: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:33,750: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:34,999: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:35,000: root: INFO: Current backtesting datetime 2021-04-01 15:00:00-05:00 +2024-04-13 18:21:35,000: root: INFO: Current backtesting datetime 2021-04-02 08:30:00-05:00 +2024-04-13 18:21:35,000: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:21:35,002: root: INFO: Current backtesting datetime 2021-04-02 08:29:00-05:00 +2024-04-13 18:21:35,004: root: INFO: Current backtesting datetime 2021-04-02 08:29:00-05:00 +2024-04-13 18:21:35,004: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:21:35,004: root: INFO: Current backtesting datetime 2021-04-05 07:30:00-05:00 +2024-04-13 18:21:35,005: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:21:35,006: root: INFO: Current backtesting datetime 2021-04-05 08:30:00-05:00 +2024-04-13 18:21:35,006: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:21:35,007: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:35 +2024-04-13 18:21:35,007: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:35,008: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:35,008: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:35,009: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:35,009: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:36,166: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:36,167: root: INFO: Current backtesting datetime 2021-04-05 15:00:00-05:00 +2024-04-13 18:21:36,167: root: INFO: Current backtesting datetime 2021-04-06 08:30:00-05:00 +2024-04-13 18:21:36,168: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:36 +2024-04-13 18:21:36,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:36,169: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:36,169: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:36,169: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:36,169: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:37,402: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:37,403: root: INFO: Current backtesting datetime 2021-04-06 15:00:00-05:00 +2024-04-13 18:21:37,403: root: INFO: Current backtesting datetime 2021-04-07 08:30:00-05:00 +2024-04-13 18:21:37,404: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:37 +2024-04-13 18:21:37,404: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:37,405: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:37,405: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:37,411: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:37,411: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:39,025: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:39,026: root: INFO: Current backtesting datetime 2021-04-07 15:00:00-05:00 +2024-04-13 18:21:39,026: root: INFO: Current backtesting datetime 2021-04-08 08:30:00-05:00 +2024-04-13 18:21:39,026: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:39 +2024-04-13 18:21:39,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:39,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:39,028: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:39,028: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:39,028: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:40,075: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:40,076: root: INFO: Current backtesting datetime 2021-04-08 15:00:00-05:00 +2024-04-13 18:21:40,077: root: INFO: Current backtesting datetime 2021-04-09 08:30:00-05:00 +2024-04-13 18:21:40,077: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:40 +2024-04-13 18:21:40,077: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:40,078: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:40,078: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:40,079: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:40,079: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:40,955: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:40,956: root: INFO: Current backtesting datetime 2021-04-09 15:00:00-05:00 +2024-04-13 18:21:40,956: root: INFO: Current backtesting datetime 2021-04-10 08:30:00-05:00 +2024-04-13 18:21:40,957: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:21:40,958: root: INFO: Current backtesting datetime 2021-04-10 08:29:00-05:00 +2024-04-13 18:21:40,959: root: INFO: Current backtesting datetime 2021-04-10 08:29:00-05:00 +2024-04-13 18:21:40,959: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:21:40,961: root: INFO: Current backtesting datetime 2021-04-12 07:30:00-05:00 +2024-04-13 18:21:40,961: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:21:40,962: root: INFO: Current backtesting datetime 2021-04-12 08:30:00-05:00 +2024-04-13 18:21:40,962: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:21:40,963: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:40 +2024-04-13 18:21:40,963: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:40,964: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:40,964: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:40,964: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:40,964: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:41,655: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:41,656: root: INFO: Current backtesting datetime 2021-04-12 15:00:00-05:00 +2024-04-13 18:21:41,657: root: INFO: Current backtesting datetime 2021-04-13 08:30:00-05:00 +2024-04-13 18:21:41,658: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:41 +2024-04-13 18:21:41,658: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:41,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:41,659: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:41,659: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:41,659: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:43,116: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:43,117: root: INFO: Current backtesting datetime 2021-04-13 15:00:00-05:00 +2024-04-13 18:21:43,117: root: INFO: Current backtesting datetime 2021-04-14 08:30:00-05:00 +2024-04-13 18:21:43,118: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:43 +2024-04-13 18:21:43,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:43,119: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:43,119: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:43,120: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:43,120: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:44,754: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:44,754: root: INFO: Current backtesting datetime 2021-04-14 15:00:00-05:00 +2024-04-13 18:21:44,755: root: INFO: Current backtesting datetime 2021-04-15 08:30:00-05:00 +2024-04-13 18:21:44,756: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:44 +2024-04-13 18:21:44,756: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:44,756: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:44,756: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:44,757: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:44,757: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:45,664: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:45,665: root: INFO: Current backtesting datetime 2021-04-15 15:00:00-05:00 +2024-04-13 18:21:45,666: root: INFO: Current backtesting datetime 2021-04-16 08:30:00-05:00 +2024-04-13 18:21:45,666: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:45 +2024-04-13 18:21:45,666: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:45,667: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:45,667: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:45,668: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:45,668: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:47,346: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:47,347: root: INFO: Current backtesting datetime 2021-04-16 15:00:00-05:00 +2024-04-13 18:21:47,348: root: INFO: Current backtesting datetime 2021-04-17 08:30:00-05:00 +2024-04-13 18:21:47,348: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:21:47,350: root: INFO: Current backtesting datetime 2021-04-17 08:29:00-05:00 +2024-04-13 18:21:47,351: root: INFO: Current backtesting datetime 2021-04-17 08:29:00-05:00 +2024-04-13 18:21:47,351: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:21:47,351: root: INFO: Current backtesting datetime 2021-04-19 07:30:00-05:00 +2024-04-13 18:21:47,352: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:21:47,353: root: INFO: Current backtesting datetime 2021-04-19 08:30:00-05:00 +2024-04-13 18:21:47,353: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:21:47,354: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:47 +2024-04-13 18:21:47,354: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:47,355: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:47,355: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:47,355: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:47,355: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:48,322: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:48,323: root: INFO: Current backtesting datetime 2021-04-19 15:00:00-05:00 +2024-04-13 18:21:48,323: root: INFO: Current backtesting datetime 2021-04-20 08:30:00-05:00 +2024-04-13 18:21:48,323: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:48 +2024-04-13 18:21:48,323: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:48,324: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:48,324: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:48,325: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:48,325: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:50,123: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:50,124: root: INFO: Current backtesting datetime 2021-04-20 15:00:00-05:00 +2024-04-13 18:21:50,125: root: INFO: Current backtesting datetime 2021-04-21 08:30:00-05:00 +2024-04-13 18:21:50,125: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:50 +2024-04-13 18:21:50,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:50,126: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:50,127: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:50,127: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:50,127: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:51,303: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:51,304: root: INFO: Current backtesting datetime 2021-04-21 15:00:00-05:00 +2024-04-13 18:21:51,305: root: INFO: Current backtesting datetime 2021-04-22 08:30:00-05:00 +2024-04-13 18:21:51,305: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:51 +2024-04-13 18:21:51,305: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:51,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:51,306: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:51,307: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:51,307: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:53,031: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:53,032: root: INFO: Current backtesting datetime 2021-04-22 15:00:00-05:00 +2024-04-13 18:21:53,033: root: INFO: Current backtesting datetime 2021-04-23 08:30:00-05:00 +2024-04-13 18:21:53,033: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:53 +2024-04-13 18:21:53,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:53,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:53,034: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:53,035: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:53,035: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:55,081: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:55,082: root: INFO: Current backtesting datetime 2021-04-23 15:00:00-05:00 +2024-04-13 18:21:55,082: root: INFO: Current backtesting datetime 2021-04-24 08:30:00-05:00 +2024-04-13 18:21:55,083: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:21:55,085: root: INFO: Current backtesting datetime 2021-04-24 08:29:00-05:00 +2024-04-13 18:21:55,086: root: INFO: Current backtesting datetime 2021-04-24 08:29:00-05:00 +2024-04-13 18:21:55,086: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:21:55,087: root: INFO: Current backtesting datetime 2021-04-26 07:30:00-05:00 +2024-04-13 18:21:55,087: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:21:55,088: root: INFO: Current backtesting datetime 2021-04-26 08:30:00-05:00 +2024-04-13 18:21:55,088: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:21:55,089: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:55 +2024-04-13 18:21:55,089: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:55,090: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:55,090: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:55,091: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:55,091: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:57,418: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:57,419: root: INFO: Current backtesting datetime 2021-04-26 15:00:00-05:00 +2024-04-13 18:21:57,419: root: INFO: Current backtesting datetime 2021-04-27 08:30:00-05:00 +2024-04-13 18:21:57,420: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:57 +2024-04-13 18:21:57,420: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:57,420: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:57,421: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:57,421: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:57,421: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:21:59,177: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:21:59,178: root: INFO: Current backtesting datetime 2021-04-27 15:00:00-05:00 +2024-04-13 18:21:59,178: root: INFO: Current backtesting datetime 2021-04-28 08:30:00-05:00 +2024-04-13 18:21:59,179: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:21:59 +2024-04-13 18:21:59,179: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:59,179: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:21:59,180: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:21:59,180: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:21:59,180: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:01,296: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:01,297: root: INFO: Current backtesting datetime 2021-04-28 15:00:00-05:00 +2024-04-13 18:22:01,297: root: INFO: Current backtesting datetime 2021-04-29 08:30:00-05:00 +2024-04-13 18:22:01,298: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:01 +2024-04-13 18:22:01,298: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:01,299: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:01,299: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:01,299: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:01,299: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:02,928: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:02,930: root: INFO: Current backtesting datetime 2021-04-29 15:00:00-05:00 +2024-04-13 18:22:02,930: root: INFO: Current backtesting datetime 2021-04-30 08:30:00-05:00 +2024-04-13 18:22:02,931: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:02 +2024-04-13 18:22:02,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:02,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:02,932: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:02,932: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:02,932: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:04,710: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:04,711: root: INFO: Current backtesting datetime 2021-04-30 15:00:00-05:00 +2024-04-13 18:22:04,712: root: INFO: Current backtesting datetime 2021-05-01 08:30:00-05:00 +2024-04-13 18:22:04,712: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:04,714: root: INFO: Current backtesting datetime 2021-05-01 08:29:00-05:00 +2024-04-13 18:22:04,715: root: INFO: Current backtesting datetime 2021-05-01 08:29:00-05:00 +2024-04-13 18:22:04,715: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:04,716: root: INFO: Current backtesting datetime 2021-05-03 07:30:00-05:00 +2024-04-13 18:22:04,716: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:04,717: root: INFO: Current backtesting datetime 2021-05-03 08:30:00-05:00 +2024-04-13 18:22:04,717: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:04,718: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:04 +2024-04-13 18:22:04,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:04,719: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:04,719: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:04,720: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:04,720: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:05,765: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:05,767: root: INFO: Current backtesting datetime 2021-05-03 15:00:00-05:00 +2024-04-13 18:22:05,767: root: INFO: Current backtesting datetime 2021-05-04 08:30:00-05:00 +2024-04-13 18:22:05,767: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:05 +2024-04-13 18:22:05,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:05,768: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:05,768: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:05,769: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:05,769: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:06,532: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:06,534: root: INFO: Current backtesting datetime 2021-05-04 15:00:00-05:00 +2024-04-13 18:22:06,534: root: INFO: Current backtesting datetime 2021-05-05 08:30:00-05:00 +2024-04-13 18:22:06,534: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:06 +2024-04-13 18:22:06,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:06,535: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:06,535: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:06,536: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:06,536: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:07,103: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:07,104: root: INFO: Current backtesting datetime 2021-05-05 15:00:00-05:00 +2024-04-13 18:22:07,104: root: INFO: Current backtesting datetime 2021-05-06 08:30:00-05:00 +2024-04-13 18:22:07,105: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:07 +2024-04-13 18:22:07,105: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:07,105: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:07,106: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:07,106: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:07,106: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:07,876: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:07,877: root: INFO: Current backtesting datetime 2021-05-06 15:00:00-05:00 +2024-04-13 18:22:07,877: root: INFO: Current backtesting datetime 2021-05-07 08:30:00-05:00 +2024-04-13 18:22:07,877: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:07 +2024-04-13 18:22:07,878: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:07,878: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:07,878: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:07,879: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:07,879: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:08,570: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:08,571: root: INFO: Current backtesting datetime 2021-05-07 15:00:00-05:00 +2024-04-13 18:22:08,571: root: INFO: Current backtesting datetime 2021-05-08 08:30:00-05:00 +2024-04-13 18:22:08,572: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:08,573: root: INFO: Current backtesting datetime 2021-05-08 08:29:00-05:00 +2024-04-13 18:22:08,574: root: INFO: Current backtesting datetime 2021-05-08 08:29:00-05:00 +2024-04-13 18:22:08,575: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:08,575: root: INFO: Current backtesting datetime 2021-05-10 07:30:00-05:00 +2024-04-13 18:22:08,576: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:08,577: root: INFO: Current backtesting datetime 2021-05-10 08:30:00-05:00 +2024-04-13 18:22:08,577: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:08,578: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:08 +2024-04-13 18:22:08,578: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:08,579: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:08,579: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:08,579: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:08,579: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:09,306: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:09,307: root: INFO: Current backtesting datetime 2021-05-10 15:00:00-05:00 +2024-04-13 18:22:09,308: root: INFO: Current backtesting datetime 2021-05-11 08:30:00-05:00 +2024-04-13 18:22:09,308: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:09 +2024-04-13 18:22:09,308: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:09,309: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:09,309: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:09,310: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:09,310: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:09,883: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:09,884: root: INFO: Current backtesting datetime 2021-05-11 15:00:00-05:00 +2024-04-13 18:22:09,884: root: INFO: Current backtesting datetime 2021-05-12 08:30:00-05:00 +2024-04-13 18:22:09,885: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:09 +2024-04-13 18:22:09,885: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:09,886: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:09,886: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:09,887: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:09,887: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:10,467: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:10,468: root: INFO: Current backtesting datetime 2021-05-12 15:00:00-05:00 +2024-04-13 18:22:10,468: root: INFO: Current backtesting datetime 2021-05-13 08:30:00-05:00 +2024-04-13 18:22:10,468: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:10 +2024-04-13 18:22:10,469: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:10,469: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:10,470: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:10,470: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:10,470: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:11,453: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:11,454: root: INFO: Current backtesting datetime 2021-05-13 15:00:00-05:00 +2024-04-13 18:22:11,455: root: INFO: Current backtesting datetime 2021-05-14 08:30:00-05:00 +2024-04-13 18:22:11,455: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:11 +2024-04-13 18:22:11,455: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:11,456: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:11,456: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:11,457: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:11,457: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:12,605: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:12,606: root: INFO: Current backtesting datetime 2021-05-14 15:00:00-05:00 +2024-04-13 18:22:12,606: root: INFO: Current backtesting datetime 2021-05-15 08:30:00-05:00 +2024-04-13 18:22:12,607: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:12,608: root: INFO: Current backtesting datetime 2021-05-15 08:29:00-05:00 +2024-04-13 18:22:12,610: root: INFO: Current backtesting datetime 2021-05-15 08:29:00-05:00 +2024-04-13 18:22:12,610: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:12,610: root: INFO: Current backtesting datetime 2021-05-17 07:30:00-05:00 +2024-04-13 18:22:12,611: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:12,612: root: INFO: Current backtesting datetime 2021-05-17 08:30:00-05:00 +2024-04-13 18:22:12,612: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:12,613: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:12 +2024-04-13 18:22:12,613: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:12,614: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:12,614: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:12,615: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:12,615: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:13,696: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:13,697: root: INFO: Current backtesting datetime 2021-05-17 15:00:00-05:00 +2024-04-13 18:22:13,697: root: INFO: Current backtesting datetime 2021-05-18 08:30:00-05:00 +2024-04-13 18:22:13,698: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:13 +2024-04-13 18:22:13,698: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:13,698: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:13,699: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:13,699: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:13,699: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:14,591: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:14,592: root: INFO: Current backtesting datetime 2021-05-18 15:00:00-05:00 +2024-04-13 18:22:14,592: root: INFO: Current backtesting datetime 2021-05-19 08:30:00-05:00 +2024-04-13 18:22:14,593: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:14 +2024-04-13 18:22:14,593: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:14,594: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:14,594: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:14,594: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:14,594: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:15,422: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:15,423: root: INFO: Current backtesting datetime 2021-05-19 15:00:00-05:00 +2024-04-13 18:22:15,424: root: INFO: Current backtesting datetime 2021-05-20 08:30:00-05:00 +2024-04-13 18:22:15,424: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:15 +2024-04-13 18:22:15,424: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:15,425: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:15,425: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:15,426: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:15,426: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:15,962: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:15,962: root: INFO: Current backtesting datetime 2021-05-20 15:00:00-05:00 +2024-04-13 18:22:15,963: root: INFO: Current backtesting datetime 2021-05-21 08:30:00-05:00 +2024-04-13 18:22:15,964: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:15 +2024-04-13 18:22:15,964: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:15,964: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:15,965: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:15,965: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:15,965: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:16,710: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:16,711: root: INFO: Current backtesting datetime 2021-05-21 15:00:00-05:00 +2024-04-13 18:22:16,711: root: INFO: Current backtesting datetime 2021-05-22 08:30:00-05:00 +2024-04-13 18:22:16,711: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:16,713: root: INFO: Current backtesting datetime 2021-05-22 08:29:00-05:00 +2024-04-13 18:22:16,715: root: INFO: Current backtesting datetime 2021-05-22 08:29:00-05:00 +2024-04-13 18:22:16,715: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:16,715: root: INFO: Current backtesting datetime 2021-05-24 07:30:00-05:00 +2024-04-13 18:22:16,716: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:16,717: root: INFO: Current backtesting datetime 2021-05-24 08:30:00-05:00 +2024-04-13 18:22:16,717: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:16,718: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:16 +2024-04-13 18:22:16,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:16,719: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:16,719: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:16,719: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:16,719: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:17,578: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:17,579: root: INFO: Current backtesting datetime 2021-05-24 15:00:00-05:00 +2024-04-13 18:22:17,580: root: INFO: Current backtesting datetime 2021-05-25 08:30:00-05:00 +2024-04-13 18:22:17,580: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:17 +2024-04-13 18:22:17,580: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:17,581: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:17,581: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:17,582: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:17,582: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:18,527: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:18,527: root: INFO: Current backtesting datetime 2021-05-25 15:00:00-05:00 +2024-04-13 18:22:18,528: root: INFO: Current backtesting datetime 2021-05-26 08:30:00-05:00 +2024-04-13 18:22:18,528: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:18 +2024-04-13 18:22:18,528: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:18,529: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:18,529: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:18,530: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:18,530: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:19,569: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:19,570: root: INFO: Current backtesting datetime 2021-05-26 15:00:00-05:00 +2024-04-13 18:22:19,570: root: INFO: Current backtesting datetime 2021-05-27 08:30:00-05:00 +2024-04-13 18:22:19,570: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:19 +2024-04-13 18:22:19,570: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:19,571: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:19,571: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:19,572: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:19,572: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:20,578: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:20,579: root: INFO: Current backtesting datetime 2021-05-27 15:00:00-05:00 +2024-04-13 18:22:20,579: root: INFO: Current backtesting datetime 2021-05-28 08:30:00-05:00 +2024-04-13 18:22:20,579: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:20 +2024-04-13 18:22:20,579: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:20,580: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:20,580: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:20,581: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:20,581: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:21,532: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:21,533: root: INFO: Current backtesting datetime 2021-05-28 15:00:00-05:00 +2024-04-13 18:22:21,534: root: INFO: Current backtesting datetime 2021-05-29 08:30:00-05:00 +2024-04-13 18:22:21,534: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:21,536: root: INFO: Current backtesting datetime 2021-05-29 08:29:00-05:00 +2024-04-13 18:22:21,537: root: INFO: Current backtesting datetime 2021-05-29 08:29:00-05:00 +2024-04-13 18:22:21,537: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:21,538: root: INFO: Current backtesting datetime 2021-06-01 07:30:00-05:00 +2024-04-13 18:22:21,538: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:21,539: root: INFO: Current backtesting datetime 2021-06-01 08:30:00-05:00 +2024-04-13 18:22:21,539: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:21,540: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:21 +2024-04-13 18:22:21,540: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:21,541: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:21,541: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:21,542: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:21,542: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:22,639: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:22,640: root: INFO: Current backtesting datetime 2021-06-01 15:00:00-05:00 +2024-04-13 18:22:22,640: root: INFO: Current backtesting datetime 2021-06-02 08:30:00-05:00 +2024-04-13 18:22:22,640: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:22 +2024-04-13 18:22:22,640: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:22,641: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:22,641: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:22,642: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:22,642: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:23,793: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:23,794: root: INFO: Current backtesting datetime 2021-06-02 15:00:00-05:00 +2024-04-13 18:22:23,795: root: INFO: Current backtesting datetime 2021-06-03 08:30:00-05:00 +2024-04-13 18:22:23,795: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:23 +2024-04-13 18:22:23,795: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:23,796: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:23,796: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:23,797: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:23,797: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:24,553: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:24,554: root: INFO: Current backtesting datetime 2021-06-03 15:00:00-05:00 +2024-04-13 18:22:24,554: root: INFO: Current backtesting datetime 2021-06-04 08:30:00-05:00 +2024-04-13 18:22:24,555: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:24 +2024-04-13 18:22:24,555: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:24,556: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:24,556: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:24,556: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:24,556: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:25,468: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:25,469: root: INFO: Current backtesting datetime 2021-06-04 15:00:00-05:00 +2024-04-13 18:22:25,469: root: INFO: Current backtesting datetime 2021-06-05 08:30:00-05:00 +2024-04-13 18:22:25,470: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:25,471: root: INFO: Current backtesting datetime 2021-06-05 08:29:00-05:00 +2024-04-13 18:22:25,472: root: INFO: Current backtesting datetime 2021-06-05 08:29:00-05:00 +2024-04-13 18:22:25,472: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:25,473: root: INFO: Current backtesting datetime 2021-06-07 07:30:00-05:00 +2024-04-13 18:22:25,474: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:25,474: root: INFO: Current backtesting datetime 2021-06-07 08:30:00-05:00 +2024-04-13 18:22:25,475: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:25,476: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:25 +2024-04-13 18:22:25,476: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:25,476: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:25,477: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:25,477: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:25,477: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:26,525: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:26,526: root: INFO: Current backtesting datetime 2021-06-07 15:00:00-05:00 +2024-04-13 18:22:26,527: root: INFO: Current backtesting datetime 2021-06-08 08:30:00-05:00 +2024-04-13 18:22:26,527: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:26 +2024-04-13 18:22:26,527: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:26,528: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:26,528: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:26,529: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:26,529: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:27,691: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:27,692: root: INFO: Current backtesting datetime 2021-06-08 15:00:00-05:00 +2024-04-13 18:22:27,692: root: INFO: Current backtesting datetime 2021-06-09 08:30:00-05:00 +2024-04-13 18:22:27,692: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:27 +2024-04-13 18:22:27,693: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:27,693: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:27,694: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:27,694: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:27,694: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:28,716: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:28,717: root: INFO: Current backtesting datetime 2021-06-09 15:00:00-05:00 +2024-04-13 18:22:28,717: root: INFO: Current backtesting datetime 2021-06-10 08:30:00-05:00 +2024-04-13 18:22:28,717: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:28 +2024-04-13 18:22:28,717: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:28,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:28,718: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:28,719: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:28,719: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:29,680: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:29,681: root: INFO: Current backtesting datetime 2021-06-10 15:00:00-05:00 +2024-04-13 18:22:29,681: root: INFO: Current backtesting datetime 2021-06-11 08:30:00-05:00 +2024-04-13 18:22:29,682: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:29 +2024-04-13 18:22:29,682: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:29,683: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:29,683: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:29,683: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:29,684: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:30,721: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:30,722: root: INFO: Current backtesting datetime 2021-06-11 15:00:00-05:00 +2024-04-13 18:22:30,722: root: INFO: Current backtesting datetime 2021-06-12 08:30:00-05:00 +2024-04-13 18:22:30,723: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:30,724: root: INFO: Current backtesting datetime 2021-06-12 08:29:00-05:00 +2024-04-13 18:22:30,725: root: INFO: Current backtesting datetime 2021-06-12 08:29:00-05:00 +2024-04-13 18:22:30,725: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:30,726: root: INFO: Current backtesting datetime 2021-06-14 07:30:00-05:00 +2024-04-13 18:22:30,726: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:30,727: root: INFO: Current backtesting datetime 2021-06-14 08:30:00-05:00 +2024-04-13 18:22:30,727: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:30,728: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:30 +2024-04-13 18:22:30,728: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:30,729: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:30,729: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:30,730: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:30,730: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:31,817: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:31,818: root: INFO: Current backtesting datetime 2021-06-14 15:00:00-05:00 +2024-04-13 18:22:31,818: root: INFO: Current backtesting datetime 2021-06-15 08:30:00-05:00 +2024-04-13 18:22:31,819: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:31 +2024-04-13 18:22:31,819: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:31,819: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:31,820: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:31,820: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:31,820: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:33,566: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:33,567: root: INFO: Current backtesting datetime 2021-06-15 15:00:00-05:00 +2024-04-13 18:22:33,567: root: INFO: Current backtesting datetime 2021-06-16 08:30:00-05:00 +2024-04-13 18:22:33,568: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:33 +2024-04-13 18:22:33,568: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:33,569: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:33,569: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:33,570: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:33,570: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:34,863: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:34,864: root: INFO: Current backtesting datetime 2021-06-16 15:00:00-05:00 +2024-04-13 18:22:34,865: root: INFO: Current backtesting datetime 2021-06-17 08:30:00-05:00 +2024-04-13 18:22:34,865: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:34 +2024-04-13 18:22:34,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:34,866: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:34,866: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:34,867: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:34,867: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:35,997: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:35,998: root: INFO: Current backtesting datetime 2021-06-17 15:00:00-05:00 +2024-04-13 18:22:35,998: root: INFO: Current backtesting datetime 2021-06-18 08:30:00-05:00 +2024-04-13 18:22:35,999: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:35 +2024-04-13 18:22:35,999: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:36,000: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:36,001: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:36,002: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:36,002: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:38,084: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:38,085: root: INFO: Current backtesting datetime 2021-06-18 15:00:00-05:00 +2024-04-13 18:22:38,085: root: INFO: Current backtesting datetime 2021-06-19 08:30:00-05:00 +2024-04-13 18:22:38,086: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:38,087: root: INFO: Current backtesting datetime 2021-06-19 08:29:00-05:00 +2024-04-13 18:22:38,088: root: INFO: Current backtesting datetime 2021-06-19 08:29:00-05:00 +2024-04-13 18:22:38,089: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:38,089: root: INFO: Current backtesting datetime 2021-06-21 07:30:00-05:00 +2024-04-13 18:22:38,090: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:38,091: root: INFO: Current backtesting datetime 2021-06-21 08:30:00-05:00 +2024-04-13 18:22:38,091: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:38,092: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:38 +2024-04-13 18:22:38,092: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:38,093: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:38,093: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:38,093: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:38,093: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:39,690: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:39,691: root: INFO: Current backtesting datetime 2021-06-21 15:00:00-05:00 +2024-04-13 18:22:39,691: root: INFO: Current backtesting datetime 2021-06-22 08:30:00-05:00 +2024-04-13 18:22:39,692: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:39 +2024-04-13 18:22:39,692: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:39,693: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:39,693: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:39,694: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:39,694: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:40,661: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:40,662: root: INFO: Current backtesting datetime 2021-06-22 15:00:00-05:00 +2024-04-13 18:22:40,662: root: INFO: Current backtesting datetime 2021-06-23 08:30:00-05:00 +2024-04-13 18:22:40,662: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:40 +2024-04-13 18:22:40,662: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:40,663: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:40,663: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:40,664: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:40,664: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:41,671: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:41,672: root: INFO: Current backtesting datetime 2021-06-23 15:00:00-05:00 +2024-04-13 18:22:41,673: root: INFO: Current backtesting datetime 2021-06-24 08:30:00-05:00 +2024-04-13 18:22:41,673: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:41 +2024-04-13 18:22:41,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:41,674: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:41,675: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:41,675: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:41,675: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:42,827: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:42,828: root: INFO: Current backtesting datetime 2021-06-24 15:00:00-05:00 +2024-04-13 18:22:42,828: root: INFO: Current backtesting datetime 2021-06-25 08:30:00-05:00 +2024-04-13 18:22:42,829: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:42 +2024-04-13 18:22:42,829: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:42,830: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:42,830: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:42,830: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:42,830: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:43,734: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:43,735: root: INFO: Current backtesting datetime 2021-06-25 15:00:00-05:00 +2024-04-13 18:22:43,735: root: INFO: Current backtesting datetime 2021-06-26 08:30:00-05:00 +2024-04-13 18:22:43,736: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:43,737: root: INFO: Current backtesting datetime 2021-06-26 08:29:00-05:00 +2024-04-13 18:22:43,738: root: INFO: Current backtesting datetime 2021-06-26 08:29:00-05:00 +2024-04-13 18:22:43,738: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:43,739: root: INFO: Current backtesting datetime 2021-06-28 07:30:00-05:00 +2024-04-13 18:22:43,739: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:43,740: root: INFO: Current backtesting datetime 2021-06-28 08:30:00-05:00 +2024-04-13 18:22:43,740: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:43,741: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:43 +2024-04-13 18:22:43,741: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:43,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:43,742: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:43,743: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:43,743: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:44,766: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:44,767: root: INFO: Current backtesting datetime 2021-06-28 15:00:00-05:00 +2024-04-13 18:22:44,767: root: INFO: Current backtesting datetime 2021-06-29 08:30:00-05:00 +2024-04-13 18:22:44,768: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:44 +2024-04-13 18:22:44,768: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:44,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:44,769: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:44,770: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:44,770: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:46,731: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:46,732: root: INFO: Current backtesting datetime 2021-06-29 15:00:00-05:00 +2024-04-13 18:22:46,733: root: INFO: Current backtesting datetime 2021-06-30 08:30:00-05:00 +2024-04-13 18:22:46,733: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:46 +2024-04-13 18:22:46,733: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:46,734: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:46,735: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:46,735: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:46,735: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:49,031: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:49,032: root: INFO: Current backtesting datetime 2021-06-30 15:00:00-05:00 +2024-04-13 18:22:49,032: root: INFO: Current backtesting datetime 2021-07-01 08:30:00-05:00 +2024-04-13 18:22:49,032: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:49 +2024-04-13 18:22:49,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:49,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:49,034: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:49,034: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:49,034: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:50,554: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:50,556: root: INFO: Current backtesting datetime 2021-07-01 15:00:00-05:00 +2024-04-13 18:22:50,556: root: INFO: Current backtesting datetime 2021-07-02 08:30:00-05:00 +2024-04-13 18:22:50,556: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:50 +2024-04-13 18:22:50,556: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:50,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:50,557: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:50,558: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:50,558: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:51,402: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:51,403: root: INFO: Current backtesting datetime 2021-07-02 15:00:00-05:00 +2024-04-13 18:22:51,403: root: INFO: Current backtesting datetime 2021-07-03 08:30:00-05:00 +2024-04-13 18:22:51,404: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:51,405: root: INFO: Current backtesting datetime 2021-07-03 08:29:00-05:00 +2024-04-13 18:22:51,407: root: INFO: Current backtesting datetime 2021-07-03 08:29:00-05:00 +2024-04-13 18:22:51,407: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:51,408: root: INFO: Current backtesting datetime 2021-07-06 07:30:00-05:00 +2024-04-13 18:22:51,408: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:51,409: root: INFO: Current backtesting datetime 2021-07-06 08:30:00-05:00 +2024-04-13 18:22:51,409: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:51,410: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:51 +2024-04-13 18:22:51,411: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:51,411: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:51,412: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:51,412: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:51,412: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:52,177: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:52,177: root: INFO: Current backtesting datetime 2021-07-06 15:00:00-05:00 +2024-04-13 18:22:52,178: root: INFO: Current backtesting datetime 2021-07-07 08:30:00-05:00 +2024-04-13 18:22:52,179: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:52 +2024-04-13 18:22:52,179: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:52,179: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:52,180: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:52,180: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:52,180: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:53,678: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:53,679: root: INFO: Current backtesting datetime 2021-07-07 15:00:00-05:00 +2024-04-13 18:22:53,679: root: INFO: Current backtesting datetime 2021-07-08 08:30:00-05:00 +2024-04-13 18:22:53,680: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:53 +2024-04-13 18:22:53,680: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:53,680: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:53,681: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:53,681: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:53,681: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:54,901: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:54,902: root: INFO: Current backtesting datetime 2021-07-08 15:00:00-05:00 +2024-04-13 18:22:54,903: root: INFO: Current backtesting datetime 2021-07-09 08:30:00-05:00 +2024-04-13 18:22:54,903: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:54 +2024-04-13 18:22:54,904: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:54,904: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:54,905: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:54,905: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:54,906: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:55,952: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:55,953: root: INFO: Current backtesting datetime 2021-07-09 15:00:00-05:00 +2024-04-13 18:22:55,954: root: INFO: Current backtesting datetime 2021-07-10 08:30:00-05:00 +2024-04-13 18:22:55,954: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:22:55,955: root: INFO: Current backtesting datetime 2021-07-10 08:29:00-05:00 +2024-04-13 18:22:55,956: root: INFO: Current backtesting datetime 2021-07-10 08:29:00-05:00 +2024-04-13 18:22:55,956: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:22:55,957: root: INFO: Current backtesting datetime 2021-07-12 07:30:00-05:00 +2024-04-13 18:22:55,958: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:22:55,959: root: INFO: Current backtesting datetime 2021-07-12 08:30:00-05:00 +2024-04-13 18:22:55,959: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:22:55,960: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:55 +2024-04-13 18:22:55,960: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:55,961: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:55,961: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:55,961: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:55,961: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:57,092: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:57,093: root: INFO: Current backtesting datetime 2021-07-12 15:00:00-05:00 +2024-04-13 18:22:57,093: root: INFO: Current backtesting datetime 2021-07-13 08:30:00-05:00 +2024-04-13 18:22:57,093: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:57 +2024-04-13 18:22:57,094: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:57,094: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:57,095: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:57,095: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:57,095: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:58,120: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:58,121: root: INFO: Current backtesting datetime 2021-07-13 15:00:00-05:00 +2024-04-13 18:22:58,121: root: INFO: Current backtesting datetime 2021-07-14 08:30:00-05:00 +2024-04-13 18:22:58,122: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:58 +2024-04-13 18:22:58,122: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:58,123: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:58,123: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:58,123: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:58,123: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:58,856: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:58,857: root: INFO: Current backtesting datetime 2021-07-14 15:00:00-05:00 +2024-04-13 18:22:58,857: root: INFO: Current backtesting datetime 2021-07-15 08:30:00-05:00 +2024-04-13 18:22:58,857: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:58 +2024-04-13 18:22:58,857: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:58,858: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:58,858: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:58,859: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:58,859: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:22:59,634: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:22:59,635: root: INFO: Current backtesting datetime 2021-07-15 15:00:00-05:00 +2024-04-13 18:22:59,635: root: INFO: Current backtesting datetime 2021-07-16 08:30:00-05:00 +2024-04-13 18:22:59,635: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:22:59 +2024-04-13 18:22:59,636: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:59,636: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:22:59,637: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:22:59,637: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:22:59,637: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:00,770: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:00,772: root: INFO: Current backtesting datetime 2021-07-16 15:00:00-05:00 +2024-04-13 18:23:00,772: root: INFO: Current backtesting datetime 2021-07-17 08:30:00-05:00 +2024-04-13 18:23:00,772: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:23:00,774: root: INFO: Current backtesting datetime 2021-07-17 08:29:00-05:00 +2024-04-13 18:23:00,775: root: INFO: Current backtesting datetime 2021-07-17 08:29:00-05:00 +2024-04-13 18:23:00,775: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:23:00,776: root: INFO: Current backtesting datetime 2021-07-19 07:30:00-05:00 +2024-04-13 18:23:00,776: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:23:00,777: root: INFO: Current backtesting datetime 2021-07-19 08:30:00-05:00 +2024-04-13 18:23:00,777: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:23:00,778: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:00 +2024-04-13 18:23:00,778: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:00,779: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:00,779: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:00,780: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:00,780: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:01,804: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:01,805: root: INFO: Current backtesting datetime 2021-07-19 15:00:00-05:00 +2024-04-13 18:23:01,805: root: INFO: Current backtesting datetime 2021-07-20 08:30:00-05:00 +2024-04-13 18:23:01,806: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:01 +2024-04-13 18:23:01,806: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:01,807: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:01,807: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:01,808: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:01,808: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:02,928: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:02,929: root: INFO: Current backtesting datetime 2021-07-20 15:00:00-05:00 +2024-04-13 18:23:02,930: root: INFO: Current backtesting datetime 2021-07-21 08:30:00-05:00 +2024-04-13 18:23:02,930: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:02 +2024-04-13 18:23:02,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:02,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:02,931: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:02,932: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:02,932: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:04,239: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:04,240: root: INFO: Current backtesting datetime 2021-07-21 15:00:00-05:00 +2024-04-13 18:23:04,240: root: INFO: Current backtesting datetime 2021-07-22 08:30:00-05:00 +2024-04-13 18:23:04,241: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:04 +2024-04-13 18:23:04,241: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:04,242: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:04,242: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:04,243: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:04,243: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:05,733: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:05,734: root: INFO: Current backtesting datetime 2021-07-22 15:00:00-05:00 +2024-04-13 18:23:05,734: root: INFO: Current backtesting datetime 2021-07-23 08:30:00-05:00 +2024-04-13 18:23:05,735: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:05 +2024-04-13 18:23:05,735: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:05,736: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:05,736: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:05,736: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:05,736: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:07,370: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:07,371: root: INFO: Current backtesting datetime 2021-07-23 15:00:00-05:00 +2024-04-13 18:23:07,371: root: INFO: Current backtesting datetime 2021-07-24 08:30:00-05:00 +2024-04-13 18:23:07,372: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:23:07,373: root: INFO: Current backtesting datetime 2021-07-24 08:29:00-05:00 +2024-04-13 18:23:07,374: root: INFO: Current backtesting datetime 2021-07-24 08:29:00-05:00 +2024-04-13 18:23:07,374: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:23:07,375: root: INFO: Current backtesting datetime 2021-07-26 07:30:00-05:00 +2024-04-13 18:23:07,376: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:23:07,377: root: INFO: Current backtesting datetime 2021-07-26 08:30:00-05:00 +2024-04-13 18:23:07,377: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:23:07,377: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:07 +2024-04-13 18:23:07,378: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:07,378: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:07,379: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:07,379: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:07,379: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:08,438: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:08,439: root: INFO: Current backtesting datetime 2021-07-26 15:00:00-05:00 +2024-04-13 18:23:08,439: root: INFO: Current backtesting datetime 2021-07-27 08:30:00-05:00 +2024-04-13 18:23:08,439: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:08 +2024-04-13 18:23:08,439: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:08,441: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:08,441: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:08,442: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:08,442: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:09,545: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:09,546: root: INFO: Current backtesting datetime 2021-07-27 15:00:00-05:00 +2024-04-13 18:23:09,546: root: INFO: Current backtesting datetime 2021-07-28 08:30:00-05:00 +2024-04-13 18:23:09,547: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:09 +2024-04-13 18:23:09,547: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:09,547: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:09,548: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:09,548: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:09,548: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:10,191: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:10,192: root: INFO: Current backtesting datetime 2021-07-28 15:00:00-05:00 +2024-04-13 18:23:10,192: root: INFO: Current backtesting datetime 2021-07-29 08:30:00-05:00 +2024-04-13 18:23:10,193: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:10 +2024-04-13 18:23:10,193: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:10,193: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:10,194: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:10,194: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:10,194: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:12,726: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:12,727: root: INFO: Current backtesting datetime 2021-07-29 15:00:00-05:00 +2024-04-13 18:23:12,728: root: INFO: Current backtesting datetime 2021-07-30 08:30:00-05:00 +2024-04-13 18:23:12,728: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:12 +2024-04-13 18:23:12,728: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:12,729: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:12,729: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:12,730: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:12,730: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:14,022: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:14,023: root: INFO: Current backtesting datetime 2021-07-30 15:00:00-05:00 +2024-04-13 18:23:14,023: root: INFO: Current backtesting datetime 2021-07-31 08:30:00-05:00 +2024-04-13 18:23:14,024: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:23:14,025: root: INFO: Current backtesting datetime 2021-07-31 08:29:00-05:00 +2024-04-13 18:23:14,026: root: INFO: Current backtesting datetime 2021-07-31 08:29:00-05:00 +2024-04-13 18:23:14,026: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:23:14,027: root: INFO: Current backtesting datetime 2021-08-02 07:30:00-05:00 +2024-04-13 18:23:14,028: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:23:14,029: root: INFO: Current backtesting datetime 2021-08-02 08:30:00-05:00 +2024-04-13 18:23:14,029: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:23:14,030: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:14 +2024-04-13 18:23:14,030: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:14,031: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:14,031: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:14,031: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:14,031: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:15,870: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:15,870: root: INFO: Current backtesting datetime 2021-08-02 15:00:00-05:00 +2024-04-13 18:23:15,871: root: INFO: Current backtesting datetime 2021-08-03 08:30:00-05:00 +2024-04-13 18:23:15,871: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:15 +2024-04-13 18:23:15,871: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:15,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:15,872: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:15,873: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:15,873: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:16,937: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:16,938: root: INFO: Current backtesting datetime 2021-08-03 15:00:00-05:00 +2024-04-13 18:23:16,938: root: INFO: Current backtesting datetime 2021-08-04 08:30:00-05:00 +2024-04-13 18:23:16,939: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:16 +2024-04-13 18:23:16,939: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:16,940: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:16,940: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:16,940: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:16,940: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:18,275: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:18,276: root: INFO: Current backtesting datetime 2021-08-04 15:00:00-05:00 +2024-04-13 18:23:18,276: root: INFO: Current backtesting datetime 2021-08-05 08:30:00-05:00 +2024-04-13 18:23:18,276: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:18 +2024-04-13 18:23:18,276: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:18,277: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:18,277: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:18,278: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:18,278: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:20,397: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:20,398: root: INFO: Current backtesting datetime 2021-08-05 15:00:00-05:00 +2024-04-13 18:23:20,398: root: INFO: Current backtesting datetime 2021-08-06 08:30:00-05:00 +2024-04-13 18:23:20,398: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:20 +2024-04-13 18:23:20,398: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:20,400: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:20,400: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:20,400: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:20,400: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:21,652: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:21,653: root: INFO: Current backtesting datetime 2021-08-06 15:00:00-05:00 +2024-04-13 18:23:21,654: root: INFO: Current backtesting datetime 2021-08-07 08:30:00-05:00 +2024-04-13 18:23:21,654: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:23:21,656: root: INFO: Current backtesting datetime 2021-08-07 08:29:00-05:00 +2024-04-13 18:23:21,656: root: INFO: Current backtesting datetime 2021-08-07 08:29:00-05:00 +2024-04-13 18:23:21,656: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:23:21,657: root: INFO: Current backtesting datetime 2021-08-09 07:30:00-05:00 +2024-04-13 18:23:21,658: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:23:21,659: root: INFO: Current backtesting datetime 2021-08-09 08:30:00-05:00 +2024-04-13 18:23:21,659: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:23:21,660: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:21 +2024-04-13 18:23:21,660: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:21,661: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:21,661: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:21,661: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:21,661: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:24,255: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:24,256: root: INFO: Current backtesting datetime 2021-08-09 15:00:00-05:00 +2024-04-13 18:23:24,257: root: INFO: Current backtesting datetime 2021-08-10 08:30:00-05:00 +2024-04-13 18:23:24,257: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:24 +2024-04-13 18:23:24,257: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:24,258: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:24,258: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:24,259: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:24,259: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:26,049: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:26,050: root: INFO: Current backtesting datetime 2021-08-10 15:00:00-05:00 +2024-04-13 18:23:26,051: root: INFO: Current backtesting datetime 2021-08-11 08:30:00-05:00 +2024-04-13 18:23:26,051: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:26 +2024-04-13 18:23:26,051: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:26,052: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:26,052: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:26,053: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:26,053: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:28,379: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:28,379: root: INFO: Current backtesting datetime 2021-08-11 15:00:00-05:00 +2024-04-13 18:23:28,380: root: INFO: Current backtesting datetime 2021-08-12 08:30:00-05:00 +2024-04-13 18:23:28,380: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:28 +2024-04-13 18:23:28,380: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:28,381: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:28,381: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:28,382: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:28,382: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:29,576: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:29,577: root: INFO: Current backtesting datetime 2021-08-12 15:00:00-05:00 +2024-04-13 18:23:29,577: root: INFO: Current backtesting datetime 2021-08-13 08:30:00-05:00 +2024-04-13 18:23:29,578: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:29 +2024-04-13 18:23:29,578: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:29,579: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:29,579: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:29,579: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:29,579: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:30,874: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:30,875: root: INFO: Current backtesting datetime 2021-08-13 15:00:00-05:00 +2024-04-13 18:23:30,875: root: INFO: Current backtesting datetime 2021-08-14 08:30:00-05:00 +2024-04-13 18:23:30,875: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:23:30,876: root: INFO: Current backtesting datetime 2021-08-14 08:29:00-05:00 +2024-04-13 18:23:30,878: root: INFO: Current backtesting datetime 2021-08-14 08:29:00-05:00 +2024-04-13 18:23:30,878: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:23:30,878: root: INFO: Current backtesting datetime 2021-08-16 07:30:00-05:00 +2024-04-13 18:23:30,879: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:23:30,880: root: INFO: Current backtesting datetime 2021-08-16 08:30:00-05:00 +2024-04-13 18:23:30,880: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:23:30,881: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:30 +2024-04-13 18:23:30,881: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:30,882: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:30,882: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:30,882: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:30,882: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:32,182: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:32,184: root: INFO: Current backtesting datetime 2021-08-16 15:00:00-05:00 +2024-04-13 18:23:32,184: root: INFO: Current backtesting datetime 2021-08-17 08:30:00-05:00 +2024-04-13 18:23:32,184: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:32 +2024-04-13 18:23:32,184: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:32,185: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:32,185: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:32,186: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:32,186: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:33,719: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:33,720: root: INFO: Current backtesting datetime 2021-08-17 15:00:00-05:00 +2024-04-13 18:23:33,720: root: INFO: Current backtesting datetime 2021-08-18 08:30:00-05:00 +2024-04-13 18:23:33,721: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:33 +2024-04-13 18:23:33,721: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:33,721: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:33,722: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:33,722: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:33,722: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:34,658: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:34,659: root: INFO: Current backtesting datetime 2021-08-18 15:00:00-05:00 +2024-04-13 18:23:34,660: root: INFO: Current backtesting datetime 2021-08-19 08:30:00-05:00 +2024-04-13 18:23:34,660: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:34 +2024-04-13 18:23:34,660: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:34,661: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:34,661: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:34,662: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:34,662: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:35,662: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:35,663: root: INFO: Current backtesting datetime 2021-08-19 15:00:00-05:00 +2024-04-13 18:23:35,663: root: INFO: Current backtesting datetime 2021-08-20 08:30:00-05:00 +2024-04-13 18:23:35,664: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:35 +2024-04-13 18:23:35,664: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:35,665: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:35,665: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:35,665: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:35,665: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:36,739: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:36,740: root: INFO: Current backtesting datetime 2021-08-20 15:00:00-05:00 +2024-04-13 18:23:36,741: root: INFO: Current backtesting datetime 2021-08-21 08:30:00-05:00 +2024-04-13 18:23:36,741: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:23:36,743: root: INFO: Current backtesting datetime 2021-08-21 08:29:00-05:00 +2024-04-13 18:23:36,744: root: INFO: Current backtesting datetime 2021-08-21 08:29:00-05:00 +2024-04-13 18:23:36,744: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:23:36,745: root: INFO: Current backtesting datetime 2021-08-23 07:30:00-05:00 +2024-04-13 18:23:36,745: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:23:36,746: root: INFO: Current backtesting datetime 2021-08-23 08:30:00-05:00 +2024-04-13 18:23:36,746: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:23:36,747: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:36 +2024-04-13 18:23:36,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:36,748: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:36,748: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:36,749: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:36,749: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:38,058: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:38,059: root: INFO: Current backtesting datetime 2021-08-23 15:00:00-05:00 +2024-04-13 18:23:38,060: root: INFO: Current backtesting datetime 2021-08-24 08:30:00-05:00 +2024-04-13 18:23:38,060: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:38 +2024-04-13 18:23:38,060: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:38,061: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:38,061: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:38,061: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:38,062: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:39,219: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:39,219: root: INFO: Current backtesting datetime 2021-08-24 15:00:00-05:00 +2024-04-13 18:23:39,220: root: INFO: Current backtesting datetime 2021-08-25 08:30:00-05:00 +2024-04-13 18:23:39,220: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:39 +2024-04-13 18:23:39,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:39,221: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:39,221: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:39,222: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:39,222: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:40,284: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:40,285: root: INFO: Current backtesting datetime 2021-08-25 15:00:00-05:00 +2024-04-13 18:23:40,285: root: INFO: Current backtesting datetime 2021-08-26 08:30:00-05:00 +2024-04-13 18:23:40,285: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:40 +2024-04-13 18:23:40,285: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:40,286: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:40,286: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:40,287: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:40,287: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:41,740: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:41,741: root: INFO: Current backtesting datetime 2021-08-26 15:00:00-05:00 +2024-04-13 18:23:41,741: root: INFO: Current backtesting datetime 2021-08-27 08:30:00-05:00 +2024-04-13 18:23:41,742: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:41 +2024-04-13 18:23:41,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:41,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:41,743: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:41,743: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:41,744: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:43,434: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:43,435: root: INFO: Current backtesting datetime 2021-08-27 15:00:00-05:00 +2024-04-13 18:23:43,435: root: INFO: Current backtesting datetime 2021-08-28 08:30:00-05:00 +2024-04-13 18:23:43,436: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:23:43,437: root: INFO: Current backtesting datetime 2021-08-28 08:29:00-05:00 +2024-04-13 18:23:43,438: root: INFO: Current backtesting datetime 2021-08-28 08:29:00-05:00 +2024-04-13 18:23:43,439: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:23:43,439: root: INFO: Current backtesting datetime 2021-08-30 07:30:00-05:00 +2024-04-13 18:23:43,440: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:23:43,441: root: INFO: Current backtesting datetime 2021-08-30 08:30:00-05:00 +2024-04-13 18:23:43,441: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:23:43,442: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:43 +2024-04-13 18:23:43,442: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:43,443: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:43,443: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:43,443: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:43,444: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:44,421: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:44,422: root: INFO: Current backtesting datetime 2021-08-30 15:00:00-05:00 +2024-04-13 18:23:44,422: root: INFO: Current backtesting datetime 2021-08-31 08:30:00-05:00 +2024-04-13 18:23:44,423: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:44 +2024-04-13 18:23:44,423: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:44,424: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:44,424: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:44,424: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:44,424: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:45,790: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:45,791: root: INFO: Current backtesting datetime 2021-08-31 15:00:00-05:00 +2024-04-13 18:23:45,791: root: INFO: Current backtesting datetime 2021-09-01 08:30:00-05:00 +2024-04-13 18:23:45,792: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:45 +2024-04-13 18:23:45,792: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:45,793: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:45,793: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:45,794: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:45,794: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:47,341: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:47,342: root: INFO: Current backtesting datetime 2021-09-01 15:00:00-05:00 +2024-04-13 18:23:47,343: root: INFO: Current backtesting datetime 2021-09-02 08:30:00-05:00 +2024-04-13 18:23:47,343: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:47 +2024-04-13 18:23:47,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:47,344: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:47,344: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:47,345: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:47,345: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:49,533: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:49,534: root: INFO: Current backtesting datetime 2021-09-02 15:00:00-05:00 +2024-04-13 18:23:49,534: root: INFO: Current backtesting datetime 2021-09-03 08:30:00-05:00 +2024-04-13 18:23:49,534: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:49 +2024-04-13 18:23:49,535: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:49,535: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:49,536: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:49,536: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:49,536: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:50,880: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:50,881: root: INFO: Current backtesting datetime 2021-09-03 15:00:00-05:00 +2024-04-13 18:23:50,881: root: INFO: Current backtesting datetime 2021-09-04 08:30:00-05:00 +2024-04-13 18:23:50,882: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:23:50,883: root: INFO: Current backtesting datetime 2021-09-04 08:29:00-05:00 +2024-04-13 18:23:50,884: root: INFO: Current backtesting datetime 2021-09-04 08:29:00-05:00 +2024-04-13 18:23:50,884: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:23:50,885: root: INFO: Current backtesting datetime 2021-09-07 07:30:00-05:00 +2024-04-13 18:23:50,886: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:23:50,887: root: INFO: Current backtesting datetime 2021-09-07 08:30:00-05:00 +2024-04-13 18:23:50,887: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:23:50,888: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:50 +2024-04-13 18:23:50,888: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:50,889: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:50,889: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:50,889: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:50,889: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:51,861: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:51,862: root: INFO: Current backtesting datetime 2021-09-07 15:00:00-05:00 +2024-04-13 18:23:51,864: root: INFO: Current backtesting datetime 2021-09-08 08:30:00-05:00 +2024-04-13 18:23:51,864: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:51 +2024-04-13 18:23:51,864: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:51,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:51,865: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:51,866: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:51,866: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:53,258: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:53,259: root: INFO: Current backtesting datetime 2021-09-08 15:00:00-05:00 +2024-04-13 18:23:53,260: root: INFO: Current backtesting datetime 2021-09-09 08:30:00-05:00 +2024-04-13 18:23:53,260: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:53 +2024-04-13 18:23:53,260: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:53,261: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:53,261: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:53,262: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:53,262: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:54,621: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:54,622: root: INFO: Current backtesting datetime 2021-09-09 15:00:00-05:00 +2024-04-13 18:23:54,622: root: INFO: Current backtesting datetime 2021-09-10 08:30:00-05:00 +2024-04-13 18:23:54,623: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:54 +2024-04-13 18:23:54,623: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:54,623: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:54,624: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:54,624: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:54,624: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:55,644: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:55,645: root: INFO: Current backtesting datetime 2021-09-10 15:00:00-05:00 +2024-04-13 18:23:55,645: root: INFO: Current backtesting datetime 2021-09-11 08:30:00-05:00 +2024-04-13 18:23:55,645: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:23:55,647: root: INFO: Current backtesting datetime 2021-09-11 08:29:00-05:00 +2024-04-13 18:23:55,648: root: INFO: Current backtesting datetime 2021-09-11 08:29:00-05:00 +2024-04-13 18:23:55,648: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:23:55,649: root: INFO: Current backtesting datetime 2021-09-13 07:30:00-05:00 +2024-04-13 18:23:55,649: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:23:55,650: root: INFO: Current backtesting datetime 2021-09-13 08:30:00-05:00 +2024-04-13 18:23:55,650: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:23:55,651: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:55 +2024-04-13 18:23:55,651: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:55,652: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:55,652: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:55,653: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:55,653: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:56,665: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:56,666: root: INFO: Current backtesting datetime 2021-09-13 15:00:00-05:00 +2024-04-13 18:23:56,667: root: INFO: Current backtesting datetime 2021-09-14 08:30:00-05:00 +2024-04-13 18:23:56,667: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:56 +2024-04-13 18:23:56,667: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:56,668: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:56,668: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:56,668: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:56,669: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:57,706: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:57,707: root: INFO: Current backtesting datetime 2021-09-14 15:00:00-05:00 +2024-04-13 18:23:57,707: root: INFO: Current backtesting datetime 2021-09-15 08:30:00-05:00 +2024-04-13 18:23:57,708: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:57 +2024-04-13 18:23:57,708: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:57,709: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:57,709: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:57,709: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:57,710: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:58,580: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:58,581: root: INFO: Current backtesting datetime 2021-09-15 15:00:00-05:00 +2024-04-13 18:23:58,582: root: INFO: Current backtesting datetime 2021-09-16 08:30:00-05:00 +2024-04-13 18:23:58,582: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:58 +2024-04-13 18:23:58,582: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:58,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:58,583: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:58,584: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:58,584: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:23:59,774: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:23:59,775: root: INFO: Current backtesting datetime 2021-09-16 15:00:00-05:00 +2024-04-13 18:23:59,775: root: INFO: Current backtesting datetime 2021-09-17 08:30:00-05:00 +2024-04-13 18:23:59,776: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:23:59 +2024-04-13 18:23:59,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:59,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:23:59,776: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:23:59,777: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:23:59,777: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:01,440: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:01,441: root: INFO: Current backtesting datetime 2021-09-17 15:00:00-05:00 +2024-04-13 18:24:01,441: root: INFO: Current backtesting datetime 2021-09-18 08:30:00-05:00 +2024-04-13 18:24:01,441: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:24:01,443: root: INFO: Current backtesting datetime 2021-09-18 08:29:00-05:00 +2024-04-13 18:24:01,444: root: INFO: Current backtesting datetime 2021-09-18 08:29:00-05:00 +2024-04-13 18:24:01,444: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:24:01,445: root: INFO: Current backtesting datetime 2021-09-20 07:30:00-05:00 +2024-04-13 18:24:01,445: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:24:01,446: root: INFO: Current backtesting datetime 2021-09-20 08:30:00-05:00 +2024-04-13 18:24:01,446: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:24:01,447: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:01 +2024-04-13 18:24:01,448: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:01,448: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:01,449: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:01,449: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:01,449: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:02,610: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:02,611: root: INFO: Current backtesting datetime 2021-09-20 15:00:00-05:00 +2024-04-13 18:24:02,612: root: INFO: Current backtesting datetime 2021-09-21 08:30:00-05:00 +2024-04-13 18:24:02,612: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:02 +2024-04-13 18:24:02,612: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:02,613: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:02,613: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:02,614: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:02,614: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:03,681: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:03,682: root: INFO: Current backtesting datetime 2021-09-21 15:00:00-05:00 +2024-04-13 18:24:03,682: root: INFO: Current backtesting datetime 2021-09-22 08:30:00-05:00 +2024-04-13 18:24:03,683: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:03 +2024-04-13 18:24:03,683: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:03,683: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:03,684: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:03,684: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:03,684: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:05,444: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:05,445: root: INFO: Current backtesting datetime 2021-09-22 15:00:00-05:00 +2024-04-13 18:24:05,445: root: INFO: Current backtesting datetime 2021-09-23 08:30:00-05:00 +2024-04-13 18:24:05,445: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:05 +2024-04-13 18:24:05,446: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:05,446: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:05,447: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:05,447: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:05,447: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:06,873: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:06,874: root: INFO: Current backtesting datetime 2021-09-23 15:00:00-05:00 +2024-04-13 18:24:06,874: root: INFO: Current backtesting datetime 2021-09-24 08:30:00-05:00 +2024-04-13 18:24:06,874: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:06 +2024-04-13 18:24:06,875: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:06,875: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:06,875: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:06,876: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:06,876: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:08,013: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:08,014: root: INFO: Current backtesting datetime 2021-09-24 15:00:00-05:00 +2024-04-13 18:24:08,014: root: INFO: Current backtesting datetime 2021-09-25 08:30:00-05:00 +2024-04-13 18:24:08,014: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:24:08,016: root: INFO: Current backtesting datetime 2021-09-25 08:29:00-05:00 +2024-04-13 18:24:08,017: root: INFO: Current backtesting datetime 2021-09-25 08:29:00-05:00 +2024-04-13 18:24:08,017: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:24:08,018: root: INFO: Current backtesting datetime 2021-09-27 07:30:00-05:00 +2024-04-13 18:24:08,019: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:24:08,020: root: INFO: Current backtesting datetime 2021-09-27 08:30:00-05:00 +2024-04-13 18:24:08,020: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:24:08,021: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:08 +2024-04-13 18:24:08,021: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:08,022: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:08,022: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:08,022: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:08,022: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:09,424: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:09,425: root: INFO: Current backtesting datetime 2021-09-27 15:00:00-05:00 +2024-04-13 18:24:09,426: root: INFO: Current backtesting datetime 2021-09-28 08:30:00-05:00 +2024-04-13 18:24:09,426: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:09 +2024-04-13 18:24:09,426: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:09,427: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:09,427: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:09,428: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:09,428: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:11,823: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:11,824: root: INFO: Current backtesting datetime 2021-09-28 15:00:00-05:00 +2024-04-13 18:24:11,824: root: INFO: Current backtesting datetime 2021-09-29 08:30:00-05:00 +2024-04-13 18:24:11,824: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:11 +2024-04-13 18:24:11,825: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:11,825: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:11,826: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:11,826: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:11,826: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:13,436: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:13,437: root: INFO: Current backtesting datetime 2021-09-29 15:00:00-05:00 +2024-04-13 18:24:13,437: root: INFO: Current backtesting datetime 2021-09-30 08:30:00-05:00 +2024-04-13 18:24:13,438: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:13 +2024-04-13 18:24:13,438: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:13,439: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:13,439: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:13,439: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:13,439: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:14,919: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:14,920: root: INFO: Current backtesting datetime 2021-09-30 15:00:00-05:00 +2024-04-13 18:24:14,920: root: INFO: Current backtesting datetime 2021-10-01 08:30:00-05:00 +2024-04-13 18:24:14,921: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:14 +2024-04-13 18:24:14,921: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:14,921: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:14,921: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:14,923: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:14,923: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:16,283: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:16,284: root: INFO: Current backtesting datetime 2021-10-01 15:00:00-05:00 +2024-04-13 18:24:16,284: root: INFO: Current backtesting datetime 2021-10-02 08:30:00-05:00 +2024-04-13 18:24:16,285: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:24:16,286: root: INFO: Current backtesting datetime 2021-10-02 08:29:00-05:00 +2024-04-13 18:24:16,288: root: INFO: Current backtesting datetime 2021-10-02 08:29:00-05:00 +2024-04-13 18:24:16,288: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:24:16,288: root: INFO: Current backtesting datetime 2021-10-04 07:30:00-05:00 +2024-04-13 18:24:16,289: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:24:16,290: root: INFO: Current backtesting datetime 2021-10-04 08:30:00-05:00 +2024-04-13 18:24:16,290: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:24:16,291: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:16 +2024-04-13 18:24:16,291: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:16,292: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:16,292: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:16,293: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:16,293: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:17,760: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:17,761: root: INFO: Current backtesting datetime 2021-10-04 15:00:00-05:00 +2024-04-13 18:24:17,762: root: INFO: Current backtesting datetime 2021-10-05 08:30:00-05:00 +2024-04-13 18:24:17,762: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:17 +2024-04-13 18:24:17,762: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:17,763: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:17,763: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:17,764: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:17,764: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:18,917: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:18,918: root: INFO: Current backtesting datetime 2021-10-05 15:00:00-05:00 +2024-04-13 18:24:18,919: root: INFO: Current backtesting datetime 2021-10-06 08:30:00-05:00 +2024-04-13 18:24:18,919: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:18 +2024-04-13 18:24:18,919: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:18,920: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:18,920: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:18,921: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:18,921: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:19,884: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:19,885: root: INFO: Current backtesting datetime 2021-10-06 15:00:00-05:00 +2024-04-13 18:24:19,885: root: INFO: Current backtesting datetime 2021-10-07 08:30:00-05:00 +2024-04-13 18:24:19,886: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:19 +2024-04-13 18:24:19,886: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:19,887: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:19,887: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:19,887: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:19,887: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:20,737: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:20,738: root: INFO: Current backtesting datetime 2021-10-07 15:00:00-05:00 +2024-04-13 18:24:20,739: root: INFO: Current backtesting datetime 2021-10-08 08:30:00-05:00 +2024-04-13 18:24:20,739: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:20 +2024-04-13 18:24:20,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:20,740: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:20,740: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:20,741: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:20,741: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:21,676: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:21,677: root: INFO: Current backtesting datetime 2021-10-08 15:00:00-05:00 +2024-04-13 18:24:21,677: root: INFO: Current backtesting datetime 2021-10-09 08:30:00-05:00 +2024-04-13 18:24:21,677: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:24:21,679: root: INFO: Current backtesting datetime 2021-10-09 08:29:00-05:00 +2024-04-13 18:24:21,680: root: INFO: Current backtesting datetime 2021-10-09 08:29:00-05:00 +2024-04-13 18:24:21,680: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:24:21,681: root: INFO: Current backtesting datetime 2021-10-11 07:30:00-05:00 +2024-04-13 18:24:21,682: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:24:21,683: root: INFO: Current backtesting datetime 2021-10-11 08:30:00-05:00 +2024-04-13 18:24:21,683: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:24:21,684: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:21 +2024-04-13 18:24:21,684: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:21,684: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:21,685: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:21,685: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:21,685: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:22,534: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:22,535: root: INFO: Current backtesting datetime 2021-10-11 15:00:00-05:00 +2024-04-13 18:24:22,536: root: INFO: Current backtesting datetime 2021-10-12 08:30:00-05:00 +2024-04-13 18:24:22,536: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:22 +2024-04-13 18:24:22,536: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:22,537: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:22,537: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:22,538: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:22,538: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:23,435: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:23,436: root: INFO: Current backtesting datetime 2021-10-12 15:00:00-05:00 +2024-04-13 18:24:23,436: root: INFO: Current backtesting datetime 2021-10-13 08:30:00-05:00 +2024-04-13 18:24:23,437: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:23 +2024-04-13 18:24:23,437: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:23,437: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:23,438: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:23,438: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:23,438: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:24,502: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:24,503: root: INFO: Current backtesting datetime 2021-10-13 15:00:00-05:00 +2024-04-13 18:24:24,503: root: INFO: Current backtesting datetime 2021-10-14 08:30:00-05:00 +2024-04-13 18:24:24,503: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:24 +2024-04-13 18:24:24,504: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:24,504: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:24,505: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:24,505: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:24,505: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:25,668: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:25,669: root: INFO: Current backtesting datetime 2021-10-14 15:00:00-05:00 +2024-04-13 18:24:25,670: root: INFO: Current backtesting datetime 2021-10-15 08:30:00-05:00 +2024-04-13 18:24:25,670: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:25 +2024-04-13 18:24:25,670: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:25,671: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:25,671: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:25,672: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:25,672: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:27,635: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:27,636: root: INFO: Current backtesting datetime 2021-10-15 15:00:00-05:00 +2024-04-13 18:24:27,636: root: INFO: Current backtesting datetime 2021-10-16 08:30:00-05:00 +2024-04-13 18:24:27,637: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:24:27,638: root: INFO: Current backtesting datetime 2021-10-16 08:29:00-05:00 +2024-04-13 18:24:27,639: root: INFO: Current backtesting datetime 2021-10-16 08:29:00-05:00 +2024-04-13 18:24:27,639: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:24:27,640: root: INFO: Current backtesting datetime 2021-10-18 07:30:00-05:00 +2024-04-13 18:24:27,640: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:24:27,641: root: INFO: Current backtesting datetime 2021-10-18 08:30:00-05:00 +2024-04-13 18:24:27,641: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:24:27,642: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:27 +2024-04-13 18:24:27,642: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:27,643: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:27,644: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:27,644: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:27,644: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:28,739: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:28,739: root: INFO: Current backtesting datetime 2021-10-18 15:00:00-05:00 +2024-04-13 18:24:28,739: root: INFO: Current backtesting datetime 2021-10-19 08:30:00-05:00 +2024-04-13 18:24:28,740: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:28 +2024-04-13 18:24:28,741: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:28,741: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:28,742: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:28,742: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:28,742: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:31,976: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:31,977: root: INFO: Current backtesting datetime 2021-10-19 15:00:00-05:00 +2024-04-13 18:24:31,977: root: INFO: Current backtesting datetime 2021-10-20 08:30:00-05:00 +2024-04-13 18:24:31,978: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:31 +2024-04-13 18:24:31,978: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:31,979: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:31,979: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:31,979: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:31,979: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:33,642: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:33,643: root: INFO: Current backtesting datetime 2021-10-20 15:00:00-05:00 +2024-04-13 18:24:33,644: root: INFO: Current backtesting datetime 2021-10-21 08:30:00-05:00 +2024-04-13 18:24:33,644: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:33 +2024-04-13 18:24:33,644: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:33,645: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:33,645: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:33,646: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:33,646: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:35,005: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:35,006: root: INFO: Current backtesting datetime 2021-10-21 15:00:00-05:00 +2024-04-13 18:24:35,006: root: INFO: Current backtesting datetime 2021-10-22 08:30:00-05:00 +2024-04-13 18:24:35,006: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:35 +2024-04-13 18:24:35,006: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:35,007: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:35,008: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:35,008: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:35,008: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:36,468: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:36,469: root: INFO: Current backtesting datetime 2021-10-22 15:00:00-05:00 +2024-04-13 18:24:36,470: root: INFO: Current backtesting datetime 2021-10-23 08:30:00-05:00 +2024-04-13 18:24:36,470: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:24:36,471: root: INFO: Current backtesting datetime 2021-10-23 08:29:00-05:00 +2024-04-13 18:24:36,473: root: INFO: Current backtesting datetime 2021-10-23 08:29:00-05:00 +2024-04-13 18:24:36,473: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:24:36,474: root: INFO: Current backtesting datetime 2021-10-25 07:30:00-05:00 +2024-04-13 18:24:36,474: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:24:36,475: root: INFO: Current backtesting datetime 2021-10-25 08:30:00-05:00 +2024-04-13 18:24:36,475: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:24:36,476: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:36 +2024-04-13 18:24:36,476: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:36,477: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:36,477: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:36,478: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:36,478: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:37,499: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:37,500: root: INFO: Current backtesting datetime 2021-10-25 15:00:00-05:00 +2024-04-13 18:24:37,500: root: INFO: Current backtesting datetime 2021-10-26 08:30:00-05:00 +2024-04-13 18:24:37,501: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:37 +2024-04-13 18:24:37,501: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:37,501: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:37,502: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:37,502: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:37,502: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:38,603: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:38,604: root: INFO: Current backtesting datetime 2021-10-26 15:00:00-05:00 +2024-04-13 18:24:38,604: root: INFO: Current backtesting datetime 2021-10-27 08:30:00-05:00 +2024-04-13 18:24:38,604: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:38 +2024-04-13 18:24:38,604: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:38,605: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:38,605: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:38,606: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:38,606: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:40,188: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:40,189: root: INFO: Current backtesting datetime 2021-10-27 15:00:00-05:00 +2024-04-13 18:24:40,190: root: INFO: Current backtesting datetime 2021-10-28 08:30:00-05:00 +2024-04-13 18:24:40,190: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:40 +2024-04-13 18:24:40,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:40,191: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:40,191: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:40,192: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:40,192: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:41,728: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:41,729: root: INFO: Current backtesting datetime 2021-10-28 15:00:00-05:00 +2024-04-13 18:24:41,729: root: INFO: Current backtesting datetime 2021-10-29 08:30:00-05:00 +2024-04-13 18:24:41,730: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:41 +2024-04-13 18:24:41,730: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:41,731: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:41,731: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:41,731: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:41,731: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:42,683: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:42,684: root: INFO: Current backtesting datetime 2021-10-29 15:00:00-05:00 +2024-04-13 18:24:42,684: root: INFO: Current backtesting datetime 2021-10-30 08:30:00-05:00 +2024-04-13 18:24:42,685: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:24:42,686: root: INFO: Current backtesting datetime 2021-10-30 08:29:00-05:00 +2024-04-13 18:24:42,687: root: INFO: Current backtesting datetime 2021-10-30 08:29:00-05:00 +2024-04-13 18:24:42,687: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:24:42,688: root: INFO: Current backtesting datetime 2021-11-01 07:30:00-05:00 +2024-04-13 18:24:42,689: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:24:42,690: root: INFO: Current backtesting datetime 2021-11-01 08:30:00-05:00 +2024-04-13 18:24:42,690: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:24:42,691: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:42 +2024-04-13 18:24:42,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:42,692: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:42,692: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:42,692: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:42,692: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:44,128: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:44,129: root: INFO: Current backtesting datetime 2021-11-01 15:00:00-05:00 +2024-04-13 18:24:44,130: root: INFO: Current backtesting datetime 2021-11-02 08:30:00-05:00 +2024-04-13 18:24:44,130: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:44 +2024-04-13 18:24:44,130: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:44,131: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:44,131: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:44,132: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:44,132: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:45,195: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:45,196: root: INFO: Current backtesting datetime 2021-11-02 15:00:00-05:00 +2024-04-13 18:24:45,196: root: INFO: Current backtesting datetime 2021-11-03 08:30:00-05:00 +2024-04-13 18:24:45,197: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:45 +2024-04-13 18:24:45,197: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:45,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:45,198: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:45,198: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:45,199: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:46,632: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:46,632: root: INFO: Current backtesting datetime 2021-11-03 15:00:00-05:00 +2024-04-13 18:24:46,633: root: INFO: Current backtesting datetime 2021-11-04 08:30:00-05:00 +2024-04-13 18:24:46,633: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:46 +2024-04-13 18:24:46,633: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:46,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:46,634: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:46,635: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:46,635: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:47,971: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:47,972: root: INFO: Current backtesting datetime 2021-11-04 15:00:00-05:00 +2024-04-13 18:24:47,972: root: INFO: Current backtesting datetime 2021-11-05 08:30:00-05:00 +2024-04-13 18:24:47,973: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:47 +2024-04-13 18:24:47,973: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:47,974: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:47,974: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:47,974: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:47,975: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:49,692: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:49,693: root: INFO: Current backtesting datetime 2021-11-05 15:00:00-05:00 +2024-04-13 18:24:49,694: root: INFO: Current backtesting datetime 2021-11-06 08:30:00-05:00 +2024-04-13 18:24:49,694: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:24:49,695: root: INFO: Current backtesting datetime 2021-11-06 08:29:00-05:00 +2024-04-13 18:24:49,697: root: INFO: Current backtesting datetime 2021-11-06 08:29:00-05:00 +2024-04-13 18:24:49,697: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:24:49,697: root: INFO: Current backtesting datetime 2021-11-08 08:30:00-05:00 +2024-04-13 18:24:49,698: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:24:49,699: root: INFO: Current backtesting datetime 2021-11-08 09:30:00-05:00 +2024-04-13 18:24:49,699: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:24:49,700: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:49 +2024-04-13 18:24:49,700: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:49,701: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:49,701: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:49,701: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:49,701: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:51,341: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:51,342: root: INFO: Current backtesting datetime 2021-11-08 16:00:00-05:00 +2024-04-13 18:24:51,343: root: INFO: Current backtesting datetime 2021-11-09 09:30:00-05:00 +2024-04-13 18:24:51,343: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:51 +2024-04-13 18:24:51,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:51,344: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:51,344: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:51,345: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:51,345: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:52,538: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:52,539: root: INFO: Current backtesting datetime 2021-11-09 16:00:00-05:00 +2024-04-13 18:24:52,540: root: INFO: Current backtesting datetime 2021-11-10 09:30:00-05:00 +2024-04-13 18:24:52,540: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:52 +2024-04-13 18:24:52,540: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:52,541: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:52,541: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:52,542: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:52,542: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:54,158: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:54,159: root: INFO: Current backtesting datetime 2021-11-10 16:00:00-05:00 +2024-04-13 18:24:54,160: root: INFO: Current backtesting datetime 2021-11-11 09:30:00-05:00 +2024-04-13 18:24:54,160: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:54 +2024-04-13 18:24:54,160: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:54,161: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:54,161: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:54,162: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:54,162: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:55,690: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:55,691: root: INFO: Current backtesting datetime 2021-11-11 16:00:00-05:00 +2024-04-13 18:24:55,692: root: INFO: Current backtesting datetime 2021-11-12 09:30:00-05:00 +2024-04-13 18:24:55,692: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:55 +2024-04-13 18:24:55,692: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:55,693: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:55,693: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:55,694: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:55,694: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:56,699: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:56,699: root: INFO: Current backtesting datetime 2021-11-12 16:00:00-05:00 +2024-04-13 18:24:56,700: root: INFO: Current backtesting datetime 2021-11-13 09:30:00-05:00 +2024-04-13 18:24:56,700: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:24:56,701: root: INFO: Current backtesting datetime 2021-11-13 09:29:00-05:00 +2024-04-13 18:24:56,703: root: INFO: Current backtesting datetime 2021-11-13 09:29:00-05:00 +2024-04-13 18:24:56,703: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:24:56,703: root: INFO: Current backtesting datetime 2021-11-15 08:30:00-05:00 +2024-04-13 18:24:56,704: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:24:56,705: root: INFO: Current backtesting datetime 2021-11-15 09:30:00-05:00 +2024-04-13 18:24:56,705: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:24:56,706: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:56 +2024-04-13 18:24:56,706: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:56,707: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:56,707: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:56,707: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:56,707: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:58,139: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:58,140: root: INFO: Current backtesting datetime 2021-11-15 16:00:00-05:00 +2024-04-13 18:24:58,141: root: INFO: Current backtesting datetime 2021-11-16 09:30:00-05:00 +2024-04-13 18:24:58,141: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:58 +2024-04-13 18:24:58,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:58,142: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:58,143: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:58,143: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:58,143: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:24:59,209: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:24:59,210: root: INFO: Current backtesting datetime 2021-11-16 16:00:00-05:00 +2024-04-13 18:24:59,211: root: INFO: Current backtesting datetime 2021-11-17 09:30:00-05:00 +2024-04-13 18:24:59,211: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:24:59 +2024-04-13 18:24:59,211: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:59,211: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:24:59,212: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:24:59,212: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:24:59,212: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:01,494: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:01,495: root: INFO: Current backtesting datetime 2021-11-17 16:00:00-05:00 +2024-04-13 18:25:01,495: root: INFO: Current backtesting datetime 2021-11-18 09:30:00-05:00 +2024-04-13 18:25:01,496: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:01 +2024-04-13 18:25:01,496: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:01,497: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:01,497: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:01,497: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:01,497: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:03,253: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:03,254: root: INFO: Current backtesting datetime 2021-11-18 16:00:00-05:00 +2024-04-13 18:25:03,254: root: INFO: Current backtesting datetime 2021-11-19 09:30:00-05:00 +2024-04-13 18:25:03,255: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:03 +2024-04-13 18:25:03,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:03,256: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:03,256: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:03,256: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:03,256: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:04,703: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:04,704: root: INFO: Current backtesting datetime 2021-11-19 16:00:00-05:00 +2024-04-13 18:25:04,704: root: INFO: Current backtesting datetime 2021-11-20 09:30:00-05:00 +2024-04-13 18:25:04,705: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:25:04,706: root: INFO: Current backtesting datetime 2021-11-20 09:29:00-05:00 +2024-04-13 18:25:04,707: root: INFO: Current backtesting datetime 2021-11-20 09:29:00-05:00 +2024-04-13 18:25:04,707: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:25:04,708: root: INFO: Current backtesting datetime 2021-11-22 08:30:00-05:00 +2024-04-13 18:25:04,709: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:25:04,710: root: INFO: Current backtesting datetime 2021-11-22 09:30:00-05:00 +2024-04-13 18:25:04,710: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:25:04,711: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:04 +2024-04-13 18:25:04,711: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:04,712: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:04,712: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:04,712: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:04,712: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:06,854: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:06,855: root: INFO: Current backtesting datetime 2021-11-22 16:00:00-05:00 +2024-04-13 18:25:06,855: root: INFO: Current backtesting datetime 2021-11-23 09:30:00-05:00 +2024-04-13 18:25:06,856: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:06 +2024-04-13 18:25:06,856: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:06,857: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:06,857: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:06,858: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:06,858: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:08,662: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:08,663: root: INFO: Current backtesting datetime 2021-11-23 16:00:00-05:00 +2024-04-13 18:25:08,664: root: INFO: Current backtesting datetime 2021-11-24 09:30:00-05:00 +2024-04-13 18:25:08,664: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:08 +2024-04-13 18:25:08,664: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:08,665: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:08,665: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:08,666: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:08,666: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:09,972: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:09,973: root: INFO: Current backtesting datetime 2021-11-24 16:00:00-05:00 +2024-04-13 18:25:09,973: root: INFO: Current backtesting datetime 2021-11-25 09:30:00-05:00 +2024-04-13 18:25:09,973: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:25:09,975: root: INFO: Current backtesting datetime 2021-11-25 09:29:00-05:00 +2024-04-13 18:25:09,976: root: INFO: Current backtesting datetime 2021-11-25 09:29:00-05:00 +2024-04-13 18:25:09,976: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:25:09,977: root: INFO: Current backtesting datetime 2021-11-26 08:30:00-05:00 +2024-04-13 18:25:09,978: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:25:09,978: root: INFO: Current backtesting datetime 2021-11-26 09:30:00-05:00 +2024-04-13 18:25:09,978: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:25:09,980: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:09 +2024-04-13 18:25:09,980: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:09,980: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:09,981: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:09,981: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:09,981: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:12,733: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:12,734: root: INFO: Current backtesting datetime 2021-11-26 13:00:00-05:00 +2024-04-13 18:25:12,734: root: INFO: Current backtesting datetime 2021-11-27 09:30:00-05:00 +2024-04-13 18:25:12,735: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:25:12,736: root: INFO: Current backtesting datetime 2021-11-27 09:29:00-05:00 +2024-04-13 18:25:12,737: root: INFO: Current backtesting datetime 2021-11-27 09:29:00-05:00 +2024-04-13 18:25:12,737: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:25:12,738: root: INFO: Current backtesting datetime 2021-11-29 08:30:00-05:00 +2024-04-13 18:25:12,739: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:25:12,739: root: INFO: Current backtesting datetime 2021-11-29 09:30:00-05:00 +2024-04-13 18:25:12,739: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:25:12,741: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:12 +2024-04-13 18:25:12,741: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:12,741: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:12,742: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:12,742: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:12,742: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:14,006: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:14,007: root: INFO: Current backtesting datetime 2021-11-29 16:00:00-05:00 +2024-04-13 18:25:14,008: root: INFO: Current backtesting datetime 2021-11-30 09:30:00-05:00 +2024-04-13 18:25:14,008: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:14 +2024-04-13 18:25:14,008: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:14,009: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:14,009: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:14,010: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:14,010: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:15,195: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:15,196: root: INFO: Current backtesting datetime 2021-11-30 16:00:00-05:00 +2024-04-13 18:25:15,197: root: INFO: Current backtesting datetime 2021-12-01 09:30:00-05:00 +2024-04-13 18:25:15,197: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:15 +2024-04-13 18:25:15,197: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:15,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:15,198: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:15,199: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:15,199: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:16,562: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:16,563: root: INFO: Current backtesting datetime 2021-12-01 16:00:00-05:00 +2024-04-13 18:25:16,563: root: INFO: Current backtesting datetime 2021-12-02 09:30:00-05:00 +2024-04-13 18:25:16,563: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:16 +2024-04-13 18:25:16,564: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:16,564: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:16,565: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:16,565: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:16,565: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:18,037: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:18,038: root: INFO: Current backtesting datetime 2021-12-02 16:00:00-05:00 +2024-04-13 18:25:18,038: root: INFO: Current backtesting datetime 2021-12-03 09:30:00-05:00 +2024-04-13 18:25:18,038: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:18 +2024-04-13 18:25:18,039: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:18,039: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:18,040: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:18,040: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:18,040: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:19,224: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:19,226: root: INFO: Current backtesting datetime 2021-12-03 16:00:00-05:00 +2024-04-13 18:25:19,226: root: INFO: Current backtesting datetime 2021-12-04 09:30:00-05:00 +2024-04-13 18:25:19,226: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:25:19,228: root: INFO: Current backtesting datetime 2021-12-04 09:29:00-05:00 +2024-04-13 18:25:19,229: root: INFO: Current backtesting datetime 2021-12-04 09:29:00-05:00 +2024-04-13 18:25:19,229: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:25:19,230: root: INFO: Current backtesting datetime 2021-12-06 08:30:00-05:00 +2024-04-13 18:25:19,230: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:25:19,231: root: INFO: Current backtesting datetime 2021-12-06 09:30:00-05:00 +2024-04-13 18:25:19,231: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:25:19,232: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:19 +2024-04-13 18:25:19,232: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:19,233: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:19,233: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:19,234: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:19,234: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:20,697: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:20,698: root: INFO: Current backtesting datetime 2021-12-06 16:00:00-05:00 +2024-04-13 18:25:20,699: root: INFO: Current backtesting datetime 2021-12-07 09:30:00-05:00 +2024-04-13 18:25:20,699: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:20 +2024-04-13 18:25:20,699: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:20,700: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:20,700: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:20,701: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:20,701: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:22,391: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:22,392: root: INFO: Current backtesting datetime 2021-12-07 16:00:00-05:00 +2024-04-13 18:25:22,393: root: INFO: Current backtesting datetime 2021-12-08 09:30:00-05:00 +2024-04-13 18:25:22,393: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:22 +2024-04-13 18:25:22,393: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:22,394: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:22,394: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:22,395: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:22,395: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:24,052: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:24,053: root: INFO: Current backtesting datetime 2021-12-08 16:00:00-05:00 +2024-04-13 18:25:24,053: root: INFO: Current backtesting datetime 2021-12-09 09:30:00-05:00 +2024-04-13 18:25:24,053: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:24 +2024-04-13 18:25:24,053: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:24,054: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:24,054: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:24,055: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:24,055: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:24,964: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:24,965: root: INFO: Current backtesting datetime 2021-12-09 16:00:00-05:00 +2024-04-13 18:25:24,965: root: INFO: Current backtesting datetime 2021-12-10 09:30:00-05:00 +2024-04-13 18:25:24,965: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:24 +2024-04-13 18:25:24,966: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:24,966: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:24,967: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:24,967: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:24,967: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:25,762: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:25,763: root: INFO: Current backtesting datetime 2021-12-10 16:00:00-05:00 +2024-04-13 18:25:25,763: root: INFO: Current backtesting datetime 2021-12-11 09:30:00-05:00 +2024-04-13 18:25:25,763: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:25:25,764: root: INFO: Current backtesting datetime 2021-12-11 09:29:00-05:00 +2024-04-13 18:25:25,766: root: INFO: Current backtesting datetime 2021-12-11 09:29:00-05:00 +2024-04-13 18:25:25,766: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:25:25,767: root: INFO: Current backtesting datetime 2021-12-13 08:30:00-05:00 +2024-04-13 18:25:25,767: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:25:25,768: root: INFO: Current backtesting datetime 2021-12-13 09:30:00-05:00 +2024-04-13 18:25:25,769: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:25:25,770: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:25 +2024-04-13 18:25:25,770: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:25,770: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:25,771: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:25,771: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:25,771: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:27,077: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:27,078: root: INFO: Current backtesting datetime 2021-12-13 16:00:00-05:00 +2024-04-13 18:25:27,078: root: INFO: Current backtesting datetime 2021-12-14 09:30:00-05:00 +2024-04-13 18:25:27,079: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:27 +2024-04-13 18:25:27,079: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:27,079: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:27,080: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:27,080: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:27,080: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:28,047: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:28,048: root: INFO: Current backtesting datetime 2021-12-14 16:00:00-05:00 +2024-04-13 18:25:28,048: root: INFO: Current backtesting datetime 2021-12-15 09:30:00-05:00 +2024-04-13 18:25:28,048: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:28 +2024-04-13 18:25:28,048: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:28,049: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:28,049: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:28,050: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:28,050: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:29,051: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:29,052: root: INFO: Current backtesting datetime 2021-12-15 16:00:00-05:00 +2024-04-13 18:25:29,052: root: INFO: Current backtesting datetime 2021-12-16 09:30:00-05:00 +2024-04-13 18:25:29,053: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:29 +2024-04-13 18:25:29,053: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:29,054: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:29,054: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:29,054: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:29,054: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:29,951: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:29,952: root: INFO: Current backtesting datetime 2021-12-16 16:00:00-05:00 +2024-04-13 18:25:29,953: root: INFO: Current backtesting datetime 2021-12-17 09:30:00-05:00 +2024-04-13 18:25:29,953: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:29 +2024-04-13 18:25:29,953: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:29,954: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:29,954: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:29,955: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:29,955: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:30,897: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:30,898: root: INFO: Current backtesting datetime 2021-12-17 16:00:00-05:00 +2024-04-13 18:25:30,898: root: INFO: Current backtesting datetime 2021-12-18 09:30:00-05:00 +2024-04-13 18:25:30,898: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:25:30,900: root: INFO: Current backtesting datetime 2021-12-18 09:29:00-05:00 +2024-04-13 18:25:30,901: root: INFO: Current backtesting datetime 2021-12-18 09:29:00-05:00 +2024-04-13 18:25:30,901: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:25:30,902: root: INFO: Current backtesting datetime 2021-12-20 08:30:00-05:00 +2024-04-13 18:25:30,902: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:25:30,903: root: INFO: Current backtesting datetime 2021-12-20 09:30:00-05:00 +2024-04-13 18:25:30,903: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:25:30,904: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:30 +2024-04-13 18:25:30,904: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:30,905: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:30,905: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:30,906: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:30,906: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:31,767: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:31,768: root: INFO: Current backtesting datetime 2021-12-20 16:00:00-05:00 +2024-04-13 18:25:31,768: root: INFO: Current backtesting datetime 2021-12-21 09:30:00-05:00 +2024-04-13 18:25:31,769: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:31 +2024-04-13 18:25:31,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:31,770: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:31,770: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:31,770: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:31,771: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:32,842: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:32,843: root: INFO: Current backtesting datetime 2021-12-21 16:00:00-05:00 +2024-04-13 18:25:32,843: root: INFO: Current backtesting datetime 2021-12-22 09:30:00-05:00 +2024-04-13 18:25:32,843: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:32 +2024-04-13 18:25:32,844: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:32,844: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:32,844: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:32,845: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:32,845: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:33,751: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:33,752: root: INFO: Current backtesting datetime 2021-12-22 16:00:00-05:00 +2024-04-13 18:25:33,753: root: INFO: Current backtesting datetime 2021-12-23 09:30:00-05:00 +2024-04-13 18:25:33,753: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:33 +2024-04-13 18:25:33,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:33,754: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:33,754: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:33,755: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:33,755: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:34,933: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:34,934: root: INFO: Current backtesting datetime 2021-12-23 16:00:00-05:00 +2024-04-13 18:25:34,934: root: INFO: Current backtesting datetime 2021-12-24 09:30:00-05:00 +2024-04-13 18:25:34,934: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:25:34,936: root: INFO: Current backtesting datetime 2021-12-24 09:29:00-05:00 +2024-04-13 18:25:34,937: root: INFO: Current backtesting datetime 2021-12-24 09:29:00-05:00 +2024-04-13 18:25:34,937: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:25:34,938: root: INFO: Current backtesting datetime 2021-12-27 08:30:00-05:00 +2024-04-13 18:25:34,939: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:25:34,939: root: INFO: Current backtesting datetime 2021-12-27 09:30:00-05:00 +2024-04-13 18:25:34,939: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:25:34,940: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:34 +2024-04-13 18:25:34,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:34,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:34,942: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:34,942: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:34,942: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:36,386: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:36,387: root: INFO: Current backtesting datetime 2021-12-27 16:00:00-05:00 +2024-04-13 18:25:36,387: root: INFO: Current backtesting datetime 2021-12-28 09:30:00-05:00 +2024-04-13 18:25:36,388: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:36 +2024-04-13 18:25:36,388: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:36,389: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:36,389: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:36,390: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:36,390: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:37,392: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:37,393: root: INFO: Current backtesting datetime 2021-12-28 16:00:00-05:00 +2024-04-13 18:25:37,393: root: INFO: Current backtesting datetime 2021-12-29 09:30:00-05:00 +2024-04-13 18:25:37,394: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:37 +2024-04-13 18:25:37,394: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:37,395: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:37,395: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:37,395: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:37,396: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:38,616: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:38,616: root: INFO: Current backtesting datetime 2021-12-29 16:00:00-05:00 +2024-04-13 18:25:38,617: root: INFO: Current backtesting datetime 2021-12-30 09:30:00-05:00 +2024-04-13 18:25:38,617: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:38 +2024-04-13 18:25:38,617: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:38,618: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:38,618: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:38,619: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:38,619: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:40,799: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:40,800: root: INFO: Current backtesting datetime 2021-12-30 16:00:00-05:00 +2024-04-13 18:25:40,801: root: INFO: Current backtesting datetime 2021-12-31 09:30:00-05:00 +2024-04-13 18:25:40,801: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:40 +2024-04-13 18:25:40,801: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:40,802: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:40,803: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:40,803: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:40,803: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:42,835: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:42,836: root: INFO: Current backtesting datetime 2021-12-31 16:00:00-05:00 +2024-04-13 18:25:42,836: root: INFO: Current backtesting datetime 2022-01-01 09:30:00-05:00 +2024-04-13 18:25:42,837: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:25:42,839: root: INFO: Current backtesting datetime 2022-01-01 09:29:00-05:00 +2024-04-13 18:25:42,840: root: INFO: Current backtesting datetime 2022-01-01 09:29:00-05:00 +2024-04-13 18:25:42,840: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:25:42,841: root: INFO: Current backtesting datetime 2022-01-03 08:30:00-05:00 +2024-04-13 18:25:42,841: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:25:42,842: root: INFO: Current backtesting datetime 2022-01-03 09:30:00-05:00 +2024-04-13 18:25:42,842: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:25:42,843: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:42 +2024-04-13 18:25:42,843: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:42,844: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:42,844: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:42,845: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:42,845: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:43,812: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:43,813: root: INFO: Current backtesting datetime 2022-01-03 16:00:00-05:00 +2024-04-13 18:25:43,813: root: INFO: Current backtesting datetime 2022-01-04 09:30:00-05:00 +2024-04-13 18:25:43,813: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:43 +2024-04-13 18:25:43,813: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:43,814: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:43,814: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:43,815: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:43,815: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:44,837: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:44,838: root: INFO: Current backtesting datetime 2022-01-04 16:00:00-05:00 +2024-04-13 18:25:44,838: root: INFO: Current backtesting datetime 2022-01-05 09:30:00-05:00 +2024-04-13 18:25:44,839: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:44 +2024-04-13 18:25:44,839: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:44,840: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:44,840: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:44,840: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:44,840: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:46,986: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:46,987: root: INFO: Current backtesting datetime 2022-01-05 16:00:00-05:00 +2024-04-13 18:25:46,987: root: INFO: Current backtesting datetime 2022-01-06 09:30:00-05:00 +2024-04-13 18:25:46,988: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:46 +2024-04-13 18:25:46,988: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:46,988: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:46,989: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:46,989: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:46,989: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:48,095: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:48,096: root: INFO: Current backtesting datetime 2022-01-06 16:00:00-05:00 +2024-04-13 18:25:48,096: root: INFO: Current backtesting datetime 2022-01-07 09:30:00-05:00 +2024-04-13 18:25:48,097: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:48 +2024-04-13 18:25:48,097: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:48,098: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:48,098: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:48,098: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:48,099: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:49,044: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:49,045: root: INFO: Current backtesting datetime 2022-01-07 16:00:00-05:00 +2024-04-13 18:25:49,045: root: INFO: Current backtesting datetime 2022-01-08 09:30:00-05:00 +2024-04-13 18:25:49,045: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:25:49,046: root: INFO: Current backtesting datetime 2022-01-08 09:29:00-05:00 +2024-04-13 18:25:49,048: root: INFO: Current backtesting datetime 2022-01-08 09:29:00-05:00 +2024-04-13 18:25:49,048: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:25:49,048: root: INFO: Current backtesting datetime 2022-01-10 08:30:00-05:00 +2024-04-13 18:25:49,049: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:25:49,050: root: INFO: Current backtesting datetime 2022-01-10 09:30:00-05:00 +2024-04-13 18:25:49,050: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:25:49,051: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:49 +2024-04-13 18:25:49,051: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:49,052: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:49,052: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:49,052: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:49,053: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:50,174: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:50,175: root: INFO: Current backtesting datetime 2022-01-10 16:00:00-05:00 +2024-04-13 18:25:50,175: root: INFO: Current backtesting datetime 2022-01-11 09:30:00-05:00 +2024-04-13 18:25:50,176: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:50 +2024-04-13 18:25:50,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:50,177: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:50,177: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:50,177: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:50,177: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:52,684: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:52,685: root: INFO: Current backtesting datetime 2022-01-11 16:00:00-05:00 +2024-04-13 18:25:52,686: root: INFO: Current backtesting datetime 2022-01-12 09:30:00-05:00 +2024-04-13 18:25:52,686: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:52 +2024-04-13 18:25:52,686: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:52,687: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:52,687: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:52,688: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:52,688: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:53,809: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:53,810: root: INFO: Current backtesting datetime 2022-01-12 16:00:00-05:00 +2024-04-13 18:25:53,811: root: INFO: Current backtesting datetime 2022-01-13 09:30:00-05:00 +2024-04-13 18:25:53,811: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:53 +2024-04-13 18:25:53,811: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:53,812: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:53,812: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:53,813: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:53,813: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:55,190: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:55,191: root: INFO: Current backtesting datetime 2022-01-13 16:00:00-05:00 +2024-04-13 18:25:55,191: root: INFO: Current backtesting datetime 2022-01-14 09:30:00-05:00 +2024-04-13 18:25:55,192: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:55 +2024-04-13 18:25:55,192: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:55,193: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:55,193: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:55,193: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:55,194: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:56,384: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:56,385: root: INFO: Current backtesting datetime 2022-01-14 16:00:00-05:00 +2024-04-13 18:25:56,385: root: INFO: Current backtesting datetime 2022-01-15 09:30:00-05:00 +2024-04-13 18:25:56,385: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:25:56,387: root: INFO: Current backtesting datetime 2022-01-15 09:29:00-05:00 +2024-04-13 18:25:56,388: root: INFO: Current backtesting datetime 2022-01-15 09:29:00-05:00 +2024-04-13 18:25:56,388: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:25:56,389: root: INFO: Current backtesting datetime 2022-01-18 08:30:00-05:00 +2024-04-13 18:25:56,389: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:25:56,390: root: INFO: Current backtesting datetime 2022-01-18 09:30:00-05:00 +2024-04-13 18:25:56,390: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:25:56,391: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:56 +2024-04-13 18:25:56,391: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:56,392: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:56,392: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:56,393: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:56,393: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:57,457: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:57,458: root: INFO: Current backtesting datetime 2022-01-18 16:00:00-05:00 +2024-04-13 18:25:57,459: root: INFO: Current backtesting datetime 2022-01-19 09:30:00-05:00 +2024-04-13 18:25:57,459: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:57 +2024-04-13 18:25:57,459: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:57,460: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:57,460: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:57,461: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:57,461: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:58,674: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:58,676: root: INFO: Current backtesting datetime 2022-01-19 16:00:00-05:00 +2024-04-13 18:25:58,676: root: INFO: Current backtesting datetime 2022-01-20 09:30:00-05:00 +2024-04-13 18:25:58,676: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:58 +2024-04-13 18:25:58,676: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:58,677: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:58,677: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:58,678: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:58,678: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:25:59,555: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:25:59,556: root: INFO: Current backtesting datetime 2022-01-20 16:00:00-05:00 +2024-04-13 18:25:59,556: root: INFO: Current backtesting datetime 2022-01-21 09:30:00-05:00 +2024-04-13 18:25:59,556: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:25:59 +2024-04-13 18:25:59,556: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:59,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:25:59,557: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:25:59,558: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:25:59,558: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:00,814: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:00,816: root: INFO: Current backtesting datetime 2022-01-21 16:00:00-05:00 +2024-04-13 18:26:00,816: root: INFO: Current backtesting datetime 2022-01-22 09:30:00-05:00 +2024-04-13 18:26:00,816: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:26:00,818: root: INFO: Current backtesting datetime 2022-01-22 09:29:00-05:00 +2024-04-13 18:26:00,820: root: INFO: Current backtesting datetime 2022-01-22 09:29:00-05:00 +2024-04-13 18:26:00,820: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:26:00,820: root: INFO: Current backtesting datetime 2022-01-24 08:30:00-05:00 +2024-04-13 18:26:00,821: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:26:00,822: root: INFO: Current backtesting datetime 2022-01-24 09:30:00-05:00 +2024-04-13 18:26:00,822: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:26:00,823: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:00 +2024-04-13 18:26:00,823: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:00,823: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:00,824: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:00,824: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:00,824: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:02,633: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:02,633: root: INFO: Current backtesting datetime 2022-01-24 16:00:00-05:00 +2024-04-13 18:26:02,634: root: INFO: Current backtesting datetime 2022-01-25 09:30:00-05:00 +2024-04-13 18:26:02,634: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:02 +2024-04-13 18:26:02,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:02,635: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:02,636: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:02,636: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:02,636: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:03,740: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:03,741: root: INFO: Current backtesting datetime 2022-01-25 16:00:00-05:00 +2024-04-13 18:26:03,742: root: INFO: Current backtesting datetime 2022-01-26 09:30:00-05:00 +2024-04-13 18:26:03,742: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:03 +2024-04-13 18:26:03,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:03,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:03,743: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:03,744: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:03,744: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:06,071: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:06,072: root: INFO: Current backtesting datetime 2022-01-26 16:00:00-05:00 +2024-04-13 18:26:06,072: root: INFO: Current backtesting datetime 2022-01-27 09:30:00-05:00 +2024-04-13 18:26:06,073: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:06 +2024-04-13 18:26:06,073: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:06,074: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:06,074: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:06,074: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:06,075: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:08,996: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:08,997: root: INFO: Current backtesting datetime 2022-01-27 16:00:00-05:00 +2024-04-13 18:26:08,997: root: INFO: Current backtesting datetime 2022-01-28 09:30:00-05:00 +2024-04-13 18:26:08,998: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:08 +2024-04-13 18:26:08,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:08,999: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:08,999: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:08,999: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:08,999: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:10,387: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:10,388: root: INFO: Current backtesting datetime 2022-01-28 16:00:00-05:00 +2024-04-13 18:26:10,389: root: INFO: Current backtesting datetime 2022-01-29 09:30:00-05:00 +2024-04-13 18:26:10,389: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:26:10,391: root: INFO: Current backtesting datetime 2022-01-29 09:29:00-05:00 +2024-04-13 18:26:10,392: root: INFO: Current backtesting datetime 2022-01-29 09:29:00-05:00 +2024-04-13 18:26:10,392: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:26:10,393: root: INFO: Current backtesting datetime 2022-01-31 08:30:00-05:00 +2024-04-13 18:26:10,393: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:26:10,394: root: INFO: Current backtesting datetime 2022-01-31 09:30:00-05:00 +2024-04-13 18:26:10,394: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:26:10,395: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:10 +2024-04-13 18:26:10,395: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:10,396: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:10,396: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:10,397: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:10,397: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:11,710: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:11,711: root: INFO: Current backtesting datetime 2022-01-31 16:00:00-05:00 +2024-04-13 18:26:11,712: root: INFO: Current backtesting datetime 2022-02-01 09:30:00-05:00 +2024-04-13 18:26:11,712: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:11 +2024-04-13 18:26:11,712: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:11,713: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:11,713: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:11,714: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:11,714: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:12,893: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:12,894: root: INFO: Current backtesting datetime 2022-02-01 16:00:00-05:00 +2024-04-13 18:26:12,894: root: INFO: Current backtesting datetime 2022-02-02 09:30:00-05:00 +2024-04-13 18:26:12,894: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:12 +2024-04-13 18:26:12,895: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:12,895: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:12,896: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:12,896: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:12,896: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:14,174: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:14,174: root: INFO: Current backtesting datetime 2022-02-02 16:00:00-05:00 +2024-04-13 18:26:14,174: root: INFO: Current backtesting datetime 2022-02-03 09:30:00-05:00 +2024-04-13 18:26:14,175: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:14 +2024-04-13 18:26:14,175: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:14,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:14,176: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:14,176: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:14,176: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:15,284: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:15,285: root: INFO: Current backtesting datetime 2022-02-03 16:00:00-05:00 +2024-04-13 18:26:15,285: root: INFO: Current backtesting datetime 2022-02-04 09:30:00-05:00 +2024-04-13 18:26:15,286: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:15 +2024-04-13 18:26:15,286: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:15,287: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:15,287: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:15,287: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:15,287: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:16,683: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:16,684: root: INFO: Current backtesting datetime 2022-02-04 16:00:00-05:00 +2024-04-13 18:26:16,684: root: INFO: Current backtesting datetime 2022-02-05 09:30:00-05:00 +2024-04-13 18:26:16,685: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:26:16,686: root: INFO: Current backtesting datetime 2022-02-05 09:29:00-05:00 +2024-04-13 18:26:16,688: root: INFO: Current backtesting datetime 2022-02-05 09:29:00-05:00 +2024-04-13 18:26:16,688: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:26:16,689: root: INFO: Current backtesting datetime 2022-02-07 08:30:00-05:00 +2024-04-13 18:26:16,689: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:26:16,690: root: INFO: Current backtesting datetime 2022-02-07 09:30:00-05:00 +2024-04-13 18:26:16,690: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:26:16,691: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:16 +2024-04-13 18:26:16,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:16,692: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:16,692: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:16,693: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:16,693: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:17,953: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:17,953: root: INFO: Current backtesting datetime 2022-02-07 16:00:00-05:00 +2024-04-13 18:26:17,954: root: INFO: Current backtesting datetime 2022-02-08 09:30:00-05:00 +2024-04-13 18:26:17,954: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:17 +2024-04-13 18:26:17,954: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:17,955: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:17,955: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:17,956: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:17,956: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:19,564: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:19,565: root: INFO: Current backtesting datetime 2022-02-08 16:00:00-05:00 +2024-04-13 18:26:19,565: root: INFO: Current backtesting datetime 2022-02-09 09:30:00-05:00 +2024-04-13 18:26:19,566: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:19 +2024-04-13 18:26:19,566: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:19,567: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:19,567: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:19,567: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:19,567: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:20,530: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:20,531: root: INFO: Current backtesting datetime 2022-02-09 16:00:00-05:00 +2024-04-13 18:26:20,531: root: INFO: Current backtesting datetime 2022-02-10 09:30:00-05:00 +2024-04-13 18:26:20,531: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:20 +2024-04-13 18:26:20,531: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:20,532: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:20,532: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:20,533: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:20,533: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:21,739: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:21,740: root: INFO: Current backtesting datetime 2022-02-10 16:00:00-05:00 +2024-04-13 18:26:21,740: root: INFO: Current backtesting datetime 2022-02-11 09:30:00-05:00 +2024-04-13 18:26:21,741: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:21 +2024-04-13 18:26:21,741: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:21,741: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:21,742: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:21,742: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:21,742: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:23,390: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:23,391: root: INFO: Current backtesting datetime 2022-02-11 16:00:00-05:00 +2024-04-13 18:26:23,392: root: INFO: Current backtesting datetime 2022-02-12 09:30:00-05:00 +2024-04-13 18:26:23,392: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:26:23,394: root: INFO: Current backtesting datetime 2022-02-12 09:29:00-05:00 +2024-04-13 18:26:23,395: root: INFO: Current backtesting datetime 2022-02-12 09:29:00-05:00 +2024-04-13 18:26:23,395: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:26:23,396: root: INFO: Current backtesting datetime 2022-02-14 08:30:00-05:00 +2024-04-13 18:26:23,396: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:26:23,397: root: INFO: Current backtesting datetime 2022-02-14 09:30:00-05:00 +2024-04-13 18:26:23,397: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:26:23,398: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:23 +2024-04-13 18:26:23,398: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:23,399: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:23,399: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:23,400: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:23,400: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:25,162: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:25,163: root: INFO: Current backtesting datetime 2022-02-14 16:00:00-05:00 +2024-04-13 18:26:25,163: root: INFO: Current backtesting datetime 2022-02-15 09:30:00-05:00 +2024-04-13 18:26:25,163: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:25 +2024-04-13 18:26:25,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:25,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:25,165: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:25,165: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:25,165: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:27,116: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:27,117: root: INFO: Current backtesting datetime 2022-02-15 16:00:00-05:00 +2024-04-13 18:26:27,117: root: INFO: Current backtesting datetime 2022-02-16 09:30:00-05:00 +2024-04-13 18:26:27,118: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:27 +2024-04-13 18:26:27,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:27,119: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:27,119: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:27,119: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:27,119: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:28,143: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:28,143: root: INFO: Current backtesting datetime 2022-02-16 16:00:00-05:00 +2024-04-13 18:26:28,144: root: INFO: Current backtesting datetime 2022-02-17 09:30:00-05:00 +2024-04-13 18:26:28,144: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:28 +2024-04-13 18:26:28,144: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:28,145: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:28,145: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:28,146: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:28,146: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:29,128: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:29,129: root: INFO: Current backtesting datetime 2022-02-17 16:00:00-05:00 +2024-04-13 18:26:29,129: root: INFO: Current backtesting datetime 2022-02-18 09:30:00-05:00 +2024-04-13 18:26:29,129: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:29 +2024-04-13 18:26:29,129: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:29,130: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:29,130: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:29,131: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:29,131: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:30,421: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:30,423: root: INFO: Current backtesting datetime 2022-02-18 16:00:00-05:00 +2024-04-13 18:26:30,423: root: INFO: Current backtesting datetime 2022-02-19 09:30:00-05:00 +2024-04-13 18:26:30,423: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:26:30,424: root: INFO: Current backtesting datetime 2022-02-19 09:29:00-05:00 +2024-04-13 18:26:30,426: root: INFO: Current backtesting datetime 2022-02-19 09:29:00-05:00 +2024-04-13 18:26:30,426: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:26:30,427: root: INFO: Current backtesting datetime 2022-02-22 08:30:00-05:00 +2024-04-13 18:26:30,427: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:26:30,428: root: INFO: Current backtesting datetime 2022-02-22 09:30:00-05:00 +2024-04-13 18:26:30,428: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:26:30,429: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:30 +2024-04-13 18:26:30,429: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:30,430: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:30,430: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:30,431: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:30,431: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:32,177: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:32,178: root: INFO: Current backtesting datetime 2022-02-22 16:00:00-05:00 +2024-04-13 18:26:32,178: root: INFO: Current backtesting datetime 2022-02-23 09:30:00-05:00 +2024-04-13 18:26:32,179: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:32 +2024-04-13 18:26:32,179: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:32,180: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:32,180: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:32,180: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:32,181: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:34,169: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:34,170: root: INFO: Current backtesting datetime 2022-02-23 16:00:00-05:00 +2024-04-13 18:26:34,170: root: INFO: Current backtesting datetime 2022-02-24 09:30:00-05:00 +2024-04-13 18:26:34,170: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:34 +2024-04-13 18:26:34,170: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:34,171: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:34,171: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:34,172: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:34,172: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:35,270: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:35,271: root: INFO: Current backtesting datetime 2022-02-24 16:00:00-05:00 +2024-04-13 18:26:35,271: root: INFO: Current backtesting datetime 2022-02-25 09:30:00-05:00 +2024-04-13 18:26:35,271: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:35 +2024-04-13 18:26:35,271: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:35,272: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:35,273: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:35,273: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:35,273: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:36,241: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:36,242: root: INFO: Current backtesting datetime 2022-02-25 16:00:00-05:00 +2024-04-13 18:26:36,242: root: INFO: Current backtesting datetime 2022-02-26 09:30:00-05:00 +2024-04-13 18:26:36,243: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:26:36,244: root: INFO: Current backtesting datetime 2022-02-26 09:29:00-05:00 +2024-04-13 18:26:36,245: root: INFO: Current backtesting datetime 2022-02-26 09:29:00-05:00 +2024-04-13 18:26:36,245: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:26:36,246: root: INFO: Current backtesting datetime 2022-02-28 08:30:00-05:00 +2024-04-13 18:26:36,247: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:26:36,248: root: INFO: Current backtesting datetime 2022-02-28 09:30:00-05:00 +2024-04-13 18:26:36,248: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:26:36,249: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:36 +2024-04-13 18:26:36,249: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:36,250: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:36,250: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:36,250: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:36,250: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:37,751: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:37,752: root: INFO: Current backtesting datetime 2022-02-28 16:00:00-05:00 +2024-04-13 18:26:37,753: root: INFO: Current backtesting datetime 2022-03-01 09:30:00-05:00 +2024-04-13 18:26:37,753: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:37 +2024-04-13 18:26:37,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:37,754: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:37,754: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:37,755: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:37,755: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:39,029: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:39,030: root: INFO: Current backtesting datetime 2022-03-01 16:00:00-05:00 +2024-04-13 18:26:39,031: root: INFO: Current backtesting datetime 2022-03-02 09:30:00-05:00 +2024-04-13 18:26:39,031: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:39 +2024-04-13 18:26:39,031: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:39,032: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:39,032: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:39,033: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:39,033: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:40,022: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:40,023: root: INFO: Current backtesting datetime 2022-03-02 16:00:00-05:00 +2024-04-13 18:26:40,023: root: INFO: Current backtesting datetime 2022-03-03 09:30:00-05:00 +2024-04-13 18:26:40,023: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:40 +2024-04-13 18:26:40,024: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:40,024: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:40,025: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:40,025: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:40,025: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:40,767: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:40,768: root: INFO: Current backtesting datetime 2022-03-03 16:00:00-05:00 +2024-04-13 18:26:40,769: root: INFO: Current backtesting datetime 2022-03-04 09:30:00-05:00 +2024-04-13 18:26:40,769: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:40 +2024-04-13 18:26:40,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:40,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:40,770: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:40,770: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:40,770: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:41,502: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:41,504: root: INFO: Current backtesting datetime 2022-03-04 16:00:00-05:00 +2024-04-13 18:26:41,504: root: INFO: Current backtesting datetime 2022-03-05 09:30:00-05:00 +2024-04-13 18:26:41,504: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:26:41,506: root: INFO: Current backtesting datetime 2022-03-05 09:29:00-05:00 +2024-04-13 18:26:41,506: root: INFO: Current backtesting datetime 2022-03-05 09:29:00-05:00 +2024-04-13 18:26:41,506: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:26:41,508: root: INFO: Current backtesting datetime 2022-03-07 08:30:00-05:00 +2024-04-13 18:26:41,509: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:26:41,510: root: INFO: Current backtesting datetime 2022-03-07 09:30:00-05:00 +2024-04-13 18:26:41,510: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:26:41,511: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:41 +2024-04-13 18:26:41,511: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:41,512: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:41,512: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:41,512: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:41,512: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:42,694: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:42,695: root: INFO: Current backtesting datetime 2022-03-07 16:00:00-05:00 +2024-04-13 18:26:42,696: root: INFO: Current backtesting datetime 2022-03-08 09:30:00-05:00 +2024-04-13 18:26:42,696: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:42 +2024-04-13 18:26:42,696: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:42,697: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:42,697: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:42,698: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:42,698: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:43,902: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:43,902: root: INFO: Current backtesting datetime 2022-03-08 16:00:00-05:00 +2024-04-13 18:26:43,903: root: INFO: Current backtesting datetime 2022-03-09 09:30:00-05:00 +2024-04-13 18:26:43,903: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:43 +2024-04-13 18:26:43,903: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:43,904: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:43,904: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:43,905: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + cash, last_price, quantity = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:43,905: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:45,001: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:45,001: root: INFO: Current backtesting datetime 2022-03-09 16:00:00-05:00 +2024-04-13 18:26:45,002: root: INFO: Current backtesting datetime 2022-03-10 09:30:00-05:00 +2024-04-13 18:26:45,002: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:45 +2024-04-13 18:26:45,002: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:45,003: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:45,003: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:45,014: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:45,014: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:46,199: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:46,200: root: INFO: Current backtesting datetime 2022-03-10 16:00:00-05:00 +2024-04-13 18:26:46,200: root: INFO: Current backtesting datetime 2022-03-11 09:30:00-05:00 +2024-04-13 18:26:46,201: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:46 +2024-04-13 18:26:46,201: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:46,201: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:46,202: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:46,202: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:46,202: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:47,233: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:47,234: root: INFO: Current backtesting datetime 2022-03-11 16:00:00-05:00 +2024-04-13 18:26:47,234: root: INFO: Current backtesting datetime 2022-03-12 09:30:00-05:00 +2024-04-13 18:26:47,234: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:26:47,236: root: INFO: Current backtesting datetime 2022-03-12 09:29:00-05:00 +2024-04-13 18:26:47,237: root: INFO: Current backtesting datetime 2022-03-12 09:29:00-05:00 +2024-04-13 18:26:47,237: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:26:47,238: root: INFO: Current backtesting datetime 2022-03-14 07:30:00-05:00 +2024-04-13 18:26:47,238: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:26:47,239: root: INFO: Current backtesting datetime 2022-03-14 08:30:00-05:00 +2024-04-13 18:26:47,239: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:26:47,241: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:47 +2024-04-13 18:26:47,241: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:47,241: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:47,242: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:47,242: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:47,242: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:48,491: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:48,492: root: INFO: Current backtesting datetime 2022-03-14 15:00:00-05:00 +2024-04-13 18:26:48,492: root: INFO: Current backtesting datetime 2022-03-15 08:30:00-05:00 +2024-04-13 18:26:48,493: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:48 +2024-04-13 18:26:48,493: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:48,493: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:48,494: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:48,494: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:48,494: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:49,952: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:49,953: root: INFO: Current backtesting datetime 2022-03-15 15:00:00-05:00 +2024-04-13 18:26:49,953: root: INFO: Current backtesting datetime 2022-03-16 08:30:00-05:00 +2024-04-13 18:26:49,954: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:49 +2024-04-13 18:26:49,954: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:49,954: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:49,955: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:49,955: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:49,955: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:50,909: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:50,910: root: INFO: Current backtesting datetime 2022-03-16 15:00:00-05:00 +2024-04-13 18:26:50,911: root: INFO: Current backtesting datetime 2022-03-17 08:30:00-05:00 +2024-04-13 18:26:50,911: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:50 +2024-04-13 18:26:50,911: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:50,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:50,912: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:50,913: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:50,913: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:51,710: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:51,711: root: INFO: Current backtesting datetime 2022-03-17 15:00:00-05:00 +2024-04-13 18:26:51,711: root: INFO: Current backtesting datetime 2022-03-18 08:30:00-05:00 +2024-04-13 18:26:51,712: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:51 +2024-04-13 18:26:51,712: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:51,713: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:51,713: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:51,714: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:51,714: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:52,602: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:52,603: root: INFO: Current backtesting datetime 2022-03-18 15:00:00-05:00 +2024-04-13 18:26:52,603: root: INFO: Current backtesting datetime 2022-03-19 08:30:00-05:00 +2024-04-13 18:26:52,603: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:26:52,605: root: INFO: Current backtesting datetime 2022-03-19 08:29:00-05:00 +2024-04-13 18:26:52,606: root: INFO: Current backtesting datetime 2022-03-19 08:29:00-05:00 +2024-04-13 18:26:52,606: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:26:52,607: root: INFO: Current backtesting datetime 2022-03-21 07:30:00-05:00 +2024-04-13 18:26:52,607: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:26:52,608: root: INFO: Current backtesting datetime 2022-03-21 08:30:00-05:00 +2024-04-13 18:26:52,608: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:26:52,609: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:52 +2024-04-13 18:26:52,610: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:52,610: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:52,611: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:52,611: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:52,611: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:54,770: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:54,771: root: INFO: Current backtesting datetime 2022-03-21 15:00:00-05:00 +2024-04-13 18:26:54,771: root: INFO: Current backtesting datetime 2022-03-22 08:30:00-05:00 +2024-04-13 18:26:54,772: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:54 +2024-04-13 18:26:54,772: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:54,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:54,773: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:54,774: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:54,774: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:56,531: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:56,532: root: INFO: Current backtesting datetime 2022-03-22 15:00:00-05:00 +2024-04-13 18:26:56,532: root: INFO: Current backtesting datetime 2022-03-23 08:30:00-05:00 +2024-04-13 18:26:56,533: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:56 +2024-04-13 18:26:56,533: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:56,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:56,534: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:56,535: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:56,535: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:57,606: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:57,607: root: INFO: Current backtesting datetime 2022-03-23 15:00:00-05:00 +2024-04-13 18:26:57,607: root: INFO: Current backtesting datetime 2022-03-24 08:30:00-05:00 +2024-04-13 18:26:57,608: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:57 +2024-04-13 18:26:57,608: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:57,609: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:57,609: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:57,609: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:57,609: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:58,422: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:58,423: root: INFO: Current backtesting datetime 2022-03-24 15:00:00-05:00 +2024-04-13 18:26:58,423: root: INFO: Current backtesting datetime 2022-03-25 08:30:00-05:00 +2024-04-13 18:26:58,424: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:58 +2024-04-13 18:26:58,424: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:58,425: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:58,425: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:58,425: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:58,426: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:59,063: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:59,063: root: INFO: Current backtesting datetime 2022-03-25 15:00:00-05:00 +2024-04-13 18:26:59,063: root: INFO: Current backtesting datetime 2022-03-26 08:30:00-05:00 +2024-04-13 18:26:59,063: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:26:59,065: root: INFO: Current backtesting datetime 2022-03-26 08:29:00-05:00 +2024-04-13 18:26:59,067: root: INFO: Current backtesting datetime 2022-03-26 08:29:00-05:00 +2024-04-13 18:26:59,067: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:26:59,067: root: INFO: Current backtesting datetime 2022-03-28 07:30:00-05:00 +2024-04-13 18:26:59,068: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:26:59,069: root: INFO: Current backtesting datetime 2022-03-28 08:30:00-05:00 +2024-04-13 18:26:59,069: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:26:59,070: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:59 +2024-04-13 18:26:59,070: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:59,071: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:59,071: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:59,072: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:59,072: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:26:59,886: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:26:59,887: root: INFO: Current backtesting datetime 2022-03-28 15:00:00-05:00 +2024-04-13 18:26:59,887: root: INFO: Current backtesting datetime 2022-03-29 08:30:00-05:00 +2024-04-13 18:26:59,887: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:26:59 +2024-04-13 18:26:59,887: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:59,888: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:26:59,888: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:26:59,889: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:26:59,889: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:00,842: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:00,843: root: INFO: Current backtesting datetime 2022-03-29 15:00:00-05:00 +2024-04-13 18:27:00,843: root: INFO: Current backtesting datetime 2022-03-30 08:30:00-05:00 +2024-04-13 18:27:00,844: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:00 +2024-04-13 18:27:00,844: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:00,844: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:00,845: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:00,845: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:00,845: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:01,666: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:01,667: root: INFO: Current backtesting datetime 2022-03-30 15:00:00-05:00 +2024-04-13 18:27:01,667: root: INFO: Current backtesting datetime 2022-03-31 08:30:00-05:00 +2024-04-13 18:27:01,668: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:01 +2024-04-13 18:27:01,668: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:01,669: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:01,669: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:01,669: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:01,669: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:02,529: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:02,530: root: INFO: Current backtesting datetime 2022-03-31 15:00:00-05:00 +2024-04-13 18:27:02,530: root: INFO: Current backtesting datetime 2022-04-01 08:30:00-05:00 +2024-04-13 18:27:02,530: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:02 +2024-04-13 18:27:02,530: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:02,531: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:02,531: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:02,532: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:02,532: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:03,368: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:03,370: root: INFO: Current backtesting datetime 2022-04-01 15:00:00-05:00 +2024-04-13 18:27:03,370: root: INFO: Current backtesting datetime 2022-04-02 08:30:00-05:00 +2024-04-13 18:27:03,371: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:27:03,372: root: INFO: Current backtesting datetime 2022-04-02 08:29:00-05:00 +2024-04-13 18:27:03,373: root: INFO: Current backtesting datetime 2022-04-02 08:29:00-05:00 +2024-04-13 18:27:03,373: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:27:03,374: root: INFO: Current backtesting datetime 2022-04-04 07:30:00-05:00 +2024-04-13 18:27:03,375: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:27:03,376: root: INFO: Current backtesting datetime 2022-04-04 08:30:00-05:00 +2024-04-13 18:27:03,376: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:27:03,377: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:03 +2024-04-13 18:27:03,377: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:03,378: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:03,378: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:03,378: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:03,378: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:04,213: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:04,214: root: INFO: Current backtesting datetime 2022-04-04 15:00:00-05:00 +2024-04-13 18:27:04,215: root: INFO: Current backtesting datetime 2022-04-05 08:30:00-05:00 +2024-04-13 18:27:04,215: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:04 +2024-04-13 18:27:04,215: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:04,216: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:04,216: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:04,217: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:04,217: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:05,032: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:05,033: root: INFO: Current backtesting datetime 2022-04-05 15:00:00-05:00 +2024-04-13 18:27:05,033: root: INFO: Current backtesting datetime 2022-04-06 08:30:00-05:00 +2024-04-13 18:27:05,033: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:05 +2024-04-13 18:27:05,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:05,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:05,034: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:05,035: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:05,035: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:06,184: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:06,185: root: INFO: Current backtesting datetime 2022-04-06 15:00:00-05:00 +2024-04-13 18:27:06,185: root: INFO: Current backtesting datetime 2022-04-07 08:30:00-05:00 +2024-04-13 18:27:06,185: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:06 +2024-04-13 18:27:06,186: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:06,186: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:06,187: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:06,187: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:06,187: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:07,052: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:07,053: root: INFO: Current backtesting datetime 2022-04-07 15:00:00-05:00 +2024-04-13 18:27:07,053: root: INFO: Current backtesting datetime 2022-04-08 08:30:00-05:00 +2024-04-13 18:27:07,053: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:07 +2024-04-13 18:27:07,054: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:07,054: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:07,055: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:07,055: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:07,055: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:08,044: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:08,045: root: INFO: Current backtesting datetime 2022-04-08 15:00:00-05:00 +2024-04-13 18:27:08,045: root: INFO: Current backtesting datetime 2022-04-09 08:30:00-05:00 +2024-04-13 18:27:08,045: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:27:08,047: root: INFO: Current backtesting datetime 2022-04-09 08:29:00-05:00 +2024-04-13 18:27:08,048: root: INFO: Current backtesting datetime 2022-04-09 08:29:00-05:00 +2024-04-13 18:27:08,048: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:27:08,049: root: INFO: Current backtesting datetime 2022-04-11 07:30:00-05:00 +2024-04-13 18:27:08,049: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:27:08,051: root: INFO: Current backtesting datetime 2022-04-11 08:30:00-05:00 +2024-04-13 18:27:08,051: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:27:08,052: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:08 +2024-04-13 18:27:08,052: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:08,053: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:08,053: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:08,053: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:08,053: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:09,184: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:09,185: root: INFO: Current backtesting datetime 2022-04-11 15:00:00-05:00 +2024-04-13 18:27:09,185: root: INFO: Current backtesting datetime 2022-04-12 08:30:00-05:00 +2024-04-13 18:27:09,185: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:09 +2024-04-13 18:27:09,186: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:09,186: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:09,187: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:09,187: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + "buy", + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + stop_loss = last_price - atr * multiplier + ~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + today, three_days_prior = self.get_dates() + ^^^^^^^^^^^^^^^^ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:09,187: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:10,106: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:10,107: root: INFO: Current backtesting datetime 2022-04-12 15:00:00-05:00 +2024-04-13 18:27:10,107: root: INFO: Current backtesting datetime 2022-04-13 08:30:00-05:00 +2024-04-13 18:27:10,108: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:10 +2024-04-13 18:27:10,108: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:10,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:10,109: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:10,115: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:10,116: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:11,136: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:11,137: root: INFO: Current backtesting datetime 2022-04-13 15:00:00-05:00 +2024-04-13 18:27:11,137: root: INFO: Current backtesting datetime 2022-04-14 08:30:00-05:00 +2024-04-13 18:27:11,138: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:11 +2024-04-13 18:27:11,138: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:11,138: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:11,139: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:11,139: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:11,139: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:12,262: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:12,263: root: INFO: Current backtesting datetime 2022-04-14 15:00:00-05:00 +2024-04-13 18:27:12,264: root: INFO: Current backtesting datetime 2022-04-15 08:30:00-05:00 +2024-04-13 18:27:12,264: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:27:12,265: root: INFO: Current backtesting datetime 2022-04-15 08:29:00-05:00 +2024-04-13 18:27:12,267: root: INFO: Current backtesting datetime 2022-04-15 08:29:00-05:00 +2024-04-13 18:27:12,267: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:27:12,268: root: INFO: Current backtesting datetime 2022-04-18 07:30:00-05:00 +2024-04-13 18:27:12,268: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:27:12,269: root: INFO: Current backtesting datetime 2022-04-18 08:30:00-05:00 +2024-04-13 18:27:12,269: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:27:12,270: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:12 +2024-04-13 18:27:12,270: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:12,271: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:12,271: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:12,271: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:12,271: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:13,338: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:13,339: root: INFO: Current backtesting datetime 2022-04-18 15:00:00-05:00 +2024-04-13 18:27:13,340: root: INFO: Current backtesting datetime 2022-04-19 08:30:00-05:00 +2024-04-13 18:27:13,340: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:13 +2024-04-13 18:27:13,340: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:13,341: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:13,341: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:13,342: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:13,342: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:14,328: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:14,329: root: INFO: Current backtesting datetime 2022-04-19 15:00:00-05:00 +2024-04-13 18:27:14,329: root: INFO: Current backtesting datetime 2022-04-20 08:30:00-05:00 +2024-04-13 18:27:14,329: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:14 +2024-04-13 18:27:14,329: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:14,331: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:14,331: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:14,331: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:14,332: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:15,616: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:15,617: root: INFO: Current backtesting datetime 2022-04-20 15:00:00-05:00 +2024-04-13 18:27:15,617: root: INFO: Current backtesting datetime 2022-04-21 08:30:00-05:00 +2024-04-13 18:27:15,618: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:15 +2024-04-13 18:27:15,618: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:15,619: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:15,619: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:15,619: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:15,619: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:16,554: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:16,555: root: INFO: Current backtesting datetime 2022-04-21 15:00:00-05:00 +2024-04-13 18:27:16,556: root: INFO: Current backtesting datetime 2022-04-22 08:30:00-05:00 +2024-04-13 18:27:16,556: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:16 +2024-04-13 18:27:16,556: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:16,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:16,557: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:16,558: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:16,558: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:17,393: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:17,394: root: INFO: Current backtesting datetime 2022-04-22 15:00:00-05:00 +2024-04-13 18:27:17,394: root: INFO: Current backtesting datetime 2022-04-23 08:30:00-05:00 +2024-04-13 18:27:17,395: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:27:17,396: root: INFO: Current backtesting datetime 2022-04-23 08:29:00-05:00 +2024-04-13 18:27:17,397: root: INFO: Current backtesting datetime 2022-04-23 08:29:00-05:00 +2024-04-13 18:27:17,397: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:27:17,398: root: INFO: Current backtesting datetime 2022-04-25 07:30:00-05:00 +2024-04-13 18:27:17,399: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:27:17,399: root: INFO: Current backtesting datetime 2022-04-25 08:30:00-05:00 +2024-04-13 18:27:17,400: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:27:17,401: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:17 +2024-04-13 18:27:17,401: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:17,401: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:17,402: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:17,402: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:17,402: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:18,345: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:18,346: root: INFO: Current backtesting datetime 2022-04-25 15:00:00-05:00 +2024-04-13 18:27:18,347: root: INFO: Current backtesting datetime 2022-04-26 08:30:00-05:00 +2024-04-13 18:27:18,347: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:18 +2024-04-13 18:27:18,347: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:18,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:18,348: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:18,349: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:18,349: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:19,678: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:19,679: root: INFO: Current backtesting datetime 2022-04-26 15:00:00-05:00 +2024-04-13 18:27:19,679: root: INFO: Current backtesting datetime 2022-04-27 08:30:00-05:00 +2024-04-13 18:27:19,680: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:19 +2024-04-13 18:27:19,680: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:19,681: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:19,681: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:19,681: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:19,681: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:21,145: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:21,146: root: INFO: Current backtesting datetime 2022-04-27 15:00:00-05:00 +2024-04-13 18:27:21,146: root: INFO: Current backtesting datetime 2022-04-28 08:30:00-05:00 +2024-04-13 18:27:21,147: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:21 +2024-04-13 18:27:21,147: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:21,148: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:21,148: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:21,148: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:21,148: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:22,234: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:22,235: root: INFO: Current backtesting datetime 2022-04-28 15:00:00-05:00 +2024-04-13 18:27:22,236: root: INFO: Current backtesting datetime 2022-04-29 08:30:00-05:00 +2024-04-13 18:27:22,236: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:22 +2024-04-13 18:27:22,236: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:22,237: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:22,237: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:22,238: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:22,238: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:22,998: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:22,999: root: INFO: Current backtesting datetime 2022-04-29 15:00:00-05:00 +2024-04-13 18:27:22,999: root: INFO: Current backtesting datetime 2022-04-30 08:30:00-05:00 +2024-04-13 18:27:22,999: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:27:23,000: root: INFO: Current backtesting datetime 2022-04-30 08:29:00-05:00 +2024-04-13 18:27:23,002: root: INFO: Current backtesting datetime 2022-04-30 08:29:00-05:00 +2024-04-13 18:27:23,002: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:27:23,003: root: INFO: Current backtesting datetime 2022-05-02 07:30:00-05:00 +2024-04-13 18:27:23,003: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:27:23,004: root: INFO: Current backtesting datetime 2022-05-02 08:30:00-05:00 +2024-04-13 18:27:23,004: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:27:23,005: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:23 +2024-04-13 18:27:23,005: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:23,006: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:23,006: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:23,007: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:23,007: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:23,997: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:23,997: root: INFO: Current backtesting datetime 2022-05-02 15:00:00-05:00 +2024-04-13 18:27:23,998: root: INFO: Current backtesting datetime 2022-05-03 08:30:00-05:00 +2024-04-13 18:27:23,998: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:23 +2024-04-13 18:27:23,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:23,999: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:23,999: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:24,000: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:24,000: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:25,470: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:25,471: root: INFO: Current backtesting datetime 2022-05-03 15:00:00-05:00 +2024-04-13 18:27:25,471: root: INFO: Current backtesting datetime 2022-05-04 08:30:00-05:00 +2024-04-13 18:27:25,472: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:25 +2024-04-13 18:27:25,472: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:25,473: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:25,474: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:25,474: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:25,474: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:26,727: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:26,728: root: INFO: Current backtesting datetime 2022-05-04 15:00:00-05:00 +2024-04-13 18:27:26,728: root: INFO: Current backtesting datetime 2022-05-05 08:30:00-05:00 +2024-04-13 18:27:26,729: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:26 +2024-04-13 18:27:26,729: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:26,730: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:26,730: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:26,730: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:26,730: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:27,887: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:27,888: root: INFO: Current backtesting datetime 2022-05-05 15:00:00-05:00 +2024-04-13 18:27:27,888: root: INFO: Current backtesting datetime 2022-05-06 08:30:00-05:00 +2024-04-13 18:27:27,889: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:27 +2024-04-13 18:27:27,889: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:27,889: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:27,890: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:27,890: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:27,890: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:28,921: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:28,922: root: INFO: Current backtesting datetime 2022-05-06 15:00:00-05:00 +2024-04-13 18:27:28,922: root: INFO: Current backtesting datetime 2022-05-07 08:30:00-05:00 +2024-04-13 18:27:28,923: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:27:28,924: root: INFO: Current backtesting datetime 2022-05-07 08:29:00-05:00 +2024-04-13 18:27:28,925: root: INFO: Current backtesting datetime 2022-05-07 08:29:00-05:00 +2024-04-13 18:27:28,926: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:27:28,926: root: INFO: Current backtesting datetime 2022-05-09 07:30:00-05:00 +2024-04-13 18:27:28,927: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:27:28,928: root: INFO: Current backtesting datetime 2022-05-09 08:30:00-05:00 +2024-04-13 18:27:28,928: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:27:28,929: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:28 +2024-04-13 18:27:28,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:28,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:28,930: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:28,930: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:28,930: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:29,771: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:29,772: root: INFO: Current backtesting datetime 2022-05-09 15:00:00-05:00 +2024-04-13 18:27:29,772: root: INFO: Current backtesting datetime 2022-05-10 08:30:00-05:00 +2024-04-13 18:27:29,772: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:29 +2024-04-13 18:27:29,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:29,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:29,774: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:29,774: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:29,774: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:30,830: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:30,832: root: INFO: Current backtesting datetime 2022-05-10 15:00:00-05:00 +2024-04-13 18:27:30,832: root: INFO: Current backtesting datetime 2022-05-11 08:30:00-05:00 +2024-04-13 18:27:30,832: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:30 +2024-04-13 18:27:30,833: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:30,833: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:30,834: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:30,834: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:30,834: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:32,184: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:32,185: root: INFO: Current backtesting datetime 2022-05-11 15:00:00-05:00 +2024-04-13 18:27:32,185: root: INFO: Current backtesting datetime 2022-05-12 08:30:00-05:00 +2024-04-13 18:27:32,185: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:32 +2024-04-13 18:27:32,187: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:32,187: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:32,188: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:32,188: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:32,188: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:33,099: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:33,100: root: INFO: Current backtesting datetime 2022-05-12 15:00:00-05:00 +2024-04-13 18:27:33,100: root: INFO: Current backtesting datetime 2022-05-13 08:30:00-05:00 +2024-04-13 18:27:33,100: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:33 +2024-04-13 18:27:33,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:33,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:33,102: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:33,102: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:33,102: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:34,387: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:34,388: root: INFO: Current backtesting datetime 2022-05-13 15:00:00-05:00 +2024-04-13 18:27:34,388: root: INFO: Current backtesting datetime 2022-05-14 08:30:00-05:00 +2024-04-13 18:27:34,389: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:27:34,390: root: INFO: Current backtesting datetime 2022-05-14 08:29:00-05:00 +2024-04-13 18:27:34,391: root: INFO: Current backtesting datetime 2022-05-14 08:29:00-05:00 +2024-04-13 18:27:34,391: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:27:34,392: root: INFO: Current backtesting datetime 2022-05-16 07:30:00-05:00 +2024-04-13 18:27:34,393: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:27:34,394: root: INFO: Current backtesting datetime 2022-05-16 08:30:00-05:00 +2024-04-13 18:27:34,394: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:27:34,395: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:34 +2024-04-13 18:27:34,395: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:34,396: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:34,396: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:34,396: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:34,396: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:36,231: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:36,232: root: INFO: Current backtesting datetime 2022-05-16 15:00:00-05:00 +2024-04-13 18:27:36,232: root: INFO: Current backtesting datetime 2022-05-17 08:30:00-05:00 +2024-04-13 18:27:36,232: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:36 +2024-04-13 18:27:36,232: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:36,233: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:36,233: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:36,234: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:36,234: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:37,469: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:37,470: root: INFO: Current backtesting datetime 2022-05-17 15:00:00-05:00 +2024-04-13 18:27:37,470: root: INFO: Current backtesting datetime 2022-05-18 08:30:00-05:00 +2024-04-13 18:27:37,471: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:37 +2024-04-13 18:27:37,471: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:37,471: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:37,472: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:37,472: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:37,472: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:38,880: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:38,881: root: INFO: Current backtesting datetime 2022-05-18 15:00:00-05:00 +2024-04-13 18:27:38,881: root: INFO: Current backtesting datetime 2022-05-19 08:30:00-05:00 +2024-04-13 18:27:38,882: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:38 +2024-04-13 18:27:38,882: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:38,882: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:38,883: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:38,883: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:38,883: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:40,296: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:40,297: root: INFO: Current backtesting datetime 2022-05-19 15:00:00-05:00 +2024-04-13 18:27:40,297: root: INFO: Current backtesting datetime 2022-05-20 08:30:00-05:00 +2024-04-13 18:27:40,298: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:40 +2024-04-13 18:27:40,298: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:40,299: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:40,299: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:40,300: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:40,300: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:42,070: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:42,071: root: INFO: Current backtesting datetime 2022-05-20 15:00:00-05:00 +2024-04-13 18:27:42,071: root: INFO: Current backtesting datetime 2022-05-21 08:30:00-05:00 +2024-04-13 18:27:42,072: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:27:42,073: root: INFO: Current backtesting datetime 2022-05-21 08:29:00-05:00 +2024-04-13 18:27:42,074: root: INFO: Current backtesting datetime 2022-05-21 08:29:00-05:00 +2024-04-13 18:27:42,074: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:27:42,074: root: INFO: Current backtesting datetime 2022-05-23 07:30:00-05:00 +2024-04-13 18:27:42,075: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:27:42,076: root: INFO: Current backtesting datetime 2022-05-23 08:30:00-05:00 +2024-04-13 18:27:42,076: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:27:42,077: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:42 +2024-04-13 18:27:42,077: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:42,078: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:42,078: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:42,079: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:42,079: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:43,399: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:43,400: root: INFO: Current backtesting datetime 2022-05-23 15:00:00-05:00 +2024-04-13 18:27:43,401: root: INFO: Current backtesting datetime 2022-05-24 08:30:00-05:00 +2024-04-13 18:27:43,401: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:43 +2024-04-13 18:27:43,401: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:43,402: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:43,402: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:43,403: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:43,403: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:44,428: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:44,429: root: INFO: Current backtesting datetime 2022-05-24 15:00:00-05:00 +2024-04-13 18:27:44,429: root: INFO: Current backtesting datetime 2022-05-25 08:30:00-05:00 +2024-04-13 18:27:44,430: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:44 +2024-04-13 18:27:44,430: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:44,431: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:44,431: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:44,431: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:44,432: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:45,898: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:45,899: root: INFO: Current backtesting datetime 2022-05-25 15:00:00-05:00 +2024-04-13 18:27:45,899: root: INFO: Current backtesting datetime 2022-05-26 08:30:00-05:00 +2024-04-13 18:27:45,899: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:45 +2024-04-13 18:27:45,900: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:45,900: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:45,901: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:45,901: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:45,901: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:48,084: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:48,085: root: INFO: Current backtesting datetime 2022-05-26 15:00:00-05:00 +2024-04-13 18:27:48,085: root: INFO: Current backtesting datetime 2022-05-27 08:30:00-05:00 +2024-04-13 18:27:48,085: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:48 +2024-04-13 18:27:48,085: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:48,086: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:48,086: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:48,087: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:48,087: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:27:49,822: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:27:49,823: root: INFO: Current backtesting datetime 2022-05-27 15:00:00-05:00 +2024-04-13 18:27:49,824: root: INFO: Current backtesting datetime 2022-05-28 08:30:00-05:00 +2024-04-13 18:27:49,824: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:27:49,826: root: INFO: Current backtesting datetime 2022-05-28 08:29:00-05:00 +2024-04-13 18:27:49,827: root: INFO: Current backtesting datetime 2022-05-28 08:29:00-05:00 +2024-04-13 18:27:49,827: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:27:49,828: root: INFO: Current backtesting datetime 2022-05-31 07:30:00-05:00 +2024-04-13 18:27:49,828: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:27:49,829: root: INFO: Current backtesting datetime 2022-05-31 08:30:00-05:00 +2024-04-13 18:27:49,829: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:27:49,830: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:27:49 +2024-04-13 18:27:49,830: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:49,831: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:27:49,831: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:27:49,832: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 70, in on_trading_iteration + quantity, + + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in position_sizing + take_profit = last_price + atr * multiplier + ~~~~~~^~~~~~~~~~~~~ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 50, in set_take_profit_stop_loss + def get_sentiment(self): + +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:27:49,832: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method diff --git a/logs/MLTrader_2024-04-13_18-15-04_stats.csv b/logs/MLTrader_2024-04-13_18-15-04_stats.csv new file mode 100644 index 0000000..193263f --- /dev/null +++ b/logs/MLTrader_2024-04-13_18-15-04_stats.csv @@ -0,0 +1,736 @@ +datetime,portfolio_value,cash,return +2020-01-02 09:30:00-05:00,100000.0,100000.0, +2020-01-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-08 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-09 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-15 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-16 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-17 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-22 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-23 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-29 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-30 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-31 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-12 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-13 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-15 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-19 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-20 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-26 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-27 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-29 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-11-02 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-09 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-12 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-13 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-16 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-17 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-19 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-20 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-23 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-26 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-27 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-30 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-01 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-02 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-08 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-09 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-12 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-15 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-16 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-17 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-19 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-22 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-23 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-29 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-30 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-31 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-05 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-15 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-19 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-26 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-29 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-30 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-02 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-05 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-17 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-19 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-26 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-05 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-31 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-31 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-15 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-17 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-18 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-19 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-24 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-25 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-26 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-29 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-30 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-02 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-03 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-07 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-14 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-15 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-17 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-18 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-21 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-24 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-28 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-29 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-30 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-31 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-15 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-18 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-19 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-20 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-22 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-24 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-26 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-29 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-31 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-02 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-09 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-14 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-15 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-16 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-17 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-19 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-23 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-26 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-28 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-09 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-28 09:30:00-04:00,100000.0,100000.0,0.0 diff --git a/logs/MLTrader_2024-04-13_18-28-07_logs.csv b/logs/MLTrader_2024-04-13_18-28-07_logs.csv new file mode 100644 index 0000000..15941c5 --- /dev/null +++ b/logs/MLTrader_2024-04-13_18-28-07_logs.csv @@ -0,0 +1,29894 @@ +2024-04-13 18:28:07,609: asyncio: INFO: [MLTrader] Executing the initialize lifecycle method +2024-04-13 18:28:08,683: root: INFO: Current backtesting datetime 2020-01-02 08:30:00-05:00 +2024-04-13 18:28:08,683: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:28:08,684: root: INFO: Current backtesting datetime 2020-01-02 09:30:00-05:00 +2024-04-13 18:28:08,684: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:28:08,685: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:08 +2024-04-13 18:28:08,694: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:08,703: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:08,703: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:08,704: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:08,704: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:08,705: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:08,706: root: INFO: Current backtesting datetime 2020-01-02 16:00:00-05:00 +2024-04-13 18:28:08,706: root: INFO: Current backtesting datetime 2020-01-03 09:30:00-05:00 +2024-04-13 18:28:08,706: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:08 +2024-04-13 18:28:08,706: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:08,708: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:08,708: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:08,708: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:08,709: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:18,528: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:18,530: root: INFO: Current backtesting datetime 2020-01-03 16:00:00-05:00 +2024-04-13 18:28:18,530: root: INFO: Current backtesting datetime 2020-01-04 09:30:00-05:00 +2024-04-13 18:28:18,530: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:28:18,531: root: INFO: Current backtesting datetime 2020-01-04 09:29:00-05:00 +2024-04-13 18:28:18,533: root: INFO: Current backtesting datetime 2020-01-04 09:29:00-05:00 +2024-04-13 18:28:18,533: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:28:18,534: root: INFO: Current backtesting datetime 2020-01-06 08:30:00-05:00 +2024-04-13 18:28:18,535: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:28:18,536: root: INFO: Current backtesting datetime 2020-01-06 09:30:00-05:00 +2024-04-13 18:28:18,536: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:28:18,537: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:18 +2024-04-13 18:28:18,537: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:18,537: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:18,538: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:18,538: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:18,538: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:19,603: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:19,604: root: INFO: Current backtesting datetime 2020-01-06 16:00:00-05:00 +2024-04-13 18:28:19,605: root: INFO: Current backtesting datetime 2020-01-07 09:30:00-05:00 +2024-04-13 18:28:19,605: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:19 +2024-04-13 18:28:19,605: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:19,606: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:19,606: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:19,607: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:19,607: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:20,731: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:20,732: root: INFO: Current backtesting datetime 2020-01-07 16:00:00-05:00 +2024-04-13 18:28:20,732: root: INFO: Current backtesting datetime 2020-01-08 09:30:00-05:00 +2024-04-13 18:28:20,733: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:20 +2024-04-13 18:28:20,733: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:20,734: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:20,734: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:20,734: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:20,734: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:23,380: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:23,382: root: INFO: Current backtesting datetime 2020-01-08 16:00:00-05:00 +2024-04-13 18:28:23,382: root: INFO: Current backtesting datetime 2020-01-09 09:30:00-05:00 +2024-04-13 18:28:23,382: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:23 +2024-04-13 18:28:23,382: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:23,383: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:23,383: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:23,384: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:23,384: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:24,526: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:24,527: root: INFO: Current backtesting datetime 2020-01-09 16:00:00-05:00 +2024-04-13 18:28:24,527: root: INFO: Current backtesting datetime 2020-01-10 09:30:00-05:00 +2024-04-13 18:28:24,527: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:24 +2024-04-13 18:28:24,527: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:24,528: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:24,528: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:24,529: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:24,529: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:25,944: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:25,945: root: INFO: Current backtesting datetime 2020-01-10 16:00:00-05:00 +2024-04-13 18:28:25,946: root: INFO: Current backtesting datetime 2020-01-11 09:30:00-05:00 +2024-04-13 18:28:25,946: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:28:25,947: root: INFO: Current backtesting datetime 2020-01-11 09:29:00-05:00 +2024-04-13 18:28:25,949: root: INFO: Current backtesting datetime 2020-01-11 09:29:00-05:00 +2024-04-13 18:28:25,949: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:28:25,950: root: INFO: Current backtesting datetime 2020-01-13 08:30:00-05:00 +2024-04-13 18:28:25,950: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:28:25,951: root: INFO: Current backtesting datetime 2020-01-13 09:30:00-05:00 +2024-04-13 18:28:25,951: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:28:25,952: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:25 +2024-04-13 18:28:25,952: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:25,953: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:25,953: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:25,954: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:25,954: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:26,936: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:26,937: root: INFO: Current backtesting datetime 2020-01-13 16:00:00-05:00 +2024-04-13 18:28:26,937: root: INFO: Current backtesting datetime 2020-01-14 09:30:00-05:00 +2024-04-13 18:28:26,938: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:26 +2024-04-13 18:28:26,938: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:26,939: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:26,939: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:26,939: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:26,940: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:27,949: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:27,950: root: INFO: Current backtesting datetime 2020-01-14 16:00:00-05:00 +2024-04-13 18:28:27,950: root: INFO: Current backtesting datetime 2020-01-15 09:30:00-05:00 +2024-04-13 18:28:27,951: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:27 +2024-04-13 18:28:27,951: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:27,952: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:27,952: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:27,952: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:27,952: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:28,796: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:28,797: root: INFO: Current backtesting datetime 2020-01-15 16:00:00-05:00 +2024-04-13 18:28:28,797: root: INFO: Current backtesting datetime 2020-01-16 09:30:00-05:00 +2024-04-13 18:28:28,798: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:28 +2024-04-13 18:28:28,798: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:28,799: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:28,799: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:28,799: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:28,799: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:29,546: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:29,547: root: INFO: Current backtesting datetime 2020-01-16 16:00:00-05:00 +2024-04-13 18:28:29,547: root: INFO: Current backtesting datetime 2020-01-17 09:30:00-05:00 +2024-04-13 18:28:29,548: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:29 +2024-04-13 18:28:29,548: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:29,548: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:29,549: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:29,549: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:29,549: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:30,270: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:30,271: root: INFO: Current backtesting datetime 2020-01-17 16:00:00-05:00 +2024-04-13 18:28:30,271: root: INFO: Current backtesting datetime 2020-01-18 09:30:00-05:00 +2024-04-13 18:28:30,272: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:28:30,273: root: INFO: Current backtesting datetime 2020-01-18 09:29:00-05:00 +2024-04-13 18:28:30,274: root: INFO: Current backtesting datetime 2020-01-18 09:29:00-05:00 +2024-04-13 18:28:30,274: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:28:30,276: root: INFO: Current backtesting datetime 2020-01-21 08:30:00-05:00 +2024-04-13 18:28:30,276: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:28:30,277: root: INFO: Current backtesting datetime 2020-01-21 09:30:00-05:00 +2024-04-13 18:28:30,277: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:28:30,278: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:30 +2024-04-13 18:28:30,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:30,279: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:30,279: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:30,280: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:30,280: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:32,245: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:32,246: root: INFO: Current backtesting datetime 2020-01-21 16:00:00-05:00 +2024-04-13 18:28:32,246: root: INFO: Current backtesting datetime 2020-01-22 09:30:00-05:00 +2024-04-13 18:28:32,246: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:32 +2024-04-13 18:28:32,246: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:32,247: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:32,247: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:32,248: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:32,248: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:33,532: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:33,533: root: INFO: Current backtesting datetime 2020-01-22 16:00:00-05:00 +2024-04-13 18:28:33,533: root: INFO: Current backtesting datetime 2020-01-23 09:30:00-05:00 +2024-04-13 18:28:33,533: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:33 +2024-04-13 18:28:33,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:33,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:33,535: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:33,535: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:33,535: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:34,660: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:34,661: root: INFO: Current backtesting datetime 2020-01-23 16:00:00-05:00 +2024-04-13 18:28:34,661: root: INFO: Current backtesting datetime 2020-01-24 09:30:00-05:00 +2024-04-13 18:28:34,662: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:34 +2024-04-13 18:28:34,662: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:34,663: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:34,663: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:34,663: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:34,663: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:35,758: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:35,759: root: INFO: Current backtesting datetime 2020-01-24 16:00:00-05:00 +2024-04-13 18:28:35,760: root: INFO: Current backtesting datetime 2020-01-25 09:30:00-05:00 +2024-04-13 18:28:35,760: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:28:35,761: root: INFO: Current backtesting datetime 2020-01-25 09:29:00-05:00 +2024-04-13 18:28:35,762: root: INFO: Current backtesting datetime 2020-01-25 09:29:00-05:00 +2024-04-13 18:28:35,762: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:28:35,763: root: INFO: Current backtesting datetime 2020-01-27 08:30:00-05:00 +2024-04-13 18:28:35,763: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:28:35,765: root: INFO: Current backtesting datetime 2020-01-27 09:30:00-05:00 +2024-04-13 18:28:35,765: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:28:35,766: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:35 +2024-04-13 18:28:35,766: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:35,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:35,767: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:35,767: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:35,767: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:37,252: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:37,253: root: INFO: Current backtesting datetime 2020-01-27 16:00:00-05:00 +2024-04-13 18:28:37,253: root: INFO: Current backtesting datetime 2020-01-28 09:30:00-05:00 +2024-04-13 18:28:37,254: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:37 +2024-04-13 18:28:37,254: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:37,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:37,255: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:37,255: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:37,255: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:38,965: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:38,966: root: INFO: Current backtesting datetime 2020-01-28 16:00:00-05:00 +2024-04-13 18:28:38,967: root: INFO: Current backtesting datetime 2020-01-29 09:30:00-05:00 +2024-04-13 18:28:38,967: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:38 +2024-04-13 18:28:38,967: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:38,968: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:38,968: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:38,969: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:38,969: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:39,704: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:39,705: root: INFO: Current backtesting datetime 2020-01-29 16:00:00-05:00 +2024-04-13 18:28:39,705: root: INFO: Current backtesting datetime 2020-01-30 09:30:00-05:00 +2024-04-13 18:28:39,705: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:39 +2024-04-13 18:28:39,705: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:39,706: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:39,706: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:39,707: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:39,707: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:40,439: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:40,440: root: INFO: Current backtesting datetime 2020-01-30 16:00:00-05:00 +2024-04-13 18:28:40,441: root: INFO: Current backtesting datetime 2020-01-31 09:30:00-05:00 +2024-04-13 18:28:40,441: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:40 +2024-04-13 18:28:40,441: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:40,442: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:40,442: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:40,443: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:40,443: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:40,905: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:40,906: root: INFO: Current backtesting datetime 2020-01-31 16:00:00-05:00 +2024-04-13 18:28:40,906: root: INFO: Current backtesting datetime 2020-02-01 09:30:00-05:00 +2024-04-13 18:28:40,906: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:28:40,908: root: INFO: Current backtesting datetime 2020-02-01 09:29:00-05:00 +2024-04-13 18:28:40,909: root: INFO: Current backtesting datetime 2020-02-01 09:29:00-05:00 +2024-04-13 18:28:40,909: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:28:40,910: root: INFO: Current backtesting datetime 2020-02-03 08:30:00-05:00 +2024-04-13 18:28:40,910: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:28:40,911: root: INFO: Current backtesting datetime 2020-02-03 09:30:00-05:00 +2024-04-13 18:28:40,911: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:28:40,912: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:40 +2024-04-13 18:28:40,913: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:40,913: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:40,914: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:40,914: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:40,914: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:41,648: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:41,650: root: INFO: Current backtesting datetime 2020-02-03 16:00:00-05:00 +2024-04-13 18:28:41,650: root: INFO: Current backtesting datetime 2020-02-04 09:30:00-05:00 +2024-04-13 18:28:41,650: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:41 +2024-04-13 18:28:41,650: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:41,651: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:41,651: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:41,652: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:41,652: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:42,591: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:42,591: root: INFO: Current backtesting datetime 2020-02-04 16:00:00-05:00 +2024-04-13 18:28:42,592: root: INFO: Current backtesting datetime 2020-02-05 09:30:00-05:00 +2024-04-13 18:28:42,592: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:42 +2024-04-13 18:28:42,592: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:42,593: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:42,593: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:42,594: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:42,594: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:43,755: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:43,756: root: INFO: Current backtesting datetime 2020-02-05 16:00:00-05:00 +2024-04-13 18:28:43,756: root: INFO: Current backtesting datetime 2020-02-06 09:30:00-05:00 +2024-04-13 18:28:43,756: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:43 +2024-04-13 18:28:43,756: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:43,758: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:43,758: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:43,759: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:43,759: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:44,897: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:44,898: root: INFO: Current backtesting datetime 2020-02-06 16:00:00-05:00 +2024-04-13 18:28:44,898: root: INFO: Current backtesting datetime 2020-02-07 09:30:00-05:00 +2024-04-13 18:28:44,899: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:44 +2024-04-13 18:28:44,899: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:44,900: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:44,900: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:44,900: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:44,900: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:45,887: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:45,888: root: INFO: Current backtesting datetime 2020-02-07 16:00:00-05:00 +2024-04-13 18:28:45,888: root: INFO: Current backtesting datetime 2020-02-08 09:30:00-05:00 +2024-04-13 18:28:45,889: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:28:45,890: root: INFO: Current backtesting datetime 2020-02-08 09:29:00-05:00 +2024-04-13 18:28:45,891: root: INFO: Current backtesting datetime 2020-02-08 09:29:00-05:00 +2024-04-13 18:28:45,891: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:28:45,892: root: INFO: Current backtesting datetime 2020-02-10 08:30:00-05:00 +2024-04-13 18:28:45,893: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:28:45,894: root: INFO: Current backtesting datetime 2020-02-10 09:30:00-05:00 +2024-04-13 18:28:45,894: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:28:45,895: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:45 +2024-04-13 18:28:45,895: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:45,896: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:45,896: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:45,896: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:45,896: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:46,863: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:46,864: root: INFO: Current backtesting datetime 2020-02-10 16:00:00-05:00 +2024-04-13 18:28:46,864: root: INFO: Current backtesting datetime 2020-02-11 09:30:00-05:00 +2024-04-13 18:28:46,865: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:46 +2024-04-13 18:28:46,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:46,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:46,866: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:46,866: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:46,866: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:48,074: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:48,075: root: INFO: Current backtesting datetime 2020-02-11 16:00:00-05:00 +2024-04-13 18:28:48,075: root: INFO: Current backtesting datetime 2020-02-12 09:30:00-05:00 +2024-04-13 18:28:48,076: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:48 +2024-04-13 18:28:48,076: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:48,076: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:48,077: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:48,077: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:48,077: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:49,588: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:49,589: root: INFO: Current backtesting datetime 2020-02-12 16:00:00-05:00 +2024-04-13 18:28:49,590: root: INFO: Current backtesting datetime 2020-02-13 09:30:00-05:00 +2024-04-13 18:28:49,590: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:49 +2024-04-13 18:28:49,590: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:49,591: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:49,591: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:49,592: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:49,592: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:50,747: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:50,748: root: INFO: Current backtesting datetime 2020-02-13 16:00:00-05:00 +2024-04-13 18:28:50,749: root: INFO: Current backtesting datetime 2020-02-14 09:30:00-05:00 +2024-04-13 18:28:50,749: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:50 +2024-04-13 18:28:50,749: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:50,751: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:50,751: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:50,751: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:50,751: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:51,923: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:51,924: root: INFO: Current backtesting datetime 2020-02-14 16:00:00-05:00 +2024-04-13 18:28:51,924: root: INFO: Current backtesting datetime 2020-02-15 09:30:00-05:00 +2024-04-13 18:28:51,924: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:28:51,926: root: INFO: Current backtesting datetime 2020-02-15 09:29:00-05:00 +2024-04-13 18:28:51,927: root: INFO: Current backtesting datetime 2020-02-15 09:29:00-05:00 +2024-04-13 18:28:51,927: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:28:51,928: root: INFO: Current backtesting datetime 2020-02-18 08:30:00-05:00 +2024-04-13 18:28:51,929: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:28:51,930: root: INFO: Current backtesting datetime 2020-02-18 09:30:00-05:00 +2024-04-13 18:28:51,930: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:28:51,931: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:51 +2024-04-13 18:28:51,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:51,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:51,932: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:51,932: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:51,932: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:53,419: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:53,420: root: INFO: Current backtesting datetime 2020-02-18 16:00:00-05:00 +2024-04-13 18:28:53,421: root: INFO: Current backtesting datetime 2020-02-19 09:30:00-05:00 +2024-04-13 18:28:53,421: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:53 +2024-04-13 18:28:53,421: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:53,422: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:53,422: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:53,423: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:53,423: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:54,447: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:54,448: root: INFO: Current backtesting datetime 2020-02-19 16:00:00-05:00 +2024-04-13 18:28:54,448: root: INFO: Current backtesting datetime 2020-02-20 09:30:00-05:00 +2024-04-13 18:28:54,449: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:54 +2024-04-13 18:28:54,449: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:54,450: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:54,450: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:54,450: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:54,450: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:55,676: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:55,677: root: INFO: Current backtesting datetime 2020-02-20 16:00:00-05:00 +2024-04-13 18:28:55,678: root: INFO: Current backtesting datetime 2020-02-21 09:30:00-05:00 +2024-04-13 18:28:55,678: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:55 +2024-04-13 18:28:55,678: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:55,679: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:55,679: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:55,680: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:55,680: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:57,561: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:57,562: root: INFO: Current backtesting datetime 2020-02-21 16:00:00-05:00 +2024-04-13 18:28:57,563: root: INFO: Current backtesting datetime 2020-02-22 09:30:00-05:00 +2024-04-13 18:28:57,563: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:28:57,565: root: INFO: Current backtesting datetime 2020-02-22 09:29:00-05:00 +2024-04-13 18:28:57,565: root: INFO: Current backtesting datetime 2020-02-22 09:29:00-05:00 +2024-04-13 18:28:57,567: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:28:57,567: root: INFO: Current backtesting datetime 2020-02-24 08:30:00-05:00 +2024-04-13 18:28:57,568: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:28:57,569: root: INFO: Current backtesting datetime 2020-02-24 09:30:00-05:00 +2024-04-13 18:28:57,569: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:28:57,570: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:57 +2024-04-13 18:28:57,570: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:57,571: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:57,571: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:57,571: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:57,572: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:28:58,751: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:28:58,752: root: INFO: Current backtesting datetime 2020-02-24 16:00:00-05:00 +2024-04-13 18:28:58,753: root: INFO: Current backtesting datetime 2020-02-25 09:30:00-05:00 +2024-04-13 18:28:58,753: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:28:58 +2024-04-13 18:28:58,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:58,754: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:28:58,754: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:28:58,755: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:28:58,755: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:01,351: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:01,352: root: INFO: Current backtesting datetime 2020-02-25 16:00:00-05:00 +2024-04-13 18:29:01,352: root: INFO: Current backtesting datetime 2020-02-26 09:30:00-05:00 +2024-04-13 18:29:01,352: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:01 +2024-04-13 18:29:01,353: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:01,353: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:01,354: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:01,354: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:01,354: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:02,424: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:02,425: root: INFO: Current backtesting datetime 2020-02-26 16:00:00-05:00 +2024-04-13 18:29:02,425: root: INFO: Current backtesting datetime 2020-02-27 09:30:00-05:00 +2024-04-13 18:29:02,426: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:02 +2024-04-13 18:29:02,426: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:02,427: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:02,427: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:02,427: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:02,427: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:04,338: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:04,339: root: INFO: Current backtesting datetime 2020-02-27 16:00:00-05:00 +2024-04-13 18:29:04,339: root: INFO: Current backtesting datetime 2020-02-28 09:30:00-05:00 +2024-04-13 18:29:04,340: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:04 +2024-04-13 18:29:04,340: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:04,341: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:04,341: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:04,341: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:04,341: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:05,665: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:05,665: root: INFO: Current backtesting datetime 2020-02-28 16:00:00-05:00 +2024-04-13 18:29:05,666: root: INFO: Current backtesting datetime 2020-02-29 09:30:00-05:00 +2024-04-13 18:29:05,666: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:29:05,668: root: INFO: Current backtesting datetime 2020-02-29 09:29:00-05:00 +2024-04-13 18:29:05,669: root: INFO: Current backtesting datetime 2020-02-29 09:29:00-05:00 +2024-04-13 18:29:05,669: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:29:05,670: root: INFO: Current backtesting datetime 2020-03-02 08:30:00-05:00 +2024-04-13 18:29:05,670: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:29:05,671: root: INFO: Current backtesting datetime 2020-03-02 09:30:00-05:00 +2024-04-13 18:29:05,671: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:29:05,671: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:05 +2024-04-13 18:29:05,671: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:05,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:05,673: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:05,674: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:05,674: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:06,829: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:06,830: root: INFO: Current backtesting datetime 2020-03-02 16:00:00-05:00 +2024-04-13 18:29:06,831: root: INFO: Current backtesting datetime 2020-03-03 09:30:00-05:00 +2024-04-13 18:29:06,831: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:06 +2024-04-13 18:29:06,831: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:06,832: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:06,832: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:06,833: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:06,833: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:07,594: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:07,595: root: INFO: Current backtesting datetime 2020-03-03 16:00:00-05:00 +2024-04-13 18:29:07,595: root: INFO: Current backtesting datetime 2020-03-04 09:30:00-05:00 +2024-04-13 18:29:07,596: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:07 +2024-04-13 18:29:07,596: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:07,597: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:07,597: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:07,597: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:07,597: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:08,457: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:08,458: root: INFO: Current backtesting datetime 2020-03-04 16:00:00-05:00 +2024-04-13 18:29:08,458: root: INFO: Current backtesting datetime 2020-03-05 09:30:00-05:00 +2024-04-13 18:29:08,458: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:08 +2024-04-13 18:29:08,459: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:08,459: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:08,460: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:08,460: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:08,460: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:09,163: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:09,164: root: INFO: Current backtesting datetime 2020-03-05 16:00:00-05:00 +2024-04-13 18:29:09,164: root: INFO: Current backtesting datetime 2020-03-06 09:30:00-05:00 +2024-04-13 18:29:09,164: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:09 +2024-04-13 18:29:09,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:09,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:09,166: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:09,166: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:09,166: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:10,313: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:10,313: root: INFO: Current backtesting datetime 2020-03-06 16:00:00-05:00 +2024-04-13 18:29:10,314: root: INFO: Current backtesting datetime 2020-03-07 09:30:00-05:00 +2024-04-13 18:29:10,314: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:29:10,316: root: INFO: Current backtesting datetime 2020-03-07 09:29:00-05:00 +2024-04-13 18:29:10,317: root: INFO: Current backtesting datetime 2020-03-07 09:29:00-05:00 +2024-04-13 18:29:10,317: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:29:10,317: root: INFO: Current backtesting datetime 2020-03-09 07:30:00-05:00 +2024-04-13 18:29:10,318: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:29:10,319: root: INFO: Current backtesting datetime 2020-03-09 08:30:00-05:00 +2024-04-13 18:29:10,319: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:29:10,320: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:10 +2024-04-13 18:29:10,320: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:10,321: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:10,321: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:10,321: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:10,322: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:12,182: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:12,183: root: INFO: Current backtesting datetime 2020-03-09 15:00:00-05:00 +2024-04-13 18:29:12,183: root: INFO: Current backtesting datetime 2020-03-10 08:30:00-05:00 +2024-04-13 18:29:12,184: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:12 +2024-04-13 18:29:12,184: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:12,184: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:12,185: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:12,185: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:12,185: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:13,894: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:13,895: root: INFO: Current backtesting datetime 2020-03-10 15:00:00-05:00 +2024-04-13 18:29:13,895: root: INFO: Current backtesting datetime 2020-03-11 08:30:00-05:00 +2024-04-13 18:29:13,895: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:13 +2024-04-13 18:29:13,895: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:13,896: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:13,896: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:13,897: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:13,897: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:14,910: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:14,911: root: INFO: Current backtesting datetime 2020-03-11 15:00:00-05:00 +2024-04-13 18:29:14,911: root: INFO: Current backtesting datetime 2020-03-12 08:30:00-05:00 +2024-04-13 18:29:14,912: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:14 +2024-04-13 18:29:14,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:14,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:14,912: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:14,913: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:14,913: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:16,638: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:16,639: root: INFO: Current backtesting datetime 2020-03-12 15:00:00-05:00 +2024-04-13 18:29:16,639: root: INFO: Current backtesting datetime 2020-03-13 08:30:00-05:00 +2024-04-13 18:29:16,640: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:16 +2024-04-13 18:29:16,640: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:16,640: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:16,641: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:16,641: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:16,641: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:17,671: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:17,671: root: INFO: Current backtesting datetime 2020-03-13 15:00:00-05:00 +2024-04-13 18:29:17,671: root: INFO: Current backtesting datetime 2020-03-14 08:30:00-05:00 +2024-04-13 18:29:17,672: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:29:17,673: root: INFO: Current backtesting datetime 2020-03-14 08:29:00-05:00 +2024-04-13 18:29:17,675: root: INFO: Current backtesting datetime 2020-03-14 08:29:00-05:00 +2024-04-13 18:29:17,675: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:29:17,675: root: INFO: Current backtesting datetime 2020-03-16 07:30:00-05:00 +2024-04-13 18:29:17,676: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:29:17,677: root: INFO: Current backtesting datetime 2020-03-16 08:30:00-05:00 +2024-04-13 18:29:17,677: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:29:17,678: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:17 +2024-04-13 18:29:17,678: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:17,679: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:17,679: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:17,679: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:17,680: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:18,403: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:18,404: root: INFO: Current backtesting datetime 2020-03-16 15:00:00-05:00 +2024-04-13 18:29:18,404: root: INFO: Current backtesting datetime 2020-03-17 08:30:00-05:00 +2024-04-13 18:29:18,405: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:18 +2024-04-13 18:29:18,406: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:18,406: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:18,407: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:18,407: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:18,407: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:19,358: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:19,359: root: INFO: Current backtesting datetime 2020-03-17 15:00:00-05:00 +2024-04-13 18:29:19,360: root: INFO: Current backtesting datetime 2020-03-18 08:30:00-05:00 +2024-04-13 18:29:19,360: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:19 +2024-04-13 18:29:19,360: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:19,361: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:19,361: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:19,362: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:19,362: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:20,300: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:20,301: root: INFO: Current backtesting datetime 2020-03-18 15:00:00-05:00 +2024-04-13 18:29:20,302: root: INFO: Current backtesting datetime 2020-03-19 08:30:00-05:00 +2024-04-13 18:29:20,302: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:20 +2024-04-13 18:29:20,302: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:20,303: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:20,303: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:20,304: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:20,304: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:21,269: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:21,270: root: INFO: Current backtesting datetime 2020-03-19 15:00:00-05:00 +2024-04-13 18:29:21,271: root: INFO: Current backtesting datetime 2020-03-20 08:30:00-05:00 +2024-04-13 18:29:21,271: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:21 +2024-04-13 18:29:21,271: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:21,272: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:21,272: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:21,273: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:21,273: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:22,545: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:22,546: root: INFO: Current backtesting datetime 2020-03-20 15:00:00-05:00 +2024-04-13 18:29:22,546: root: INFO: Current backtesting datetime 2020-03-21 08:30:00-05:00 +2024-04-13 18:29:22,546: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:29:22,548: root: INFO: Current backtesting datetime 2020-03-21 08:29:00-05:00 +2024-04-13 18:29:22,549: root: INFO: Current backtesting datetime 2020-03-21 08:29:00-05:00 +2024-04-13 18:29:22,549: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:29:22,550: root: INFO: Current backtesting datetime 2020-03-23 07:30:00-05:00 +2024-04-13 18:29:22,550: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:29:22,552: root: INFO: Current backtesting datetime 2020-03-23 08:30:00-05:00 +2024-04-13 18:29:22,552: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:29:22,553: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:22 +2024-04-13 18:29:22,553: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:22,553: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:22,554: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:22,554: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:22,554: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:23,665: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:23,666: root: INFO: Current backtesting datetime 2020-03-23 15:00:00-05:00 +2024-04-13 18:29:23,666: root: INFO: Current backtesting datetime 2020-03-24 08:30:00-05:00 +2024-04-13 18:29:23,667: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:23 +2024-04-13 18:29:23,667: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:23,668: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:23,668: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:23,668: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:23,669: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:24,428: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:24,429: root: INFO: Current backtesting datetime 2020-03-24 15:00:00-05:00 +2024-04-13 18:29:24,430: root: INFO: Current backtesting datetime 2020-03-25 08:30:00-05:00 +2024-04-13 18:29:24,430: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:24 +2024-04-13 18:29:24,430: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:24,431: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:24,431: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:24,432: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:24,432: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:24,960: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:24,961: root: INFO: Current backtesting datetime 2020-03-25 15:00:00-05:00 +2024-04-13 18:29:24,961: root: INFO: Current backtesting datetime 2020-03-26 08:30:00-05:00 +2024-04-13 18:29:24,961: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:24 +2024-04-13 18:29:24,961: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:24,962: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:24,962: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:24,963: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:24,963: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:25,695: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:25,696: root: INFO: Current backtesting datetime 2020-03-26 15:00:00-05:00 +2024-04-13 18:29:25,697: root: INFO: Current backtesting datetime 2020-03-27 08:30:00-05:00 +2024-04-13 18:29:25,697: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:25 +2024-04-13 18:29:25,697: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:25,698: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:25,698: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:25,699: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:25,699: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:26,853: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:26,854: root: INFO: Current backtesting datetime 2020-03-27 15:00:00-05:00 +2024-04-13 18:29:26,854: root: INFO: Current backtesting datetime 2020-03-28 08:30:00-05:00 +2024-04-13 18:29:26,855: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:29:26,857: root: INFO: Current backtesting datetime 2020-03-28 08:29:00-05:00 +2024-04-13 18:29:26,857: root: INFO: Current backtesting datetime 2020-03-28 08:29:00-05:00 +2024-04-13 18:29:26,857: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:29:26,858: root: INFO: Current backtesting datetime 2020-03-30 07:30:00-05:00 +2024-04-13 18:29:26,859: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:29:26,860: root: INFO: Current backtesting datetime 2020-03-30 08:30:00-05:00 +2024-04-13 18:29:26,860: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:29:26,861: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:26 +2024-04-13 18:29:26,861: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:26,862: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:26,862: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:26,862: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:26,862: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:28,126: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:28,127: root: INFO: Current backtesting datetime 2020-03-30 15:00:00-05:00 +2024-04-13 18:29:28,127: root: INFO: Current backtesting datetime 2020-03-31 08:30:00-05:00 +2024-04-13 18:29:28,127: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:28 +2024-04-13 18:29:28,128: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:28,128: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:28,128: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:28,129: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:28,129: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:28,979: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:28,980: root: INFO: Current backtesting datetime 2020-03-31 15:00:00-05:00 +2024-04-13 18:29:28,980: root: INFO: Current backtesting datetime 2020-04-01 08:30:00-05:00 +2024-04-13 18:29:28,981: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:28 +2024-04-13 18:29:28,981: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:28,982: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:28,982: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:28,983: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:28,983: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:29,712: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:29,713: root: INFO: Current backtesting datetime 2020-04-01 15:00:00-05:00 +2024-04-13 18:29:29,713: root: INFO: Current backtesting datetime 2020-04-02 08:30:00-05:00 +2024-04-13 18:29:29,713: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:29 +2024-04-13 18:29:29,713: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:29,715: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:29,715: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:29,716: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:29,716: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:30,617: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:30,618: root: INFO: Current backtesting datetime 2020-04-02 15:00:00-05:00 +2024-04-13 18:29:30,618: root: INFO: Current backtesting datetime 2020-04-03 08:30:00-05:00 +2024-04-13 18:29:30,619: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:30 +2024-04-13 18:29:30,619: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:30,619: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:30,620: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:30,620: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:30,620: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:31,238: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:31,238: root: INFO: Current backtesting datetime 2020-04-03 15:00:00-05:00 +2024-04-13 18:29:31,238: root: INFO: Current backtesting datetime 2020-04-04 08:30:00-05:00 +2024-04-13 18:29:31,240: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:29:31,240: root: INFO: Current backtesting datetime 2020-04-04 08:29:00-05:00 +2024-04-13 18:29:31,242: root: INFO: Current backtesting datetime 2020-04-04 08:29:00-05:00 +2024-04-13 18:29:31,242: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:29:31,243: root: INFO: Current backtesting datetime 2020-04-06 07:30:00-05:00 +2024-04-13 18:29:31,243: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:29:31,245: root: INFO: Current backtesting datetime 2020-04-06 08:30:00-05:00 +2024-04-13 18:29:31,245: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:29:31,246: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:31 +2024-04-13 18:29:31,246: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:31,247: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:31,247: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:31,247: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:31,247: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:32,244: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:32,245: root: INFO: Current backtesting datetime 2020-04-06 15:00:00-05:00 +2024-04-13 18:29:32,245: root: INFO: Current backtesting datetime 2020-04-07 08:30:00-05:00 +2024-04-13 18:29:32,246: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:32 +2024-04-13 18:29:32,246: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:32,247: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:32,247: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:32,247: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:32,247: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:33,144: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:33,145: root: INFO: Current backtesting datetime 2020-04-07 15:00:00-05:00 +2024-04-13 18:29:33,145: root: INFO: Current backtesting datetime 2020-04-08 08:30:00-05:00 +2024-04-13 18:29:33,145: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:33 +2024-04-13 18:29:33,146: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:33,146: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:33,147: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:33,147: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:33,147: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:34,554: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:34,555: root: INFO: Current backtesting datetime 2020-04-08 15:00:00-05:00 +2024-04-13 18:29:34,555: root: INFO: Current backtesting datetime 2020-04-09 08:30:00-05:00 +2024-04-13 18:29:34,556: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:34 +2024-04-13 18:29:34,556: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:34,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:34,557: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:34,557: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:34,557: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:35,398: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:35,400: root: INFO: Current backtesting datetime 2020-04-09 15:00:00-05:00 +2024-04-13 18:29:35,400: root: INFO: Current backtesting datetime 2020-04-10 08:30:00-05:00 +2024-04-13 18:29:35,400: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:29:35,402: root: INFO: Current backtesting datetime 2020-04-10 08:29:00-05:00 +2024-04-13 18:29:35,403: root: INFO: Current backtesting datetime 2020-04-10 08:29:00-05:00 +2024-04-13 18:29:35,403: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:29:35,404: root: INFO: Current backtesting datetime 2020-04-13 07:30:00-05:00 +2024-04-13 18:29:35,405: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:29:35,405: root: INFO: Current backtesting datetime 2020-04-13 08:30:00-05:00 +2024-04-13 18:29:35,405: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:29:35,407: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:35 +2024-04-13 18:29:35,407: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:35,407: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:35,408: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:35,408: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:35,408: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:36,201: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:36,201: root: INFO: Current backtesting datetime 2020-04-13 15:00:00-05:00 +2024-04-13 18:29:36,202: root: INFO: Current backtesting datetime 2020-04-14 08:30:00-05:00 +2024-04-13 18:29:36,202: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:36 +2024-04-13 18:29:36,202: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:36,203: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:36,203: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:36,204: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:36,204: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:37,805: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:37,806: root: INFO: Current backtesting datetime 2020-04-14 15:00:00-05:00 +2024-04-13 18:29:37,806: root: INFO: Current backtesting datetime 2020-04-15 08:30:00-05:00 +2024-04-13 18:29:37,807: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:37 +2024-04-13 18:29:37,807: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:37,808: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:37,808: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:37,808: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:37,808: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:40,449: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:40,450: root: INFO: Current backtesting datetime 2020-04-15 15:00:00-05:00 +2024-04-13 18:29:40,450: root: INFO: Current backtesting datetime 2020-04-16 08:30:00-05:00 +2024-04-13 18:29:40,451: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:40 +2024-04-13 18:29:40,451: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:40,452: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:40,452: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:40,452: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:40,452: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:41,633: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:41,635: root: INFO: Current backtesting datetime 2020-04-16 15:00:00-05:00 +2024-04-13 18:29:41,635: root: INFO: Current backtesting datetime 2020-04-17 08:30:00-05:00 +2024-04-13 18:29:41,635: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:41 +2024-04-13 18:29:41,635: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:41,636: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:41,636: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:41,637: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:41,637: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:43,346: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:43,347: root: INFO: Current backtesting datetime 2020-04-17 15:00:00-05:00 +2024-04-13 18:29:43,348: root: INFO: Current backtesting datetime 2020-04-18 08:30:00-05:00 +2024-04-13 18:29:43,348: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:29:43,349: root: INFO: Current backtesting datetime 2020-04-18 08:29:00-05:00 +2024-04-13 18:29:43,351: root: INFO: Current backtesting datetime 2020-04-18 08:29:00-05:00 +2024-04-13 18:29:43,351: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:29:43,351: root: INFO: Current backtesting datetime 2020-04-20 07:30:00-05:00 +2024-04-13 18:29:43,352: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:29:43,353: root: INFO: Current backtesting datetime 2020-04-20 08:30:00-05:00 +2024-04-13 18:29:43,353: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:29:43,354: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:43 +2024-04-13 18:29:43,354: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:43,355: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:43,355: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:43,355: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:43,356: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:44,341: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:44,341: root: INFO: Current backtesting datetime 2020-04-20 15:00:00-05:00 +2024-04-13 18:29:44,342: root: INFO: Current backtesting datetime 2020-04-21 08:30:00-05:00 +2024-04-13 18:29:44,343: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:44 +2024-04-13 18:29:44,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:44,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:44,344: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:44,344: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:44,344: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:45,623: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:45,624: root: INFO: Current backtesting datetime 2020-04-21 15:00:00-05:00 +2024-04-13 18:29:45,624: root: INFO: Current backtesting datetime 2020-04-22 08:30:00-05:00 +2024-04-13 18:29:45,625: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:45 +2024-04-13 18:29:45,625: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:45,625: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:45,626: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:45,626: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:45,626: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:46,464: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:46,465: root: INFO: Current backtesting datetime 2020-04-22 15:00:00-05:00 +2024-04-13 18:29:46,465: root: INFO: Current backtesting datetime 2020-04-23 08:30:00-05:00 +2024-04-13 18:29:46,466: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:46 +2024-04-13 18:29:46,466: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:46,467: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:46,467: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:46,468: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:46,468: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:47,688: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:47,689: root: INFO: Current backtesting datetime 2020-04-23 15:00:00-05:00 +2024-04-13 18:29:47,689: root: INFO: Current backtesting datetime 2020-04-24 08:30:00-05:00 +2024-04-13 18:29:47,690: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:47 +2024-04-13 18:29:47,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:47,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:47,691: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:47,691: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:47,691: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:48,846: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:48,847: root: INFO: Current backtesting datetime 2020-04-24 15:00:00-05:00 +2024-04-13 18:29:48,847: root: INFO: Current backtesting datetime 2020-04-25 08:30:00-05:00 +2024-04-13 18:29:48,848: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:29:48,849: root: INFO: Current backtesting datetime 2020-04-25 08:29:00-05:00 +2024-04-13 18:29:48,850: root: INFO: Current backtesting datetime 2020-04-25 08:29:00-05:00 +2024-04-13 18:29:48,850: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:29:48,851: root: INFO: Current backtesting datetime 2020-04-27 07:30:00-05:00 +2024-04-13 18:29:48,852: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:29:48,852: root: INFO: Current backtesting datetime 2020-04-27 08:30:00-05:00 +2024-04-13 18:29:48,853: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:29:48,854: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:48 +2024-04-13 18:29:48,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:48,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:48,855: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:48,855: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:48,855: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:50,692: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:50,693: root: INFO: Current backtesting datetime 2020-04-27 15:00:00-05:00 +2024-04-13 18:29:50,693: root: INFO: Current backtesting datetime 2020-04-28 08:30:00-05:00 +2024-04-13 18:29:50,693: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:50 +2024-04-13 18:29:50,693: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:50,694: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:50,694: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:50,695: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:50,695: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:53,485: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:53,486: root: INFO: Current backtesting datetime 2020-04-28 15:00:00-05:00 +2024-04-13 18:29:53,486: root: INFO: Current backtesting datetime 2020-04-29 08:30:00-05:00 +2024-04-13 18:29:53,487: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:53 +2024-04-13 18:29:53,487: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:53,487: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:53,488: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:53,488: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:53,488: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:54,811: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:54,812: root: INFO: Current backtesting datetime 2020-04-29 15:00:00-05:00 +2024-04-13 18:29:54,812: root: INFO: Current backtesting datetime 2020-04-30 08:30:00-05:00 +2024-04-13 18:29:54,813: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:54 +2024-04-13 18:29:54,813: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:54,814: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:54,814: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:54,814: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:54,814: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:56,381: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:56,382: root: INFO: Current backtesting datetime 2020-04-30 15:00:00-05:00 +2024-04-13 18:29:56,383: root: INFO: Current backtesting datetime 2020-05-01 08:30:00-05:00 +2024-04-13 18:29:56,383: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:56 +2024-04-13 18:29:56,383: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:56,384: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:56,384: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:56,385: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:56,385: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:58,424: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:58,425: root: INFO: Current backtesting datetime 2020-05-01 15:00:00-05:00 +2024-04-13 18:29:58,425: root: INFO: Current backtesting datetime 2020-05-02 08:30:00-05:00 +2024-04-13 18:29:58,426: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:29:58,427: root: INFO: Current backtesting datetime 2020-05-02 08:29:00-05:00 +2024-04-13 18:29:58,428: root: INFO: Current backtesting datetime 2020-05-02 08:29:00-05:00 +2024-04-13 18:29:58,428: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:29:58,429: root: INFO: Current backtesting datetime 2020-05-04 07:30:00-05:00 +2024-04-13 18:29:58,430: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:29:58,431: root: INFO: Current backtesting datetime 2020-05-04 08:30:00-05:00 +2024-04-13 18:29:58,431: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:29:58,432: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:58 +2024-04-13 18:29:58,432: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:58,432: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:58,433: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:58,433: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:58,433: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:29:59,717: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:29:59,718: root: INFO: Current backtesting datetime 2020-05-04 15:00:00-05:00 +2024-04-13 18:29:59,718: root: INFO: Current backtesting datetime 2020-05-05 08:30:00-05:00 +2024-04-13 18:29:59,718: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:29:59 +2024-04-13 18:29:59,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:59,719: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:29:59,719: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:29:59,720: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:29:59,720: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:01,171: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:01,172: root: INFO: Current backtesting datetime 2020-05-05 15:00:00-05:00 +2024-04-13 18:30:01,172: root: INFO: Current backtesting datetime 2020-05-06 08:30:00-05:00 +2024-04-13 18:30:01,173: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:01 +2024-04-13 18:30:01,173: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:01,174: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:01,174: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:01,174: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:01,174: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:02,294: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:02,295: root: INFO: Current backtesting datetime 2020-05-06 15:00:00-05:00 +2024-04-13 18:30:02,295: root: INFO: Current backtesting datetime 2020-05-07 08:30:00-05:00 +2024-04-13 18:30:02,296: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:02 +2024-04-13 18:30:02,296: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:02,297: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:02,297: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:02,297: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:02,297: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:03,048: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:03,049: root: INFO: Current backtesting datetime 2020-05-07 15:00:00-05:00 +2024-04-13 18:30:03,049: root: INFO: Current backtesting datetime 2020-05-08 08:30:00-05:00 +2024-04-13 18:30:03,050: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:03 +2024-04-13 18:30:03,050: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:03,050: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:03,051: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:03,051: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:03,051: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:04,508: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:04,509: root: INFO: Current backtesting datetime 2020-05-08 15:00:00-05:00 +2024-04-13 18:30:04,510: root: INFO: Current backtesting datetime 2020-05-09 08:30:00-05:00 +2024-04-13 18:30:04,510: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:30:04,511: root: INFO: Current backtesting datetime 2020-05-09 08:29:00-05:00 +2024-04-13 18:30:04,513: root: INFO: Current backtesting datetime 2020-05-09 08:29:00-05:00 +2024-04-13 18:30:04,513: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:30:04,514: root: INFO: Current backtesting datetime 2020-05-11 07:30:00-05:00 +2024-04-13 18:30:04,514: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:30:04,515: root: INFO: Current backtesting datetime 2020-05-11 08:30:00-05:00 +2024-04-13 18:30:04,515: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:30:04,516: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:04 +2024-04-13 18:30:04,516: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:04,517: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:04,517: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:04,518: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:04,518: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:06,725: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:06,726: root: INFO: Current backtesting datetime 2020-05-11 15:00:00-05:00 +2024-04-13 18:30:06,726: root: INFO: Current backtesting datetime 2020-05-12 08:30:00-05:00 +2024-04-13 18:30:06,727: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:06 +2024-04-13 18:30:06,727: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:06,727: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:06,728: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:06,728: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:06,728: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:08,707: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:08,708: root: INFO: Current backtesting datetime 2020-05-12 15:00:00-05:00 +2024-04-13 18:30:08,708: root: INFO: Current backtesting datetime 2020-05-13 08:30:00-05:00 +2024-04-13 18:30:08,709: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:08 +2024-04-13 18:30:08,709: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:08,710: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:08,710: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:08,710: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:08,710: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:10,215: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:10,216: root: INFO: Current backtesting datetime 2020-05-13 15:00:00-05:00 +2024-04-13 18:30:10,216: root: INFO: Current backtesting datetime 2020-05-14 08:30:00-05:00 +2024-04-13 18:30:10,217: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:10 +2024-04-13 18:30:10,217: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:10,218: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:10,218: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:10,218: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:10,218: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:12,360: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:12,361: root: INFO: Current backtesting datetime 2020-05-14 15:00:00-05:00 +2024-04-13 18:30:12,361: root: INFO: Current backtesting datetime 2020-05-15 08:30:00-05:00 +2024-04-13 18:30:12,362: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:12 +2024-04-13 18:30:12,362: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:12,363: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:12,363: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:12,363: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:12,364: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:13,412: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:13,413: root: INFO: Current backtesting datetime 2020-05-15 15:00:00-05:00 +2024-04-13 18:30:13,413: root: INFO: Current backtesting datetime 2020-05-16 08:30:00-05:00 +2024-04-13 18:30:13,413: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:30:13,415: root: INFO: Current backtesting datetime 2020-05-16 08:29:00-05:00 +2024-04-13 18:30:13,416: root: INFO: Current backtesting datetime 2020-05-16 08:29:00-05:00 +2024-04-13 18:30:13,416: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:30:13,417: root: INFO: Current backtesting datetime 2020-05-18 07:30:00-05:00 +2024-04-13 18:30:13,417: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:30:13,418: root: INFO: Current backtesting datetime 2020-05-18 08:30:00-05:00 +2024-04-13 18:30:13,418: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:30:13,419: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:13 +2024-04-13 18:30:13,420: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:13,420: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:13,420: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:13,421: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:13,421: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:14,359: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:14,361: root: INFO: Current backtesting datetime 2020-05-18 15:00:00-05:00 +2024-04-13 18:30:14,361: root: INFO: Current backtesting datetime 2020-05-19 08:30:00-05:00 +2024-04-13 18:30:14,361: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:14 +2024-04-13 18:30:14,361: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:14,362: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:14,362: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:14,363: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:14,363: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:15,774: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:15,775: root: INFO: Current backtesting datetime 2020-05-19 15:00:00-05:00 +2024-04-13 18:30:15,775: root: INFO: Current backtesting datetime 2020-05-20 08:30:00-05:00 +2024-04-13 18:30:15,775: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:15 +2024-04-13 18:30:15,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:15,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:15,777: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:15,777: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:15,777: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:17,180: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:17,181: root: INFO: Current backtesting datetime 2020-05-20 15:00:00-05:00 +2024-04-13 18:30:17,181: root: INFO: Current backtesting datetime 2020-05-21 08:30:00-05:00 +2024-04-13 18:30:17,181: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:17 +2024-04-13 18:30:17,182: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:17,182: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:17,183: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:17,183: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:17,183: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:19,156: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:19,157: root: INFO: Current backtesting datetime 2020-05-21 15:00:00-05:00 +2024-04-13 18:30:19,157: root: INFO: Current backtesting datetime 2020-05-22 08:30:00-05:00 +2024-04-13 18:30:19,158: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:19 +2024-04-13 18:30:19,158: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:19,159: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:19,159: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:19,159: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:19,159: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:20,342: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:20,343: root: INFO: Current backtesting datetime 2020-05-22 15:00:00-05:00 +2024-04-13 18:30:20,343: root: INFO: Current backtesting datetime 2020-05-23 08:30:00-05:00 +2024-04-13 18:30:20,344: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:30:20,346: root: INFO: Current backtesting datetime 2020-05-23 08:29:00-05:00 +2024-04-13 18:30:20,346: root: INFO: Current backtesting datetime 2020-05-23 08:29:00-05:00 +2024-04-13 18:30:20,346: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:30:20,347: root: INFO: Current backtesting datetime 2020-05-26 07:30:00-05:00 +2024-04-13 18:30:20,348: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:30:20,349: root: INFO: Current backtesting datetime 2020-05-26 08:30:00-05:00 +2024-04-13 18:30:20,349: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:30:20,350: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:20 +2024-04-13 18:30:20,350: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:20,351: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:20,351: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:20,351: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:20,352: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:21,754: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:21,755: root: INFO: Current backtesting datetime 2020-05-26 15:00:00-05:00 +2024-04-13 18:30:21,755: root: INFO: Current backtesting datetime 2020-05-27 08:30:00-05:00 +2024-04-13 18:30:21,756: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:21 +2024-04-13 18:30:21,756: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:21,757: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:21,757: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:21,757: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:21,757: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:23,553: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:23,554: root: INFO: Current backtesting datetime 2020-05-27 15:00:00-05:00 +2024-04-13 18:30:23,554: root: INFO: Current backtesting datetime 2020-05-28 08:30:00-05:00 +2024-04-13 18:30:23,555: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:23 +2024-04-13 18:30:23,555: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:23,556: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:23,556: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:23,556: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:23,556: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:25,281: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:25,282: root: INFO: Current backtesting datetime 2020-05-28 15:00:00-05:00 +2024-04-13 18:30:25,282: root: INFO: Current backtesting datetime 2020-05-29 08:30:00-05:00 +2024-04-13 18:30:25,283: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:25 +2024-04-13 18:30:25,283: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:25,283: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:25,284: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:25,284: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:25,284: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:27,273: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:27,274: root: INFO: Current backtesting datetime 2020-05-29 15:00:00-05:00 +2024-04-13 18:30:27,274: root: INFO: Current backtesting datetime 2020-05-30 08:30:00-05:00 +2024-04-13 18:30:27,275: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:30:27,276: root: INFO: Current backtesting datetime 2020-05-30 08:29:00-05:00 +2024-04-13 18:30:27,278: root: INFO: Current backtesting datetime 2020-05-30 08:29:00-05:00 +2024-04-13 18:30:27,278: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:30:27,278: root: INFO: Current backtesting datetime 2020-06-01 07:30:00-05:00 +2024-04-13 18:30:27,279: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:30:27,280: root: INFO: Current backtesting datetime 2020-06-01 08:30:00-05:00 +2024-04-13 18:30:27,280: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:30:27,281: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:27 +2024-04-13 18:30:27,281: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:27,282: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:27,282: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:27,282: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:27,282: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:29,734: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:29,735: root: INFO: Current backtesting datetime 2020-06-01 15:00:00-05:00 +2024-04-13 18:30:29,736: root: INFO: Current backtesting datetime 2020-06-02 08:30:00-05:00 +2024-04-13 18:30:29,736: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:29 +2024-04-13 18:30:29,736: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:29,737: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:29,737: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:29,738: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:29,738: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:31,473: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:31,474: root: INFO: Current backtesting datetime 2020-06-02 15:00:00-05:00 +2024-04-13 18:30:31,474: root: INFO: Current backtesting datetime 2020-06-03 08:30:00-05:00 +2024-04-13 18:30:31,474: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:31 +2024-04-13 18:30:31,474: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:31,476: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:31,476: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:31,477: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:31,477: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:36,918: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:36,919: root: INFO: Current backtesting datetime 2020-06-03 15:00:00-05:00 +2024-04-13 18:30:36,920: root: INFO: Current backtesting datetime 2020-06-04 08:30:00-05:00 +2024-04-13 18:30:36,920: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:36 +2024-04-13 18:30:36,920: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:36,921: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:36,921: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:36,922: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:36,922: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:38,266: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:38,267: root: INFO: Current backtesting datetime 2020-06-04 15:00:00-05:00 +2024-04-13 18:30:38,267: root: INFO: Current backtesting datetime 2020-06-05 08:30:00-05:00 +2024-04-13 18:30:38,268: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:38 +2024-04-13 18:30:38,268: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:38,269: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:38,269: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:38,270: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:38,270: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:40,498: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:40,499: root: INFO: Current backtesting datetime 2020-06-05 15:00:00-05:00 +2024-04-13 18:30:40,499: root: INFO: Current backtesting datetime 2020-06-06 08:30:00-05:00 +2024-04-13 18:30:40,500: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:30:40,501: root: INFO: Current backtesting datetime 2020-06-06 08:29:00-05:00 +2024-04-13 18:30:40,502: root: INFO: Current backtesting datetime 2020-06-06 08:29:00-05:00 +2024-04-13 18:30:40,503: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:30:40,503: root: INFO: Current backtesting datetime 2020-06-08 07:30:00-05:00 +2024-04-13 18:30:40,504: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:30:40,505: root: INFO: Current backtesting datetime 2020-06-08 08:30:00-05:00 +2024-04-13 18:30:40,505: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:30:40,506: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:40 +2024-04-13 18:30:40,506: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:40,507: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:40,507: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:40,507: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:40,508: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:43,009: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:43,010: root: INFO: Current backtesting datetime 2020-06-08 15:00:00-05:00 +2024-04-13 18:30:43,010: root: INFO: Current backtesting datetime 2020-06-09 08:30:00-05:00 +2024-04-13 18:30:43,011: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:43 +2024-04-13 18:30:43,011: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:43,012: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:43,012: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:43,012: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:43,012: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:44,245: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:44,246: root: INFO: Current backtesting datetime 2020-06-09 15:00:00-05:00 +2024-04-13 18:30:44,246: root: INFO: Current backtesting datetime 2020-06-10 08:30:00-05:00 +2024-04-13 18:30:44,247: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:44 +2024-04-13 18:30:44,247: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:44,247: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:44,248: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:44,248: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:44,248: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:45,480: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:45,480: root: INFO: Current backtesting datetime 2020-06-10 15:00:00-05:00 +2024-04-13 18:30:45,481: root: INFO: Current backtesting datetime 2020-06-11 08:30:00-05:00 +2024-04-13 18:30:45,481: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:45 +2024-04-13 18:30:45,481: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:45,482: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:45,482: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:45,483: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:45,483: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:46,382: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:46,383: root: INFO: Current backtesting datetime 2020-06-11 15:00:00-05:00 +2024-04-13 18:30:46,384: root: INFO: Current backtesting datetime 2020-06-12 08:30:00-05:00 +2024-04-13 18:30:46,384: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:46 +2024-04-13 18:30:46,384: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:46,385: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:46,385: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:46,386: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:46,386: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:47,276: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:47,277: root: INFO: Current backtesting datetime 2020-06-12 15:00:00-05:00 +2024-04-13 18:30:47,277: root: INFO: Current backtesting datetime 2020-06-13 08:30:00-05:00 +2024-04-13 18:30:47,277: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:30:47,279: root: INFO: Current backtesting datetime 2020-06-13 08:29:00-05:00 +2024-04-13 18:30:47,280: root: INFO: Current backtesting datetime 2020-06-13 08:29:00-05:00 +2024-04-13 18:30:47,280: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:30:47,281: root: INFO: Current backtesting datetime 2020-06-15 07:30:00-05:00 +2024-04-13 18:30:47,281: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:30:47,282: root: INFO: Current backtesting datetime 2020-06-15 08:30:00-05:00 +2024-04-13 18:30:47,282: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:30:47,283: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:47 +2024-04-13 18:30:47,283: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:47,284: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:47,284: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:47,285: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:47,285: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:48,273: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:48,274: root: INFO: Current backtesting datetime 2020-06-15 15:00:00-05:00 +2024-04-13 18:30:48,274: root: INFO: Current backtesting datetime 2020-06-16 08:30:00-05:00 +2024-04-13 18:30:48,274: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:48 +2024-04-13 18:30:48,274: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:48,276: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:48,276: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:48,276: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:48,276: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:49,444: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:49,445: root: INFO: Current backtesting datetime 2020-06-16 15:00:00-05:00 +2024-04-13 18:30:49,446: root: INFO: Current backtesting datetime 2020-06-17 08:30:00-05:00 +2024-04-13 18:30:49,446: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:49 +2024-04-13 18:30:49,446: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:49,447: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:49,447: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:49,448: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:49,448: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:50,215: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:50,216: root: INFO: Current backtesting datetime 2020-06-17 15:00:00-05:00 +2024-04-13 18:30:50,217: root: INFO: Current backtesting datetime 2020-06-18 08:30:00-05:00 +2024-04-13 18:30:50,217: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:50 +2024-04-13 18:30:50,217: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:50,218: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:50,218: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:50,219: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:50,219: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:51,256: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:51,257: root: INFO: Current backtesting datetime 2020-06-18 15:00:00-05:00 +2024-04-13 18:30:51,258: root: INFO: Current backtesting datetime 2020-06-19 08:30:00-05:00 +2024-04-13 18:30:51,258: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:51 +2024-04-13 18:30:51,258: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:51,259: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:51,259: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:51,260: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:51,260: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:52,681: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:52,683: root: INFO: Current backtesting datetime 2020-06-19 15:00:00-05:00 +2024-04-13 18:30:52,683: root: INFO: Current backtesting datetime 2020-06-20 08:30:00-05:00 +2024-04-13 18:30:52,683: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:30:52,685: root: INFO: Current backtesting datetime 2020-06-20 08:29:00-05:00 +2024-04-13 18:30:52,686: root: INFO: Current backtesting datetime 2020-06-20 08:29:00-05:00 +2024-04-13 18:30:52,686: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:30:52,687: root: INFO: Current backtesting datetime 2020-06-22 07:30:00-05:00 +2024-04-13 18:30:52,687: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:30:52,688: root: INFO: Current backtesting datetime 2020-06-22 08:30:00-05:00 +2024-04-13 18:30:52,688: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:30:52,689: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:52 +2024-04-13 18:30:52,689: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:52,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:52,690: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:52,691: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:52,691: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:53,806: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:53,806: root: INFO: Current backtesting datetime 2020-06-22 15:00:00-05:00 +2024-04-13 18:30:53,806: root: INFO: Current backtesting datetime 2020-06-23 08:30:00-05:00 +2024-04-13 18:30:53,806: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:53 +2024-04-13 18:30:53,808: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:53,808: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:53,809: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:53,809: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:53,809: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:55,602: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:55,602: root: INFO: Current backtesting datetime 2020-06-23 15:00:00-05:00 +2024-04-13 18:30:55,603: root: INFO: Current backtesting datetime 2020-06-24 08:30:00-05:00 +2024-04-13 18:30:55,603: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:55 +2024-04-13 18:30:55,603: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:55,604: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:55,604: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:55,605: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:55,605: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:57,208: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:57,209: root: INFO: Current backtesting datetime 2020-06-24 15:00:00-05:00 +2024-04-13 18:30:57,209: root: INFO: Current backtesting datetime 2020-06-25 08:30:00-05:00 +2024-04-13 18:30:57,210: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:57 +2024-04-13 18:30:57,210: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:57,211: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:57,211: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:57,211: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:57,212: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:30:59,913: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:30:59,914: root: INFO: Current backtesting datetime 2020-06-25 15:00:00-05:00 +2024-04-13 18:30:59,915: root: INFO: Current backtesting datetime 2020-06-26 08:30:00-05:00 +2024-04-13 18:30:59,915: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:30:59 +2024-04-13 18:30:59,915: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:59,916: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:30:59,916: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:30:59,917: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:30:59,917: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:01,207: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:01,208: root: INFO: Current backtesting datetime 2020-06-26 15:00:00-05:00 +2024-04-13 18:31:01,209: root: INFO: Current backtesting datetime 2020-06-27 08:30:00-05:00 +2024-04-13 18:31:01,209: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:31:01,211: root: INFO: Current backtesting datetime 2020-06-27 08:29:00-05:00 +2024-04-13 18:31:01,212: root: INFO: Current backtesting datetime 2020-06-27 08:29:00-05:00 +2024-04-13 18:31:01,212: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:31:01,213: root: INFO: Current backtesting datetime 2020-06-29 07:30:00-05:00 +2024-04-13 18:31:01,213: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:31:01,214: root: INFO: Current backtesting datetime 2020-06-29 08:30:00-05:00 +2024-04-13 18:31:01,214: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:31:01,215: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:01 +2024-04-13 18:31:01,215: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:01,216: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:01,216: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:01,217: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:01,217: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:02,070: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:02,071: root: INFO: Current backtesting datetime 2020-06-29 15:00:00-05:00 +2024-04-13 18:31:02,071: root: INFO: Current backtesting datetime 2020-06-30 08:30:00-05:00 +2024-04-13 18:31:02,072: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:02 +2024-04-13 18:31:02,072: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:02,072: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:02,073: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:02,073: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:02,073: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:03,117: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:03,118: root: INFO: Current backtesting datetime 2020-06-30 15:00:00-05:00 +2024-04-13 18:31:03,118: root: INFO: Current backtesting datetime 2020-07-01 08:30:00-05:00 +2024-04-13 18:31:03,118: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:03 +2024-04-13 18:31:03,119: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:03,119: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:03,119: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:03,120: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:03,120: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:04,333: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:04,334: root: INFO: Current backtesting datetime 2020-07-01 15:00:00-05:00 +2024-04-13 18:31:04,335: root: INFO: Current backtesting datetime 2020-07-02 08:30:00-05:00 +2024-04-13 18:31:04,335: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:04 +2024-04-13 18:31:04,335: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:04,336: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:04,336: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:04,337: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:04,337: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:05,303: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:05,304: root: INFO: Current backtesting datetime 2020-07-02 15:00:00-05:00 +2024-04-13 18:31:05,304: root: INFO: Current backtesting datetime 2020-07-03 08:30:00-05:00 +2024-04-13 18:31:05,305: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:31:05,306: root: INFO: Current backtesting datetime 2020-07-03 08:29:00-05:00 +2024-04-13 18:31:05,308: root: INFO: Current backtesting datetime 2020-07-03 08:29:00-05:00 +2024-04-13 18:31:05,308: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:31:05,308: root: INFO: Current backtesting datetime 2020-07-06 07:30:00-05:00 +2024-04-13 18:31:05,309: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:31:05,310: root: INFO: Current backtesting datetime 2020-07-06 08:30:00-05:00 +2024-04-13 18:31:05,310: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:31:05,311: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:05 +2024-04-13 18:31:05,311: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:05,312: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:05,312: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:05,312: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:05,313: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:06,253: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:06,254: root: INFO: Current backtesting datetime 2020-07-06 15:00:00-05:00 +2024-04-13 18:31:06,255: root: INFO: Current backtesting datetime 2020-07-07 08:30:00-05:00 +2024-04-13 18:31:06,255: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:06 +2024-04-13 18:31:06,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:06,256: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:06,256: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:06,257: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:06,257: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:07,176: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:07,177: root: INFO: Current backtesting datetime 2020-07-07 15:00:00-05:00 +2024-04-13 18:31:07,177: root: INFO: Current backtesting datetime 2020-07-08 08:30:00-05:00 +2024-04-13 18:31:07,177: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:07 +2024-04-13 18:31:07,178: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:07,178: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:07,179: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:07,179: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:07,179: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:09,434: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:09,435: root: INFO: Current backtesting datetime 2020-07-08 15:00:00-05:00 +2024-04-13 18:31:09,436: root: INFO: Current backtesting datetime 2020-07-09 08:30:00-05:00 +2024-04-13 18:31:09,436: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:09 +2024-04-13 18:31:09,436: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:09,437: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:09,437: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:09,438: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:09,438: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:11,010: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:11,011: root: INFO: Current backtesting datetime 2020-07-09 15:00:00-05:00 +2024-04-13 18:31:11,011: root: INFO: Current backtesting datetime 2020-07-10 08:30:00-05:00 +2024-04-13 18:31:11,011: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:11 +2024-04-13 18:31:11,012: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:11,012: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:11,013: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:11,013: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:11,013: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:13,310: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:13,311: root: INFO: Current backtesting datetime 2020-07-10 15:00:00-05:00 +2024-04-13 18:31:13,312: root: INFO: Current backtesting datetime 2020-07-11 08:30:00-05:00 +2024-04-13 18:31:13,312: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:31:13,314: root: INFO: Current backtesting datetime 2020-07-11 08:29:00-05:00 +2024-04-13 18:31:13,315: root: INFO: Current backtesting datetime 2020-07-11 08:29:00-05:00 +2024-04-13 18:31:13,315: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:31:13,316: root: INFO: Current backtesting datetime 2020-07-13 07:30:00-05:00 +2024-04-13 18:31:13,316: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:31:13,317: root: INFO: Current backtesting datetime 2020-07-13 08:30:00-05:00 +2024-04-13 18:31:13,317: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:31:13,318: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:13 +2024-04-13 18:31:13,318: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:13,319: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:13,319: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:13,320: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:13,320: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:15,276: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:15,278: root: INFO: Current backtesting datetime 2020-07-13 15:00:00-05:00 +2024-04-13 18:31:15,278: root: INFO: Current backtesting datetime 2020-07-14 08:30:00-05:00 +2024-04-13 18:31:15,278: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:15 +2024-04-13 18:31:15,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:15,279: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:15,279: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:15,279: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:15,279: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:17,760: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:17,761: root: INFO: Current backtesting datetime 2020-07-14 15:00:00-05:00 +2024-04-13 18:31:17,761: root: INFO: Current backtesting datetime 2020-07-15 08:30:00-05:00 +2024-04-13 18:31:17,761: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:17 +2024-04-13 18:31:17,761: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:17,762: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:17,762: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:17,763: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:17,763: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:19,970: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:19,971: root: INFO: Current backtesting datetime 2020-07-15 15:00:00-05:00 +2024-04-13 18:31:19,972: root: INFO: Current backtesting datetime 2020-07-16 08:30:00-05:00 +2024-04-13 18:31:19,972: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:19 +2024-04-13 18:31:19,972: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:19,973: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:19,973: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:19,974: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:19,974: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:21,619: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:21,620: root: INFO: Current backtesting datetime 2020-07-16 15:00:00-05:00 +2024-04-13 18:31:21,620: root: INFO: Current backtesting datetime 2020-07-17 08:30:00-05:00 +2024-04-13 18:31:21,620: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:21 +2024-04-13 18:31:21,620: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:21,621: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:21,621: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:21,622: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:21,622: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:23,077: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:23,078: root: INFO: Current backtesting datetime 2020-07-17 15:00:00-05:00 +2024-04-13 18:31:23,078: root: INFO: Current backtesting datetime 2020-07-18 08:30:00-05:00 +2024-04-13 18:31:23,078: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:31:23,081: root: INFO: Current backtesting datetime 2020-07-18 08:29:00-05:00 +2024-04-13 18:31:23,082: root: INFO: Current backtesting datetime 2020-07-18 08:29:00-05:00 +2024-04-13 18:31:23,082: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:31:23,083: root: INFO: Current backtesting datetime 2020-07-20 07:30:00-05:00 +2024-04-13 18:31:23,083: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:31:23,084: root: INFO: Current backtesting datetime 2020-07-20 08:30:00-05:00 +2024-04-13 18:31:23,084: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:31:23,085: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:23 +2024-04-13 18:31:23,085: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:23,086: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:23,086: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:23,087: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:23,087: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:24,719: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:24,720: root: INFO: Current backtesting datetime 2020-07-20 15:00:00-05:00 +2024-04-13 18:31:24,720: root: INFO: Current backtesting datetime 2020-07-21 08:30:00-05:00 +2024-04-13 18:31:24,720: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:24 +2024-04-13 18:31:24,721: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:24,721: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:24,722: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:24,722: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:24,722: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:26,389: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:26,390: root: INFO: Current backtesting datetime 2020-07-21 15:00:00-05:00 +2024-04-13 18:31:26,390: root: INFO: Current backtesting datetime 2020-07-22 08:30:00-05:00 +2024-04-13 18:31:26,390: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:26 +2024-04-13 18:31:26,391: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:26,391: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:26,392: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:26,392: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:26,392: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:28,076: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:28,077: root: INFO: Current backtesting datetime 2020-07-22 15:00:00-05:00 +2024-04-13 18:31:28,077: root: INFO: Current backtesting datetime 2020-07-23 08:30:00-05:00 +2024-04-13 18:31:28,078: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:28 +2024-04-13 18:31:28,078: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:28,078: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:28,079: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:28,079: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:28,079: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:30,623: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:30,624: root: INFO: Current backtesting datetime 2020-07-23 15:00:00-05:00 +2024-04-13 18:31:30,624: root: INFO: Current backtesting datetime 2020-07-24 08:30:00-05:00 +2024-04-13 18:31:30,624: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:30 +2024-04-13 18:31:30,625: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:30,625: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:30,626: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:30,626: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:30,626: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:33,169: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:33,170: root: INFO: Current backtesting datetime 2020-07-24 15:00:00-05:00 +2024-04-13 18:31:33,170: root: INFO: Current backtesting datetime 2020-07-25 08:30:00-05:00 +2024-04-13 18:31:33,171: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:31:33,172: root: INFO: Current backtesting datetime 2020-07-25 08:29:00-05:00 +2024-04-13 18:31:33,173: root: INFO: Current backtesting datetime 2020-07-25 08:29:00-05:00 +2024-04-13 18:31:33,174: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:31:33,174: root: INFO: Current backtesting datetime 2020-07-27 07:30:00-05:00 +2024-04-13 18:31:33,175: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:31:33,176: root: INFO: Current backtesting datetime 2020-07-27 08:30:00-05:00 +2024-04-13 18:31:33,176: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:31:33,177: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:33 +2024-04-13 18:31:33,177: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:33,178: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:33,178: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:33,178: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:33,178: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:34,554: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:34,556: root: INFO: Current backtesting datetime 2020-07-27 15:00:00-05:00 +2024-04-13 18:31:34,556: root: INFO: Current backtesting datetime 2020-07-28 08:30:00-05:00 +2024-04-13 18:31:34,556: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:34 +2024-04-13 18:31:34,556: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:34,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:34,557: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:34,558: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:34,558: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:35,732: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:35,734: root: INFO: Current backtesting datetime 2020-07-28 15:00:00-05:00 +2024-04-13 18:31:35,734: root: INFO: Current backtesting datetime 2020-07-29 08:30:00-05:00 +2024-04-13 18:31:35,734: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:35 +2024-04-13 18:31:35,734: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:35,735: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:35,735: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:35,736: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:35,736: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:37,159: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:37,160: root: INFO: Current backtesting datetime 2020-07-29 15:00:00-05:00 +2024-04-13 18:31:37,161: root: INFO: Current backtesting datetime 2020-07-30 08:30:00-05:00 +2024-04-13 18:31:37,161: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:37 +2024-04-13 18:31:37,161: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:37,162: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:37,162: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:37,163: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:37,163: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:39,776: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:39,777: root: INFO: Current backtesting datetime 2020-07-30 15:00:00-05:00 +2024-04-13 18:31:39,777: root: INFO: Current backtesting datetime 2020-07-31 08:30:00-05:00 +2024-04-13 18:31:39,778: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:39 +2024-04-13 18:31:39,778: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:39,778: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:39,779: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:39,779: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:39,779: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:42,233: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:42,234: root: INFO: Current backtesting datetime 2020-07-31 15:00:00-05:00 +2024-04-13 18:31:42,234: root: INFO: Current backtesting datetime 2020-08-01 08:30:00-05:00 +2024-04-13 18:31:42,234: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:31:42,236: root: INFO: Current backtesting datetime 2020-08-01 08:29:00-05:00 +2024-04-13 18:31:42,237: root: INFO: Current backtesting datetime 2020-08-01 08:29:00-05:00 +2024-04-13 18:31:42,237: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:31:42,238: root: INFO: Current backtesting datetime 2020-08-03 07:30:00-05:00 +2024-04-13 18:31:42,238: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:31:42,240: root: INFO: Current backtesting datetime 2020-08-03 08:30:00-05:00 +2024-04-13 18:31:42,240: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:31:42,241: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:42 +2024-04-13 18:31:42,241: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:42,241: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:42,242: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:42,242: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:42,242: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:43,883: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:43,884: root: INFO: Current backtesting datetime 2020-08-03 15:00:00-05:00 +2024-04-13 18:31:43,885: root: INFO: Current backtesting datetime 2020-08-04 08:30:00-05:00 +2024-04-13 18:31:43,885: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:43 +2024-04-13 18:31:43,885: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:43,886: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:43,886: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:43,887: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:43,887: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:46,638: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:46,639: root: INFO: Current backtesting datetime 2020-08-04 15:00:00-05:00 +2024-04-13 18:31:46,639: root: INFO: Current backtesting datetime 2020-08-05 08:30:00-05:00 +2024-04-13 18:31:46,640: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:46 +2024-04-13 18:31:46,640: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:46,641: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:46,641: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:46,641: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:46,641: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:47,995: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:47,996: root: INFO: Current backtesting datetime 2020-08-05 15:00:00-05:00 +2024-04-13 18:31:47,997: root: INFO: Current backtesting datetime 2020-08-06 08:30:00-05:00 +2024-04-13 18:31:47,997: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:47 +2024-04-13 18:31:47,997: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:47,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:47,998: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:47,999: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:47,999: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:49,104: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:49,105: root: INFO: Current backtesting datetime 2020-08-06 15:00:00-05:00 +2024-04-13 18:31:49,105: root: INFO: Current backtesting datetime 2020-08-07 08:30:00-05:00 +2024-04-13 18:31:49,105: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:49 +2024-04-13 18:31:49,105: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:49,106: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:49,106: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:49,107: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:49,107: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:49,946: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:49,947: root: INFO: Current backtesting datetime 2020-08-07 15:00:00-05:00 +2024-04-13 18:31:49,948: root: INFO: Current backtesting datetime 2020-08-08 08:30:00-05:00 +2024-04-13 18:31:49,948: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:31:49,950: root: INFO: Current backtesting datetime 2020-08-08 08:29:00-05:00 +2024-04-13 18:31:49,951: root: INFO: Current backtesting datetime 2020-08-08 08:29:00-05:00 +2024-04-13 18:31:49,951: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:31:49,952: root: INFO: Current backtesting datetime 2020-08-10 07:30:00-05:00 +2024-04-13 18:31:49,952: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:31:49,953: root: INFO: Current backtesting datetime 2020-08-10 08:30:00-05:00 +2024-04-13 18:31:49,953: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:31:49,954: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:49 +2024-04-13 18:31:49,954: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:49,955: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:49,955: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:49,955: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:49,955: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:50,745: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:50,746: root: INFO: Current backtesting datetime 2020-08-10 15:00:00-05:00 +2024-04-13 18:31:50,746: root: INFO: Current backtesting datetime 2020-08-11 08:30:00-05:00 +2024-04-13 18:31:50,747: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:50 +2024-04-13 18:31:50,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:50,748: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:50,748: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:50,748: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:50,748: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:51,633: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:51,634: root: INFO: Current backtesting datetime 2020-08-11 15:00:00-05:00 +2024-04-13 18:31:51,634: root: INFO: Current backtesting datetime 2020-08-12 08:30:00-05:00 +2024-04-13 18:31:51,634: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:51 +2024-04-13 18:31:51,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:51,635: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:51,635: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:51,636: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:51,636: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:52,444: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:52,445: root: INFO: Current backtesting datetime 2020-08-12 15:00:00-05:00 +2024-04-13 18:31:52,445: root: INFO: Current backtesting datetime 2020-08-13 08:30:00-05:00 +2024-04-13 18:31:52,445: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:52 +2024-04-13 18:31:52,445: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:52,446: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:52,446: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:52,447: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:52,447: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:53,008: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:53,009: root: INFO: Current backtesting datetime 2020-08-13 15:00:00-05:00 +2024-04-13 18:31:53,010: root: INFO: Current backtesting datetime 2020-08-14 08:30:00-05:00 +2024-04-13 18:31:53,010: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:53 +2024-04-13 18:31:53,010: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:53,011: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:53,011: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:53,012: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:53,012: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:53,914: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:53,915: root: INFO: Current backtesting datetime 2020-08-14 15:00:00-05:00 +2024-04-13 18:31:53,915: root: INFO: Current backtesting datetime 2020-08-15 08:30:00-05:00 +2024-04-13 18:31:53,916: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:31:53,917: root: INFO: Current backtesting datetime 2020-08-15 08:29:00-05:00 +2024-04-13 18:31:53,919: root: INFO: Current backtesting datetime 2020-08-15 08:29:00-05:00 +2024-04-13 18:31:53,919: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:31:53,920: root: INFO: Current backtesting datetime 2020-08-17 07:30:00-05:00 +2024-04-13 18:31:53,920: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:31:53,921: root: INFO: Current backtesting datetime 2020-08-17 08:30:00-05:00 +2024-04-13 18:31:53,921: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:31:53,922: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:53 +2024-04-13 18:31:53,922: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:53,923: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:53,923: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:53,924: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:53,924: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:54,623: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:54,624: root: INFO: Current backtesting datetime 2020-08-17 15:00:00-05:00 +2024-04-13 18:31:54,624: root: INFO: Current backtesting datetime 2020-08-18 08:30:00-05:00 +2024-04-13 18:31:54,625: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:54 +2024-04-13 18:31:54,625: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:54,626: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:54,626: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:54,626: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:54,626: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:55,445: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:55,447: root: INFO: Current backtesting datetime 2020-08-18 15:00:00-05:00 +2024-04-13 18:31:55,447: root: INFO: Current backtesting datetime 2020-08-19 08:30:00-05:00 +2024-04-13 18:31:55,447: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:55 +2024-04-13 18:31:55,447: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:55,447: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:55,448: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:55,448: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:55,448: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:56,118: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:56,119: root: INFO: Current backtesting datetime 2020-08-19 15:00:00-05:00 +2024-04-13 18:31:56,120: root: INFO: Current backtesting datetime 2020-08-20 08:30:00-05:00 +2024-04-13 18:31:56,120: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:56 +2024-04-13 18:31:56,120: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:56,121: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:56,121: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:56,122: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:56,122: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:56,946: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:56,947: root: INFO: Current backtesting datetime 2020-08-20 15:00:00-05:00 +2024-04-13 18:31:56,947: root: INFO: Current backtesting datetime 2020-08-21 08:30:00-05:00 +2024-04-13 18:31:56,948: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:56 +2024-04-13 18:31:56,948: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:56,949: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:56,949: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:56,949: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:56,950: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:57,663: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:57,663: root: INFO: Current backtesting datetime 2020-08-21 15:00:00-05:00 +2024-04-13 18:31:57,664: root: INFO: Current backtesting datetime 2020-08-22 08:30:00-05:00 +2024-04-13 18:31:57,665: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:31:57,666: root: INFO: Current backtesting datetime 2020-08-22 08:29:00-05:00 +2024-04-13 18:31:57,667: root: INFO: Current backtesting datetime 2020-08-22 08:29:00-05:00 +2024-04-13 18:31:57,667: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:31:57,668: root: INFO: Current backtesting datetime 2020-08-24 07:30:00-05:00 +2024-04-13 18:31:57,669: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:31:57,670: root: INFO: Current backtesting datetime 2020-08-24 08:30:00-05:00 +2024-04-13 18:31:57,670: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:31:57,671: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:57 +2024-04-13 18:31:57,671: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:57,671: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:57,672: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:57,672: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:57,672: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:58,792: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:58,793: root: INFO: Current backtesting datetime 2020-08-24 15:00:00-05:00 +2024-04-13 18:31:58,794: root: INFO: Current backtesting datetime 2020-08-25 08:30:00-05:00 +2024-04-13 18:31:58,794: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:58 +2024-04-13 18:31:58,794: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:58,795: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:58,795: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:58,796: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:58,796: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:31:59,740: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:31:59,741: root: INFO: Current backtesting datetime 2020-08-25 15:00:00-05:00 +2024-04-13 18:31:59,742: root: INFO: Current backtesting datetime 2020-08-26 08:30:00-05:00 +2024-04-13 18:31:59,742: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:31:59 +2024-04-13 18:31:59,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:59,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:31:59,743: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:31:59,744: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:31:59,744: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:00,637: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:00,638: root: INFO: Current backtesting datetime 2020-08-26 15:00:00-05:00 +2024-04-13 18:32:00,638: root: INFO: Current backtesting datetime 2020-08-27 08:30:00-05:00 +2024-04-13 18:32:00,639: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:00 +2024-04-13 18:32:00,639: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:00,640: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:00,640: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:00,640: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:00,641: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:01,584: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:01,585: root: INFO: Current backtesting datetime 2020-08-27 15:00:00-05:00 +2024-04-13 18:32:01,586: root: INFO: Current backtesting datetime 2020-08-28 08:30:00-05:00 +2024-04-13 18:32:01,586: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:01 +2024-04-13 18:32:01,586: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:01,587: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:01,587: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:01,588: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:01,588: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:02,159: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:02,160: root: INFO: Current backtesting datetime 2020-08-28 15:00:00-05:00 +2024-04-13 18:32:02,160: root: INFO: Current backtesting datetime 2020-08-29 08:30:00-05:00 +2024-04-13 18:32:02,160: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:32:02,162: root: INFO: Current backtesting datetime 2020-08-29 08:29:00-05:00 +2024-04-13 18:32:02,163: root: INFO: Current backtesting datetime 2020-08-29 08:29:00-05:00 +2024-04-13 18:32:02,163: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:32:02,164: root: INFO: Current backtesting datetime 2020-08-31 07:30:00-05:00 +2024-04-13 18:32:02,164: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:32:02,165: root: INFO: Current backtesting datetime 2020-08-31 08:30:00-05:00 +2024-04-13 18:32:02,165: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:32:02,166: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:02 +2024-04-13 18:32:02,166: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:02,167: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:02,167: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:02,168: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:02,168: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:02,880: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:02,881: root: INFO: Current backtesting datetime 2020-08-31 15:00:00-05:00 +2024-04-13 18:32:02,881: root: INFO: Current backtesting datetime 2020-09-01 08:30:00-05:00 +2024-04-13 18:32:02,882: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:02 +2024-04-13 18:32:02,882: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:02,883: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:02,883: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:02,883: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:02,883: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:03,928: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:03,929: root: INFO: Current backtesting datetime 2020-09-01 15:00:00-05:00 +2024-04-13 18:32:03,930: root: INFO: Current backtesting datetime 2020-09-02 08:30:00-05:00 +2024-04-13 18:32:03,930: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:03 +2024-04-13 18:32:03,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:03,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:03,931: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:03,932: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:03,932: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:04,927: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:04,928: root: INFO: Current backtesting datetime 2020-09-02 15:00:00-05:00 +2024-04-13 18:32:04,929: root: INFO: Current backtesting datetime 2020-09-03 08:30:00-05:00 +2024-04-13 18:32:04,929: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:04 +2024-04-13 18:32:04,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:04,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:04,930: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:04,931: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:04,931: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:05,939: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:05,940: root: INFO: Current backtesting datetime 2020-09-03 15:00:00-05:00 +2024-04-13 18:32:05,941: root: INFO: Current backtesting datetime 2020-09-04 08:30:00-05:00 +2024-04-13 18:32:05,941: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:05 +2024-04-13 18:32:05,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:05,942: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:05,942: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:05,943: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:05,943: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:06,880: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:06,881: root: INFO: Current backtesting datetime 2020-09-04 15:00:00-05:00 +2024-04-13 18:32:06,882: root: INFO: Current backtesting datetime 2020-09-05 08:30:00-05:00 +2024-04-13 18:32:06,882: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:32:06,883: root: INFO: Current backtesting datetime 2020-09-05 08:29:00-05:00 +2024-04-13 18:32:06,884: root: INFO: Current backtesting datetime 2020-09-05 08:29:00-05:00 +2024-04-13 18:32:06,884: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:32:06,885: root: INFO: Current backtesting datetime 2020-09-08 07:30:00-05:00 +2024-04-13 18:32:06,886: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:32:06,887: root: INFO: Current backtesting datetime 2020-09-08 08:30:00-05:00 +2024-04-13 18:32:06,887: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:32:06,888: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:06 +2024-04-13 18:32:06,888: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:06,889: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:06,889: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:06,889: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:06,890: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:08,125: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:08,126: root: INFO: Current backtesting datetime 2020-09-08 15:00:00-05:00 +2024-04-13 18:32:08,126: root: INFO: Current backtesting datetime 2020-09-09 08:30:00-05:00 +2024-04-13 18:32:08,127: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:08 +2024-04-13 18:32:08,127: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:08,128: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:08,128: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:08,129: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:08,129: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:09,110: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:09,111: root: INFO: Current backtesting datetime 2020-09-09 15:00:00-05:00 +2024-04-13 18:32:09,112: root: INFO: Current backtesting datetime 2020-09-10 08:30:00-05:00 +2024-04-13 18:32:09,112: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:09 +2024-04-13 18:32:09,112: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:09,113: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:09,113: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:09,114: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:09,114: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:10,196: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:10,197: root: INFO: Current backtesting datetime 2020-09-10 15:00:00-05:00 +2024-04-13 18:32:10,197: root: INFO: Current backtesting datetime 2020-09-11 08:30:00-05:00 +2024-04-13 18:32:10,198: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:10 +2024-04-13 18:32:10,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:10,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:10,199: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:10,199: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:10,199: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:11,298: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:11,299: root: INFO: Current backtesting datetime 2020-09-11 15:00:00-05:00 +2024-04-13 18:32:11,299: root: INFO: Current backtesting datetime 2020-09-12 08:30:00-05:00 +2024-04-13 18:32:11,299: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:32:11,301: root: INFO: Current backtesting datetime 2020-09-12 08:29:00-05:00 +2024-04-13 18:32:11,302: root: INFO: Current backtesting datetime 2020-09-12 08:29:00-05:00 +2024-04-13 18:32:11,302: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:32:11,303: root: INFO: Current backtesting datetime 2020-09-14 07:30:00-05:00 +2024-04-13 18:32:11,303: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:32:11,304: root: INFO: Current backtesting datetime 2020-09-14 08:30:00-05:00 +2024-04-13 18:32:11,304: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:32:11,305: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:11 +2024-04-13 18:32:11,305: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:11,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:11,306: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:11,307: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:11,307: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:12,195: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:12,196: root: INFO: Current backtesting datetime 2020-09-14 15:00:00-05:00 +2024-04-13 18:32:12,196: root: INFO: Current backtesting datetime 2020-09-15 08:30:00-05:00 +2024-04-13 18:32:12,196: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:12 +2024-04-13 18:32:12,196: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:12,197: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:12,197: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:12,198: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:12,198: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:13,190: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:13,191: root: INFO: Current backtesting datetime 2020-09-15 15:00:00-05:00 +2024-04-13 18:32:13,191: root: INFO: Current backtesting datetime 2020-09-16 08:30:00-05:00 +2024-04-13 18:32:13,192: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:13 +2024-04-13 18:32:13,192: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:13,193: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:13,193: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:13,194: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:13,194: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:14,781: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:14,781: root: INFO: Current backtesting datetime 2020-09-16 15:00:00-05:00 +2024-04-13 18:32:14,782: root: INFO: Current backtesting datetime 2020-09-17 08:30:00-05:00 +2024-04-13 18:32:14,782: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:14 +2024-04-13 18:32:14,782: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:14,783: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:14,783: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:14,784: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:14,784: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:15,925: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:15,927: root: INFO: Current backtesting datetime 2020-09-17 15:00:00-05:00 +2024-04-13 18:32:15,927: root: INFO: Current backtesting datetime 2020-09-18 08:30:00-05:00 +2024-04-13 18:32:15,927: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:15 +2024-04-13 18:32:15,927: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:15,927: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:15,928: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:15,928: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:15,928: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:17,099: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:17,100: root: INFO: Current backtesting datetime 2020-09-18 15:00:00-05:00 +2024-04-13 18:32:17,100: root: INFO: Current backtesting datetime 2020-09-19 08:30:00-05:00 +2024-04-13 18:32:17,101: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:32:17,102: root: INFO: Current backtesting datetime 2020-09-19 08:29:00-05:00 +2024-04-13 18:32:17,104: root: INFO: Current backtesting datetime 2020-09-19 08:29:00-05:00 +2024-04-13 18:32:17,104: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:32:17,104: root: INFO: Current backtesting datetime 2020-09-21 07:30:00-05:00 +2024-04-13 18:32:17,105: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:32:17,107: root: INFO: Current backtesting datetime 2020-09-21 08:30:00-05:00 +2024-04-13 18:32:17,107: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:32:17,107: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:17 +2024-04-13 18:32:17,108: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:17,108: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:17,109: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:17,109: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:17,109: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:18,223: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:18,224: root: INFO: Current backtesting datetime 2020-09-21 15:00:00-05:00 +2024-04-13 18:32:18,224: root: INFO: Current backtesting datetime 2020-09-22 08:30:00-05:00 +2024-04-13 18:32:18,225: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:18 +2024-04-13 18:32:18,225: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:18,226: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:18,226: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:18,227: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:18,227: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:19,209: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:19,210: root: INFO: Current backtesting datetime 2020-09-22 15:00:00-05:00 +2024-04-13 18:32:19,210: root: INFO: Current backtesting datetime 2020-09-23 08:30:00-05:00 +2024-04-13 18:32:19,211: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:19 +2024-04-13 18:32:19,211: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:19,212: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:19,212: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:19,212: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:19,213: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:20,074: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:20,076: root: INFO: Current backtesting datetime 2020-09-23 15:00:00-05:00 +2024-04-13 18:32:20,076: root: INFO: Current backtesting datetime 2020-09-24 08:30:00-05:00 +2024-04-13 18:32:20,076: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:20 +2024-04-13 18:32:20,077: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:20,077: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:20,078: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:20,078: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:20,078: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:21,326: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:21,327: root: INFO: Current backtesting datetime 2020-09-24 15:00:00-05:00 +2024-04-13 18:32:21,327: root: INFO: Current backtesting datetime 2020-09-25 08:30:00-05:00 +2024-04-13 18:32:21,328: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:21 +2024-04-13 18:32:21,328: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:21,328: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:21,329: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:21,329: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:21,329: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:22,893: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:22,894: root: INFO: Current backtesting datetime 2020-09-25 15:00:00-05:00 +2024-04-13 18:32:22,894: root: INFO: Current backtesting datetime 2020-09-26 08:30:00-05:00 +2024-04-13 18:32:22,894: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:32:22,896: root: INFO: Current backtesting datetime 2020-09-26 08:29:00-05:00 +2024-04-13 18:32:22,897: root: INFO: Current backtesting datetime 2020-09-26 08:29:00-05:00 +2024-04-13 18:32:22,897: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:32:22,898: root: INFO: Current backtesting datetime 2020-09-28 07:30:00-05:00 +2024-04-13 18:32:22,898: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:32:22,899: root: INFO: Current backtesting datetime 2020-09-28 08:30:00-05:00 +2024-04-13 18:32:22,899: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:32:22,901: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:22 +2024-04-13 18:32:22,901: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:22,901: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:22,902: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:22,902: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:22,902: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:24,036: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:24,037: root: INFO: Current backtesting datetime 2020-09-28 15:00:00-05:00 +2024-04-13 18:32:24,037: root: INFO: Current backtesting datetime 2020-09-29 08:30:00-05:00 +2024-04-13 18:32:24,038: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:24 +2024-04-13 18:32:24,038: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:24,039: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:24,039: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:24,039: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:24,039: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:24,908: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:24,909: root: INFO: Current backtesting datetime 2020-09-29 15:00:00-05:00 +2024-04-13 18:32:24,909: root: INFO: Current backtesting datetime 2020-09-30 08:30:00-05:00 +2024-04-13 18:32:24,909: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:24 +2024-04-13 18:32:24,909: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:24,911: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:24,911: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:24,912: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:24,912: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:25,786: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:25,787: root: INFO: Current backtesting datetime 2020-09-30 15:00:00-05:00 +2024-04-13 18:32:25,787: root: INFO: Current backtesting datetime 2020-10-01 08:30:00-05:00 +2024-04-13 18:32:25,788: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:25 +2024-04-13 18:32:25,788: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:25,788: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:25,789: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:25,789: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:25,789: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:27,091: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:27,092: root: INFO: Current backtesting datetime 2020-10-01 15:00:00-05:00 +2024-04-13 18:32:27,092: root: INFO: Current backtesting datetime 2020-10-02 08:30:00-05:00 +2024-04-13 18:32:27,093: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:27 +2024-04-13 18:32:27,093: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:27,094: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:27,094: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:27,094: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:27,094: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:27,824: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:27,824: root: INFO: Current backtesting datetime 2020-10-02 15:00:00-05:00 +2024-04-13 18:32:27,825: root: INFO: Current backtesting datetime 2020-10-03 08:30:00-05:00 +2024-04-13 18:32:27,825: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:32:27,826: root: INFO: Current backtesting datetime 2020-10-03 08:29:00-05:00 +2024-04-13 18:32:27,828: root: INFO: Current backtesting datetime 2020-10-03 08:29:00-05:00 +2024-04-13 18:32:27,828: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:32:27,828: root: INFO: Current backtesting datetime 2020-10-05 07:30:00-05:00 +2024-04-13 18:32:27,829: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:32:27,830: root: INFO: Current backtesting datetime 2020-10-05 08:30:00-05:00 +2024-04-13 18:32:27,830: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:32:27,831: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:27 +2024-04-13 18:32:27,831: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:27,832: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:27,832: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:27,833: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:27,833: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:28,480: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:28,481: root: INFO: Current backtesting datetime 2020-10-05 15:00:00-05:00 +2024-04-13 18:32:28,482: root: INFO: Current backtesting datetime 2020-10-06 08:30:00-05:00 +2024-04-13 18:32:28,482: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:28 +2024-04-13 18:32:28,482: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:28,483: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:28,483: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:28,484: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:28,484: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:29,736: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:29,737: root: INFO: Current backtesting datetime 2020-10-06 15:00:00-05:00 +2024-04-13 18:32:29,737: root: INFO: Current backtesting datetime 2020-10-07 08:30:00-05:00 +2024-04-13 18:32:29,738: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:29 +2024-04-13 18:32:29,738: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:29,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:29,739: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:29,739: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:29,740: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:30,679: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:30,680: root: INFO: Current backtesting datetime 2020-10-07 15:00:00-05:00 +2024-04-13 18:32:30,680: root: INFO: Current backtesting datetime 2020-10-08 08:30:00-05:00 +2024-04-13 18:32:30,680: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:30 +2024-04-13 18:32:30,681: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:30,681: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:30,682: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:30,682: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:30,682: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:31,596: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:31,597: root: INFO: Current backtesting datetime 2020-10-08 15:00:00-05:00 +2024-04-13 18:32:31,598: root: INFO: Current backtesting datetime 2020-10-09 08:30:00-05:00 +2024-04-13 18:32:31,598: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:31 +2024-04-13 18:32:31,598: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:31,599: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:31,599: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:31,600: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:31,600: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:33,582: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:33,583: root: INFO: Current backtesting datetime 2020-10-09 15:00:00-05:00 +2024-04-13 18:32:33,583: root: INFO: Current backtesting datetime 2020-10-10 08:30:00-05:00 +2024-04-13 18:32:33,584: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:32:33,585: root: INFO: Current backtesting datetime 2020-10-10 08:29:00-05:00 +2024-04-13 18:32:33,587: root: INFO: Current backtesting datetime 2020-10-10 08:29:00-05:00 +2024-04-13 18:32:33,587: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:32:33,587: root: INFO: Current backtesting datetime 2020-10-12 07:30:00-05:00 +2024-04-13 18:32:33,588: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:32:33,589: root: INFO: Current backtesting datetime 2020-10-12 08:30:00-05:00 +2024-04-13 18:32:33,589: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:32:33,590: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:33 +2024-04-13 18:32:33,590: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:33,591: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:33,591: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:33,591: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:33,592: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:35,096: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:35,097: root: INFO: Current backtesting datetime 2020-10-12 15:00:00-05:00 +2024-04-13 18:32:35,097: root: INFO: Current backtesting datetime 2020-10-13 08:30:00-05:00 +2024-04-13 18:32:35,098: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:35 +2024-04-13 18:32:35,098: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:35,098: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:35,099: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:35,099: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:35,099: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:36,206: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:36,207: root: INFO: Current backtesting datetime 2020-10-13 15:00:00-05:00 +2024-04-13 18:32:36,207: root: INFO: Current backtesting datetime 2020-10-14 08:30:00-05:00 +2024-04-13 18:32:36,208: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:36 +2024-04-13 18:32:36,208: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:36,209: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:36,209: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:36,209: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:36,209: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:38,193: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:38,194: root: INFO: Current backtesting datetime 2020-10-14 15:00:00-05:00 +2024-04-13 18:32:38,194: root: INFO: Current backtesting datetime 2020-10-15 08:30:00-05:00 +2024-04-13 18:32:38,195: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:38 +2024-04-13 18:32:38,195: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:38,196: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:38,196: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:38,197: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:38,197: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:41,366: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:41,367: root: INFO: Current backtesting datetime 2020-10-15 15:00:00-05:00 +2024-04-13 18:32:41,368: root: INFO: Current backtesting datetime 2020-10-16 08:30:00-05:00 +2024-04-13 18:32:41,368: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:41 +2024-04-13 18:32:41,368: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:41,369: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:41,369: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:41,370: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:41,370: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:42,813: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:42,814: root: INFO: Current backtesting datetime 2020-10-16 15:00:00-05:00 +2024-04-13 18:32:42,815: root: INFO: Current backtesting datetime 2020-10-17 08:30:00-05:00 +2024-04-13 18:32:42,815: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:32:42,816: root: INFO: Current backtesting datetime 2020-10-17 08:29:00-05:00 +2024-04-13 18:32:42,817: root: INFO: Current backtesting datetime 2020-10-17 08:29:00-05:00 +2024-04-13 18:32:42,818: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:32:42,818: root: INFO: Current backtesting datetime 2020-10-19 07:30:00-05:00 +2024-04-13 18:32:42,819: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:32:42,820: root: INFO: Current backtesting datetime 2020-10-19 08:30:00-05:00 +2024-04-13 18:32:42,820: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:32:42,821: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:42 +2024-04-13 18:32:42,821: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:42,822: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:42,822: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:42,822: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:42,822: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:44,116: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:44,117: root: INFO: Current backtesting datetime 2020-10-19 15:00:00-05:00 +2024-04-13 18:32:44,118: root: INFO: Current backtesting datetime 2020-10-20 08:30:00-05:00 +2024-04-13 18:32:44,118: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:44 +2024-04-13 18:32:44,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:44,119: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:44,119: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:44,120: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:44,120: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:47,005: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:47,006: root: INFO: Current backtesting datetime 2020-10-20 15:00:00-05:00 +2024-04-13 18:32:47,006: root: INFO: Current backtesting datetime 2020-10-21 08:30:00-05:00 +2024-04-13 18:32:47,006: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:47 +2024-04-13 18:32:47,006: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:47,007: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:47,007: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:47,008: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:47,008: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:49,335: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:49,336: root: INFO: Current backtesting datetime 2020-10-21 15:00:00-05:00 +2024-04-13 18:32:49,337: root: INFO: Current backtesting datetime 2020-10-22 08:30:00-05:00 +2024-04-13 18:32:49,337: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:49 +2024-04-13 18:32:49,337: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:49,338: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:49,338: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:49,339: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:49,339: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:51,513: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:51,514: root: INFO: Current backtesting datetime 2020-10-22 15:00:00-05:00 +2024-04-13 18:32:51,514: root: INFO: Current backtesting datetime 2020-10-23 08:30:00-05:00 +2024-04-13 18:32:51,515: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:51 +2024-04-13 18:32:51,515: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:51,516: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:51,516: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:51,516: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:51,516: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:53,968: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:53,969: root: INFO: Current backtesting datetime 2020-10-23 15:00:00-05:00 +2024-04-13 18:32:53,969: root: INFO: Current backtesting datetime 2020-10-24 08:30:00-05:00 +2024-04-13 18:32:53,970: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:32:53,971: root: INFO: Current backtesting datetime 2020-10-24 08:29:00-05:00 +2024-04-13 18:32:53,972: root: INFO: Current backtesting datetime 2020-10-24 08:29:00-05:00 +2024-04-13 18:32:53,972: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:32:53,973: root: INFO: Current backtesting datetime 2020-10-26 07:30:00-05:00 +2024-04-13 18:32:53,974: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:32:53,975: root: INFO: Current backtesting datetime 2020-10-26 08:30:00-05:00 +2024-04-13 18:32:53,975: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:32:53,976: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:53 +2024-04-13 18:32:53,976: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:53,976: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:53,977: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:53,977: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:53,977: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:55,034: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:55,035: root: INFO: Current backtesting datetime 2020-10-26 15:00:00-05:00 +2024-04-13 18:32:55,036: root: INFO: Current backtesting datetime 2020-10-27 08:30:00-05:00 +2024-04-13 18:32:55,036: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:55 +2024-04-13 18:32:55,036: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:55,037: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:55,037: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:55,038: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:55,038: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:55,981: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:55,982: root: INFO: Current backtesting datetime 2020-10-27 15:00:00-05:00 +2024-04-13 18:32:55,983: root: INFO: Current backtesting datetime 2020-10-28 08:30:00-05:00 +2024-04-13 18:32:55,983: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:55 +2024-04-13 18:32:55,983: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:55,985: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:55,985: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:55,985: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:55,985: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:57,121: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:57,122: root: INFO: Current backtesting datetime 2020-10-28 15:00:00-05:00 +2024-04-13 18:32:57,122: root: INFO: Current backtesting datetime 2020-10-29 08:30:00-05:00 +2024-04-13 18:32:57,123: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:57 +2024-04-13 18:32:57,123: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:57,124: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:57,124: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:57,125: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:57,125: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:57,925: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:57,926: root: INFO: Current backtesting datetime 2020-10-29 15:00:00-05:00 +2024-04-13 18:32:57,926: root: INFO: Current backtesting datetime 2020-10-30 08:30:00-05:00 +2024-04-13 18:32:57,926: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:57 +2024-04-13 18:32:57,926: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:57,927: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:57,927: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:57,928: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:57,928: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:32:58,960: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:32:58,960: root: INFO: Current backtesting datetime 2020-10-30 15:00:00-05:00 +2024-04-13 18:32:58,961: root: INFO: Current backtesting datetime 2020-10-31 08:30:00-05:00 +2024-04-13 18:32:58,961: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:32:58,963: root: INFO: Current backtesting datetime 2020-10-31 08:29:00-05:00 +2024-04-13 18:32:58,964: root: INFO: Current backtesting datetime 2020-10-31 08:29:00-05:00 +2024-04-13 18:32:58,964: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:32:58,965: root: INFO: Current backtesting datetime 2020-11-02 08:30:00-05:00 +2024-04-13 18:32:58,965: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:32:58,966: root: INFO: Current backtesting datetime 2020-11-02 09:30:00-05:00 +2024-04-13 18:32:58,966: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:32:58,967: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:32:58 +2024-04-13 18:32:58,967: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:58,968: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:32:58,968: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:32:58,969: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:32:58,969: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:00,618: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:00,619: root: INFO: Current backtesting datetime 2020-11-02 16:00:00-05:00 +2024-04-13 18:33:00,619: root: INFO: Current backtesting datetime 2020-11-03 09:30:00-05:00 +2024-04-13 18:33:00,619: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:00 +2024-04-13 18:33:00,620: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:00,620: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:00,621: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:00,621: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:00,621: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:01,462: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:01,463: root: INFO: Current backtesting datetime 2020-11-03 16:00:00-05:00 +2024-04-13 18:33:01,464: root: INFO: Current backtesting datetime 2020-11-04 09:30:00-05:00 +2024-04-13 18:33:01,464: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:01 +2024-04-13 18:33:01,464: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:01,465: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:01,465: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:01,466: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:01,466: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:02,601: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:02,602: root: INFO: Current backtesting datetime 2020-11-04 16:00:00-05:00 +2024-04-13 18:33:02,602: root: INFO: Current backtesting datetime 2020-11-05 09:30:00-05:00 +2024-04-13 18:33:02,602: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:02 +2024-04-13 18:33:02,602: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:02,604: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:02,604: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:02,604: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:02,604: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:03,629: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:03,630: root: INFO: Current backtesting datetime 2020-11-05 16:00:00-05:00 +2024-04-13 18:33:03,630: root: INFO: Current backtesting datetime 2020-11-06 09:30:00-05:00 +2024-04-13 18:33:03,631: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:03 +2024-04-13 18:33:03,631: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:03,632: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:03,632: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:03,633: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:03,633: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:04,671: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:04,672: root: INFO: Current backtesting datetime 2020-11-06 16:00:00-05:00 +2024-04-13 18:33:04,673: root: INFO: Current backtesting datetime 2020-11-07 09:30:00-05:00 +2024-04-13 18:33:04,673: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:33:04,674: root: INFO: Current backtesting datetime 2020-11-07 09:29:00-05:00 +2024-04-13 18:33:04,676: root: INFO: Current backtesting datetime 2020-11-07 09:29:00-05:00 +2024-04-13 18:33:04,676: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:33:04,676: root: INFO: Current backtesting datetime 2020-11-09 08:30:00-05:00 +2024-04-13 18:33:04,677: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:33:04,678: root: INFO: Current backtesting datetime 2020-11-09 09:30:00-05:00 +2024-04-13 18:33:04,678: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:33:04,679: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:04 +2024-04-13 18:33:04,679: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:04,680: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:04,680: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:04,680: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:04,680: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:06,453: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:06,454: root: INFO: Current backtesting datetime 2020-11-09 16:00:00-05:00 +2024-04-13 18:33:06,454: root: INFO: Current backtesting datetime 2020-11-10 09:30:00-05:00 +2024-04-13 18:33:06,454: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:06 +2024-04-13 18:33:06,455: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:06,455: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:06,456: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:06,456: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:06,456: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:07,759: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:07,760: root: INFO: Current backtesting datetime 2020-11-10 16:00:00-05:00 +2024-04-13 18:33:07,760: root: INFO: Current backtesting datetime 2020-11-11 09:30:00-05:00 +2024-04-13 18:33:07,761: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:07 +2024-04-13 18:33:07,761: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:07,762: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:07,762: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:07,762: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:07,762: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:09,105: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:09,105: root: INFO: Current backtesting datetime 2020-11-11 16:00:00-05:00 +2024-04-13 18:33:09,106: root: INFO: Current backtesting datetime 2020-11-12 09:30:00-05:00 +2024-04-13 18:33:09,106: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:09 +2024-04-13 18:33:09,106: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:09,107: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:09,107: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:09,108: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:09,108: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:10,408: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:10,409: root: INFO: Current backtesting datetime 2020-11-12 16:00:00-05:00 +2024-04-13 18:33:10,409: root: INFO: Current backtesting datetime 2020-11-13 09:30:00-05:00 +2024-04-13 18:33:10,409: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:10 +2024-04-13 18:33:10,409: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:10,410: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:10,410: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:10,411: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:10,411: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:11,296: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:11,297: root: INFO: Current backtesting datetime 2020-11-13 16:00:00-05:00 +2024-04-13 18:33:11,298: root: INFO: Current backtesting datetime 2020-11-14 09:30:00-05:00 +2024-04-13 18:33:11,298: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:33:11,300: root: INFO: Current backtesting datetime 2020-11-14 09:29:00-05:00 +2024-04-13 18:33:11,301: root: INFO: Current backtesting datetime 2020-11-14 09:29:00-05:00 +2024-04-13 18:33:11,301: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:33:11,302: root: INFO: Current backtesting datetime 2020-11-16 08:30:00-05:00 +2024-04-13 18:33:11,302: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:33:11,303: root: INFO: Current backtesting datetime 2020-11-16 09:30:00-05:00 +2024-04-13 18:33:11,303: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:33:11,304: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:11 +2024-04-13 18:33:11,304: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:11,305: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:11,305: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:11,306: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:11,306: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:12,488: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:12,489: root: INFO: Current backtesting datetime 2020-11-16 16:00:00-05:00 +2024-04-13 18:33:12,490: root: INFO: Current backtesting datetime 2020-11-17 09:30:00-05:00 +2024-04-13 18:33:12,490: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:12 +2024-04-13 18:33:12,490: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:12,491: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:12,491: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:12,492: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:12,492: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:13,554: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:13,555: root: INFO: Current backtesting datetime 2020-11-17 16:00:00-05:00 +2024-04-13 18:33:13,555: root: INFO: Current backtesting datetime 2020-11-18 09:30:00-05:00 +2024-04-13 18:33:13,555: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:13 +2024-04-13 18:33:13,556: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:13,556: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:13,557: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:13,557: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:13,557: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:14,706: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:14,707: root: INFO: Current backtesting datetime 2020-11-18 16:00:00-05:00 +2024-04-13 18:33:14,708: root: INFO: Current backtesting datetime 2020-11-19 09:30:00-05:00 +2024-04-13 18:33:14,708: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:14 +2024-04-13 18:33:14,708: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:14,709: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:14,709: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:14,710: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:14,710: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:15,949: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:15,950: root: INFO: Current backtesting datetime 2020-11-19 16:00:00-05:00 +2024-04-13 18:33:15,950: root: INFO: Current backtesting datetime 2020-11-20 09:30:00-05:00 +2024-04-13 18:33:15,951: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:15 +2024-04-13 18:33:15,951: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:15,951: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:15,952: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:15,952: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:15,952: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:17,266: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:17,267: root: INFO: Current backtesting datetime 2020-11-20 16:00:00-05:00 +2024-04-13 18:33:17,267: root: INFO: Current backtesting datetime 2020-11-21 09:30:00-05:00 +2024-04-13 18:33:17,268: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:33:17,269: root: INFO: Current backtesting datetime 2020-11-21 09:29:00-05:00 +2024-04-13 18:33:17,271: root: INFO: Current backtesting datetime 2020-11-21 09:29:00-05:00 +2024-04-13 18:33:17,271: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:33:17,271: root: INFO: Current backtesting datetime 2020-11-23 08:30:00-05:00 +2024-04-13 18:33:17,272: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:33:17,273: root: INFO: Current backtesting datetime 2020-11-23 09:30:00-05:00 +2024-04-13 18:33:17,273: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:33:17,274: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:17 +2024-04-13 18:33:17,274: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:17,275: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:17,275: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:17,275: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:17,275: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:18,559: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:18,560: root: INFO: Current backtesting datetime 2020-11-23 16:00:00-05:00 +2024-04-13 18:33:18,561: root: INFO: Current backtesting datetime 2020-11-24 09:30:00-05:00 +2024-04-13 18:33:18,561: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:18 +2024-04-13 18:33:18,561: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:18,562: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:18,562: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:18,563: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:18,563: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:19,466: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:19,467: root: INFO: Current backtesting datetime 2020-11-24 16:00:00-05:00 +2024-04-13 18:33:19,467: root: INFO: Current backtesting datetime 2020-11-25 09:30:00-05:00 +2024-04-13 18:33:19,468: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:19 +2024-04-13 18:33:19,468: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:19,469: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:19,469: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:19,470: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:19,470: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:20,761: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:20,762: root: INFO: Current backtesting datetime 2020-11-25 16:00:00-05:00 +2024-04-13 18:33:20,763: root: INFO: Current backtesting datetime 2020-11-26 09:30:00-05:00 +2024-04-13 18:33:20,763: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:33:20,765: root: INFO: Current backtesting datetime 2020-11-26 09:29:00-05:00 +2024-04-13 18:33:20,766: root: INFO: Current backtesting datetime 2020-11-26 09:29:00-05:00 +2024-04-13 18:33:20,766: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:33:20,767: root: INFO: Current backtesting datetime 2020-11-27 08:30:00-05:00 +2024-04-13 18:33:20,767: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:33:20,768: root: INFO: Current backtesting datetime 2020-11-27 09:30:00-05:00 +2024-04-13 18:33:20,768: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:33:20,769: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:20 +2024-04-13 18:33:20,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:20,770: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:20,770: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:20,771: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:20,771: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:22,699: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:22,700: root: INFO: Current backtesting datetime 2020-11-27 13:00:00-05:00 +2024-04-13 18:33:22,700: root: INFO: Current backtesting datetime 2020-11-28 09:30:00-05:00 +2024-04-13 18:33:22,701: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:33:22,702: root: INFO: Current backtesting datetime 2020-11-28 09:29:00-05:00 +2024-04-13 18:33:22,704: root: INFO: Current backtesting datetime 2020-11-28 09:29:00-05:00 +2024-04-13 18:33:22,704: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:33:22,705: root: INFO: Current backtesting datetime 2020-11-30 08:30:00-05:00 +2024-04-13 18:33:22,705: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:33:22,706: root: INFO: Current backtesting datetime 2020-11-30 09:30:00-05:00 +2024-04-13 18:33:22,706: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:33:22,707: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:22 +2024-04-13 18:33:22,707: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:22,708: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:22,708: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:22,709: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:22,709: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:24,324: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:24,324: root: INFO: Current backtesting datetime 2020-11-30 16:00:00-05:00 +2024-04-13 18:33:24,325: root: INFO: Current backtesting datetime 2020-12-01 09:30:00-05:00 +2024-04-13 18:33:24,325: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:24 +2024-04-13 18:33:24,325: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:24,326: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:24,326: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:24,327: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:24,327: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:25,793: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:25,793: root: INFO: Current backtesting datetime 2020-12-01 16:00:00-05:00 +2024-04-13 18:33:25,794: root: INFO: Current backtesting datetime 2020-12-02 09:30:00-05:00 +2024-04-13 18:33:25,794: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:25 +2024-04-13 18:33:25,794: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:25,795: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:25,795: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:25,796: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:25,796: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:27,096: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:27,097: root: INFO: Current backtesting datetime 2020-12-02 16:00:00-05:00 +2024-04-13 18:33:27,097: root: INFO: Current backtesting datetime 2020-12-03 09:30:00-05:00 +2024-04-13 18:33:27,098: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:27 +2024-04-13 18:33:27,098: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:27,099: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:27,099: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:27,099: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:27,100: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:28,359: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:28,360: root: INFO: Current backtesting datetime 2020-12-03 16:00:00-05:00 +2024-04-13 18:33:28,361: root: INFO: Current backtesting datetime 2020-12-04 09:30:00-05:00 +2024-04-13 18:33:28,361: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:28 +2024-04-13 18:33:28,361: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:28,362: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:28,362: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:28,362: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:28,362: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:29,378: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:29,379: root: INFO: Current backtesting datetime 2020-12-04 16:00:00-05:00 +2024-04-13 18:33:29,380: root: INFO: Current backtesting datetime 2020-12-05 09:30:00-05:00 +2024-04-13 18:33:29,380: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:33:29,381: root: INFO: Current backtesting datetime 2020-12-05 09:29:00-05:00 +2024-04-13 18:33:29,383: root: INFO: Current backtesting datetime 2020-12-05 09:29:00-05:00 +2024-04-13 18:33:29,383: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:33:29,384: root: INFO: Current backtesting datetime 2020-12-07 08:30:00-05:00 +2024-04-13 18:33:29,384: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:33:29,385: root: INFO: Current backtesting datetime 2020-12-07 09:30:00-05:00 +2024-04-13 18:33:29,385: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:33:29,386: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:29 +2024-04-13 18:33:29,386: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:29,387: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:29,387: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:29,388: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:29,388: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:30,260: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:30,261: root: INFO: Current backtesting datetime 2020-12-07 16:00:00-05:00 +2024-04-13 18:33:30,261: root: INFO: Current backtesting datetime 2020-12-08 09:30:00-05:00 +2024-04-13 18:33:30,262: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:30 +2024-04-13 18:33:30,262: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:30,263: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:30,263: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:30,263: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:30,263: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:31,350: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:31,352: root: INFO: Current backtesting datetime 2020-12-08 16:00:00-05:00 +2024-04-13 18:33:31,352: root: INFO: Current backtesting datetime 2020-12-09 09:30:00-05:00 +2024-04-13 18:33:31,352: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:31 +2024-04-13 18:33:31,352: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:31,353: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:31,353: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:31,354: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:31,354: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:32,151: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:32,152: root: INFO: Current backtesting datetime 2020-12-09 16:00:00-05:00 +2024-04-13 18:33:32,152: root: INFO: Current backtesting datetime 2020-12-10 09:30:00-05:00 +2024-04-13 18:33:32,152: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:32 +2024-04-13 18:33:32,152: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:32,153: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:32,153: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:32,154: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:32,154: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:33,654: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:33,655: root: INFO: Current backtesting datetime 2020-12-10 16:00:00-05:00 +2024-04-13 18:33:33,655: root: INFO: Current backtesting datetime 2020-12-11 09:30:00-05:00 +2024-04-13 18:33:33,656: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:33 +2024-04-13 18:33:33,657: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:33,657: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:33,658: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:33,658: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:33,658: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:34,868: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:34,869: root: INFO: Current backtesting datetime 2020-12-11 16:00:00-05:00 +2024-04-13 18:33:34,871: root: INFO: Current backtesting datetime 2020-12-12 09:30:00-05:00 +2024-04-13 18:33:34,871: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:33:34,872: root: INFO: Current backtesting datetime 2020-12-12 09:29:00-05:00 +2024-04-13 18:33:34,873: root: INFO: Current backtesting datetime 2020-12-12 09:29:00-05:00 +2024-04-13 18:33:34,873: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:33:34,874: root: INFO: Current backtesting datetime 2020-12-14 08:30:00-05:00 +2024-04-13 18:33:34,874: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:33:34,875: root: INFO: Current backtesting datetime 2020-12-14 09:30:00-05:00 +2024-04-13 18:33:34,875: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:33:34,876: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:34 +2024-04-13 18:33:34,876: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:34,877: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:34,877: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:34,878: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:34,878: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:36,197: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:36,198: root: INFO: Current backtesting datetime 2020-12-14 16:00:00-05:00 +2024-04-13 18:33:36,198: root: INFO: Current backtesting datetime 2020-12-15 09:30:00-05:00 +2024-04-13 18:33:36,199: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:36 +2024-04-13 18:33:36,199: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:36,199: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:36,200: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:36,200: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:36,200: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:36,912: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:36,913: root: INFO: Current backtesting datetime 2020-12-15 16:00:00-05:00 +2024-04-13 18:33:36,914: root: INFO: Current backtesting datetime 2020-12-16 09:30:00-05:00 +2024-04-13 18:33:36,914: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:36 +2024-04-13 18:33:36,914: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:36,915: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:36,915: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:36,916: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:36,916: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:37,692: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:37,693: root: INFO: Current backtesting datetime 2020-12-16 16:00:00-05:00 +2024-04-13 18:33:37,693: root: INFO: Current backtesting datetime 2020-12-17 09:30:00-05:00 +2024-04-13 18:33:37,694: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:37 +2024-04-13 18:33:37,694: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:37,695: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:37,695: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:37,695: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:37,696: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:39,395: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:39,396: root: INFO: Current backtesting datetime 2020-12-17 16:00:00-05:00 +2024-04-13 18:33:39,397: root: INFO: Current backtesting datetime 2020-12-18 09:30:00-05:00 +2024-04-13 18:33:39,397: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:39 +2024-04-13 18:33:39,397: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:39,397: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:39,398: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:39,398: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:39,398: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:40,279: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:40,280: root: INFO: Current backtesting datetime 2020-12-18 16:00:00-05:00 +2024-04-13 18:33:40,280: root: INFO: Current backtesting datetime 2020-12-19 09:30:00-05:00 +2024-04-13 18:33:40,281: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:33:40,282: root: INFO: Current backtesting datetime 2020-12-19 09:29:00-05:00 +2024-04-13 18:33:40,284: root: INFO: Current backtesting datetime 2020-12-19 09:29:00-05:00 +2024-04-13 18:33:40,284: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:33:40,284: root: INFO: Current backtesting datetime 2020-12-21 08:30:00-05:00 +2024-04-13 18:33:40,285: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:33:40,286: root: INFO: Current backtesting datetime 2020-12-21 09:30:00-05:00 +2024-04-13 18:33:40,286: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:33:40,287: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:40 +2024-04-13 18:33:40,287: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:40,288: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:40,288: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:40,288: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:40,288: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:41,228: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:41,229: root: INFO: Current backtesting datetime 2020-12-21 16:00:00-05:00 +2024-04-13 18:33:41,229: root: INFO: Current backtesting datetime 2020-12-22 09:30:00-05:00 +2024-04-13 18:33:41,230: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:41 +2024-04-13 18:33:41,230: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:41,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:41,231: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:41,232: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:41,232: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:43,799: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:43,800: root: INFO: Current backtesting datetime 2020-12-22 16:00:00-05:00 +2024-04-13 18:33:43,801: root: INFO: Current backtesting datetime 2020-12-23 09:30:00-05:00 +2024-04-13 18:33:43,801: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:43 +2024-04-13 18:33:43,801: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:43,802: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:43,802: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:43,803: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:43,803: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:45,848: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:45,849: root: INFO: Current backtesting datetime 2020-12-23 16:00:00-05:00 +2024-04-13 18:33:45,850: root: INFO: Current backtesting datetime 2020-12-24 09:30:00-05:00 +2024-04-13 18:33:45,850: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:45 +2024-04-13 18:33:45,850: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:45,851: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:45,851: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:45,852: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:45,852: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:47,933: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:47,934: root: INFO: Current backtesting datetime 2020-12-24 13:00:00-05:00 +2024-04-13 18:33:47,934: root: INFO: Current backtesting datetime 2020-12-25 09:30:00-05:00 +2024-04-13 18:33:47,935: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:33:47,937: root: INFO: Current backtesting datetime 2020-12-25 09:29:00-05:00 +2024-04-13 18:33:47,937: root: INFO: Current backtesting datetime 2020-12-25 09:29:00-05:00 +2024-04-13 18:33:47,937: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:33:47,938: root: INFO: Current backtesting datetime 2020-12-28 08:30:00-05:00 +2024-04-13 18:33:47,939: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:33:47,940: root: INFO: Current backtesting datetime 2020-12-28 09:30:00-05:00 +2024-04-13 18:33:47,940: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:33:47,941: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:47 +2024-04-13 18:33:47,941: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:47,942: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:47,942: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:47,942: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:47,942: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:50,022: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:50,023: root: INFO: Current backtesting datetime 2020-12-28 16:00:00-05:00 +2024-04-13 18:33:50,024: root: INFO: Current backtesting datetime 2020-12-29 09:30:00-05:00 +2024-04-13 18:33:50,024: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:50 +2024-04-13 18:33:50,024: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:50,024: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:50,025: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:50,025: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:50,025: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:50,941: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:50,942: root: INFO: Current backtesting datetime 2020-12-29 16:00:00-05:00 +2024-04-13 18:33:50,943: root: INFO: Current backtesting datetime 2020-12-30 09:30:00-05:00 +2024-04-13 18:33:50,943: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:50 +2024-04-13 18:33:50,943: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:50,944: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:50,944: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:50,945: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:50,945: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:51,660: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:51,661: root: INFO: Current backtesting datetime 2020-12-30 16:00:00-05:00 +2024-04-13 18:33:51,662: root: INFO: Current backtesting datetime 2020-12-31 09:30:00-05:00 +2024-04-13 18:33:51,662: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:51 +2024-04-13 18:33:51,662: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:51,663: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:51,663: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:51,664: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:51,664: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:52,750: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:52,751: root: INFO: Current backtesting datetime 2020-12-31 16:00:00-05:00 +2024-04-13 18:33:52,751: root: INFO: Current backtesting datetime 2021-01-01 09:30:00-05:00 +2024-04-13 18:33:52,752: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:33:52,753: root: INFO: Current backtesting datetime 2021-01-01 09:29:00-05:00 +2024-04-13 18:33:52,755: root: INFO: Current backtesting datetime 2021-01-01 09:29:00-05:00 +2024-04-13 18:33:52,755: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:33:52,756: root: INFO: Current backtesting datetime 2021-01-04 08:30:00-05:00 +2024-04-13 18:33:52,756: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:33:52,757: root: INFO: Current backtesting datetime 2021-01-04 09:30:00-05:00 +2024-04-13 18:33:52,757: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:33:52,758: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:52 +2024-04-13 18:33:52,758: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:52,759: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:52,759: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:52,760: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:52,760: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:54,538: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:54,539: root: INFO: Current backtesting datetime 2021-01-04 16:00:00-05:00 +2024-04-13 18:33:54,540: root: INFO: Current backtesting datetime 2021-01-05 09:30:00-05:00 +2024-04-13 18:33:54,540: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:54 +2024-04-13 18:33:54,540: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:54,541: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:54,541: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:54,542: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:54,542: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:56,482: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:56,483: root: INFO: Current backtesting datetime 2021-01-05 16:00:00-05:00 +2024-04-13 18:33:56,483: root: INFO: Current backtesting datetime 2021-01-06 09:30:00-05:00 +2024-04-13 18:33:56,483: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:56 +2024-04-13 18:33:56,483: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:56,484: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:56,484: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:56,485: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:56,485: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:58,144: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:58,145: root: INFO: Current backtesting datetime 2021-01-06 16:00:00-05:00 +2024-04-13 18:33:58,146: root: INFO: Current backtesting datetime 2021-01-07 09:30:00-05:00 +2024-04-13 18:33:58,146: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:58 +2024-04-13 18:33:58,146: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:58,147: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:58,147: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:58,148: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:58,148: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:33:59,380: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:33:59,381: root: INFO: Current backtesting datetime 2021-01-07 16:00:00-05:00 +2024-04-13 18:33:59,381: root: INFO: Current backtesting datetime 2021-01-08 09:30:00-05:00 +2024-04-13 18:33:59,382: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:33:59 +2024-04-13 18:33:59,382: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:59,382: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:33:59,383: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:33:59,383: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:33:59,383: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:02,074: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:02,075: root: INFO: Current backtesting datetime 2021-01-08 16:00:00-05:00 +2024-04-13 18:34:02,075: root: INFO: Current backtesting datetime 2021-01-09 09:30:00-05:00 +2024-04-13 18:34:02,076: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:34:02,077: root: INFO: Current backtesting datetime 2021-01-09 09:29:00-05:00 +2024-04-13 18:34:02,078: root: INFO: Current backtesting datetime 2021-01-09 09:29:00-05:00 +2024-04-13 18:34:02,078: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:34:02,079: root: INFO: Current backtesting datetime 2021-01-11 08:30:00-05:00 +2024-04-13 18:34:02,079: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:34:02,080: root: INFO: Current backtesting datetime 2021-01-11 09:30:00-05:00 +2024-04-13 18:34:02,080: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:34:02,081: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:02 +2024-04-13 18:34:02,081: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:02,082: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:02,082: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:02,083: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:02,083: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:04,649: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:04,650: root: INFO: Current backtesting datetime 2021-01-11 16:00:00-05:00 +2024-04-13 18:34:04,650: root: INFO: Current backtesting datetime 2021-01-12 09:30:00-05:00 +2024-04-13 18:34:04,651: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:04 +2024-04-13 18:34:04,651: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:04,652: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:04,652: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:04,652: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:04,652: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:05,928: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:05,929: root: INFO: Current backtesting datetime 2021-01-12 16:00:00-05:00 +2024-04-13 18:34:05,930: root: INFO: Current backtesting datetime 2021-01-13 09:30:00-05:00 +2024-04-13 18:34:05,930: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:05 +2024-04-13 18:34:05,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:05,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:05,931: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:05,932: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:05,932: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:07,104: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:07,106: root: INFO: Current backtesting datetime 2021-01-13 16:00:00-05:00 +2024-04-13 18:34:07,106: root: INFO: Current backtesting datetime 2021-01-14 09:30:00-05:00 +2024-04-13 18:34:07,106: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:07 +2024-04-13 18:34:07,106: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:07,107: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:07,107: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:07,108: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:07,108: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:09,574: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:09,575: root: INFO: Current backtesting datetime 2021-01-14 16:00:00-05:00 +2024-04-13 18:34:09,576: root: INFO: Current backtesting datetime 2021-01-15 09:30:00-05:00 +2024-04-13 18:34:09,576: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:09 +2024-04-13 18:34:09,576: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:09,577: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:09,577: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:09,578: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:09,578: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:11,325: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:11,326: root: INFO: Current backtesting datetime 2021-01-15 16:00:00-05:00 +2024-04-13 18:34:11,326: root: INFO: Current backtesting datetime 2021-01-16 09:30:00-05:00 +2024-04-13 18:34:11,327: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:34:11,328: root: INFO: Current backtesting datetime 2021-01-16 09:29:00-05:00 +2024-04-13 18:34:11,330: root: INFO: Current backtesting datetime 2021-01-16 09:29:00-05:00 +2024-04-13 18:34:11,330: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:34:11,331: root: INFO: Current backtesting datetime 2021-01-19 08:30:00-05:00 +2024-04-13 18:34:11,331: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:34:11,332: root: INFO: Current backtesting datetime 2021-01-19 09:30:00-05:00 +2024-04-13 18:34:11,332: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:34:11,333: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:11 +2024-04-13 18:34:11,333: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:11,334: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:11,334: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:11,335: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:11,335: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:12,843: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:12,844: root: INFO: Current backtesting datetime 2021-01-19 16:00:00-05:00 +2024-04-13 18:34:12,844: root: INFO: Current backtesting datetime 2021-01-20 09:30:00-05:00 +2024-04-13 18:34:12,844: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:12 +2024-04-13 18:34:12,844: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:12,845: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:12,845: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:12,846: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:12,846: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:14,957: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:14,958: root: INFO: Current backtesting datetime 2021-01-20 16:00:00-05:00 +2024-04-13 18:34:14,959: root: INFO: Current backtesting datetime 2021-01-21 09:30:00-05:00 +2024-04-13 18:34:14,959: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:14 +2024-04-13 18:34:14,959: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:14,960: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:14,960: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:14,961: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:14,961: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:16,684: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:16,685: root: INFO: Current backtesting datetime 2021-01-21 16:00:00-05:00 +2024-04-13 18:34:16,685: root: INFO: Current backtesting datetime 2021-01-22 09:30:00-05:00 +2024-04-13 18:34:16,686: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:16 +2024-04-13 18:34:16,686: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:16,687: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:16,687: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:16,687: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:16,687: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:18,534: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:18,535: root: INFO: Current backtesting datetime 2021-01-22 16:00:00-05:00 +2024-04-13 18:34:18,535: root: INFO: Current backtesting datetime 2021-01-23 09:30:00-05:00 +2024-04-13 18:34:18,535: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:34:18,537: root: INFO: Current backtesting datetime 2021-01-23 09:29:00-05:00 +2024-04-13 18:34:18,538: root: INFO: Current backtesting datetime 2021-01-23 09:29:00-05:00 +2024-04-13 18:34:18,538: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:34:18,539: root: INFO: Current backtesting datetime 2021-01-25 08:30:00-05:00 +2024-04-13 18:34:18,539: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:34:18,540: root: INFO: Current backtesting datetime 2021-01-25 09:30:00-05:00 +2024-04-13 18:34:18,540: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:34:18,541: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:18 +2024-04-13 18:34:18,541: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:18,542: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:18,542: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:18,543: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:18,543: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:20,259: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:20,260: root: INFO: Current backtesting datetime 2021-01-25 16:00:00-05:00 +2024-04-13 18:34:20,260: root: INFO: Current backtesting datetime 2021-01-26 09:30:00-05:00 +2024-04-13 18:34:20,260: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:20 +2024-04-13 18:34:20,260: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:20,262: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:20,262: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:20,263: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:20,263: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:21,346: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:21,347: root: INFO: Current backtesting datetime 2021-01-26 16:00:00-05:00 +2024-04-13 18:34:21,348: root: INFO: Current backtesting datetime 2021-01-27 09:30:00-05:00 +2024-04-13 18:34:21,348: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:21 +2024-04-13 18:34:21,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:21,349: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:21,349: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:21,350: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:21,350: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:22,542: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:22,543: root: INFO: Current backtesting datetime 2021-01-27 16:00:00-05:00 +2024-04-13 18:34:22,543: root: INFO: Current backtesting datetime 2021-01-28 09:30:00-05:00 +2024-04-13 18:34:22,544: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:22 +2024-04-13 18:34:22,544: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:22,545: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:22,545: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:22,545: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:22,545: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:24,206: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:24,207: root: INFO: Current backtesting datetime 2021-01-28 16:00:00-05:00 +2024-04-13 18:34:24,207: root: INFO: Current backtesting datetime 2021-01-29 09:30:00-05:00 +2024-04-13 18:34:24,208: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:24 +2024-04-13 18:34:24,208: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:24,208: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:24,209: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:24,209: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:24,209: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:26,144: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:26,145: root: INFO: Current backtesting datetime 2021-01-29 16:00:00-05:00 +2024-04-13 18:34:26,145: root: INFO: Current backtesting datetime 2021-01-30 09:30:00-05:00 +2024-04-13 18:34:26,146: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:34:26,147: root: INFO: Current backtesting datetime 2021-01-30 09:29:00-05:00 +2024-04-13 18:34:26,148: root: INFO: Current backtesting datetime 2021-01-30 09:29:00-05:00 +2024-04-13 18:34:26,149: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:34:26,149: root: INFO: Current backtesting datetime 2021-02-01 08:30:00-05:00 +2024-04-13 18:34:26,150: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:34:26,151: root: INFO: Current backtesting datetime 2021-02-01 09:30:00-05:00 +2024-04-13 18:34:26,151: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:34:26,152: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:26 +2024-04-13 18:34:26,152: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:26,153: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:26,153: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:26,153: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:26,153: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:29,416: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:29,417: root: INFO: Current backtesting datetime 2021-02-01 16:00:00-05:00 +2024-04-13 18:34:29,418: root: INFO: Current backtesting datetime 2021-02-02 09:30:00-05:00 +2024-04-13 18:34:29,418: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:29 +2024-04-13 18:34:29,418: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:29,419: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:29,419: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:29,420: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:29,420: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:30,268: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:30,269: root: INFO: Current backtesting datetime 2021-02-02 16:00:00-05:00 +2024-04-13 18:34:30,269: root: INFO: Current backtesting datetime 2021-02-03 09:30:00-05:00 +2024-04-13 18:34:30,270: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:30 +2024-04-13 18:34:30,270: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:30,270: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:30,271: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:30,271: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:30,271: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:31,788: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:31,789: root: INFO: Current backtesting datetime 2021-02-03 16:00:00-05:00 +2024-04-13 18:34:31,789: root: INFO: Current backtesting datetime 2021-02-04 09:30:00-05:00 +2024-04-13 18:34:31,789: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:31 +2024-04-13 18:34:31,789: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:31,790: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:31,790: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:31,791: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:31,791: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:32,571: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:32,572: root: INFO: Current backtesting datetime 2021-02-04 16:00:00-05:00 +2024-04-13 18:34:32,573: root: INFO: Current backtesting datetime 2021-02-05 09:30:00-05:00 +2024-04-13 18:34:32,573: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:32 +2024-04-13 18:34:32,573: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:32,574: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:32,574: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:32,575: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:32,575: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:33,800: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:33,801: root: INFO: Current backtesting datetime 2021-02-05 16:00:00-05:00 +2024-04-13 18:34:33,801: root: INFO: Current backtesting datetime 2021-02-06 09:30:00-05:00 +2024-04-13 18:34:33,801: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:34:33,803: root: INFO: Current backtesting datetime 2021-02-06 09:29:00-05:00 +2024-04-13 18:34:33,804: root: INFO: Current backtesting datetime 2021-02-06 09:29:00-05:00 +2024-04-13 18:34:33,804: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:34:33,805: root: INFO: Current backtesting datetime 2021-02-08 08:30:00-05:00 +2024-04-13 18:34:33,805: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:34:33,806: root: INFO: Current backtesting datetime 2021-02-08 09:30:00-05:00 +2024-04-13 18:34:33,807: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:34:33,808: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:33 +2024-04-13 18:34:33,808: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:33,808: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:33,809: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:33,809: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:33,809: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:35,491: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:35,492: root: INFO: Current backtesting datetime 2021-02-08 16:00:00-05:00 +2024-04-13 18:34:35,492: root: INFO: Current backtesting datetime 2021-02-09 09:30:00-05:00 +2024-04-13 18:34:35,492: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:35 +2024-04-13 18:34:35,493: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:35,493: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:35,494: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:35,494: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:35,494: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:37,184: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:37,185: root: INFO: Current backtesting datetime 2021-02-09 16:00:00-05:00 +2024-04-13 18:34:37,186: root: INFO: Current backtesting datetime 2021-02-10 09:30:00-05:00 +2024-04-13 18:34:37,186: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:37 +2024-04-13 18:34:37,186: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:37,187: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:37,187: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:37,188: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:37,188: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:38,745: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:38,746: root: INFO: Current backtesting datetime 2021-02-10 16:00:00-05:00 +2024-04-13 18:34:38,746: root: INFO: Current backtesting datetime 2021-02-11 09:30:00-05:00 +2024-04-13 18:34:38,747: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:38 +2024-04-13 18:34:38,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:38,748: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:38,748: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:38,748: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:38,748: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:39,803: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:39,804: root: INFO: Current backtesting datetime 2021-02-11 16:00:00-05:00 +2024-04-13 18:34:39,804: root: INFO: Current backtesting datetime 2021-02-12 09:30:00-05:00 +2024-04-13 18:34:39,804: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:39 +2024-04-13 18:34:39,805: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:39,805: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:39,806: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:39,806: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:39,806: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:41,715: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:41,716: root: INFO: Current backtesting datetime 2021-02-12 16:00:00-05:00 +2024-04-13 18:34:41,716: root: INFO: Current backtesting datetime 2021-02-13 09:30:00-05:00 +2024-04-13 18:34:41,717: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:34:41,719: root: INFO: Current backtesting datetime 2021-02-13 09:29:00-05:00 +2024-04-13 18:34:41,720: root: INFO: Current backtesting datetime 2021-02-13 09:29:00-05:00 +2024-04-13 18:34:41,720: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:34:41,720: root: INFO: Current backtesting datetime 2021-02-16 08:30:00-05:00 +2024-04-13 18:34:41,721: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:34:41,722: root: INFO: Current backtesting datetime 2021-02-16 09:30:00-05:00 +2024-04-13 18:34:41,722: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:34:41,723: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:41 +2024-04-13 18:34:41,723: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:41,724: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:41,724: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:41,724: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:41,724: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:42,957: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:42,958: root: INFO: Current backtesting datetime 2021-02-16 16:00:00-05:00 +2024-04-13 18:34:42,958: root: INFO: Current backtesting datetime 2021-02-17 09:30:00-05:00 +2024-04-13 18:34:42,959: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:42 +2024-04-13 18:34:42,959: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:42,960: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:42,960: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:42,960: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:42,960: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:45,131: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:45,132: root: INFO: Current backtesting datetime 2021-02-17 16:00:00-05:00 +2024-04-13 18:34:45,133: root: INFO: Current backtesting datetime 2021-02-18 09:30:00-05:00 +2024-04-13 18:34:45,133: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:45 +2024-04-13 18:34:45,133: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:45,134: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:45,134: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:45,135: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:45,135: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:46,317: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:46,318: root: INFO: Current backtesting datetime 2021-02-18 16:00:00-05:00 +2024-04-13 18:34:46,318: root: INFO: Current backtesting datetime 2021-02-19 09:30:00-05:00 +2024-04-13 18:34:46,319: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:46 +2024-04-13 18:34:46,319: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:46,320: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:46,320: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:46,320: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:46,321: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:47,787: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:47,788: root: INFO: Current backtesting datetime 2021-02-19 16:00:00-05:00 +2024-04-13 18:34:47,789: root: INFO: Current backtesting datetime 2021-02-20 09:30:00-05:00 +2024-04-13 18:34:47,789: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:34:47,790: root: INFO: Current backtesting datetime 2021-02-20 09:29:00-05:00 +2024-04-13 18:34:47,792: root: INFO: Current backtesting datetime 2021-02-20 09:29:00-05:00 +2024-04-13 18:34:47,792: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:34:47,793: root: INFO: Current backtesting datetime 2021-02-22 08:30:00-05:00 +2024-04-13 18:34:47,793: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:34:47,794: root: INFO: Current backtesting datetime 2021-02-22 09:30:00-05:00 +2024-04-13 18:34:47,794: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:34:47,795: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:47 +2024-04-13 18:34:47,795: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:47,796: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:47,796: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:47,796: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:47,796: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:48,918: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:48,919: root: INFO: Current backtesting datetime 2021-02-22 16:00:00-05:00 +2024-04-13 18:34:48,919: root: INFO: Current backtesting datetime 2021-02-23 09:30:00-05:00 +2024-04-13 18:34:48,920: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:48 +2024-04-13 18:34:48,920: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:48,921: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:48,921: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:48,921: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:48,921: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:50,002: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:50,003: root: INFO: Current backtesting datetime 2021-02-23 16:00:00-05:00 +2024-04-13 18:34:50,003: root: INFO: Current backtesting datetime 2021-02-24 09:30:00-05:00 +2024-04-13 18:34:50,004: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:50 +2024-04-13 18:34:50,004: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:50,005: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:50,005: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:50,005: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:50,006: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:51,275: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:51,276: root: INFO: Current backtesting datetime 2021-02-24 16:00:00-05:00 +2024-04-13 18:34:51,277: root: INFO: Current backtesting datetime 2021-02-25 09:30:00-05:00 +2024-04-13 18:34:51,277: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:51 +2024-04-13 18:34:51,277: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:51,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:51,278: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:51,279: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:51,279: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:52,244: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:52,245: root: INFO: Current backtesting datetime 2021-02-25 16:00:00-05:00 +2024-04-13 18:34:52,245: root: INFO: Current backtesting datetime 2021-02-26 09:30:00-05:00 +2024-04-13 18:34:52,245: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:52 +2024-04-13 18:34:52,245: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:52,246: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:52,246: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:52,247: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:52,247: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:53,691: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:53,692: root: INFO: Current backtesting datetime 2021-02-26 16:00:00-05:00 +2024-04-13 18:34:53,693: root: INFO: Current backtesting datetime 2021-02-27 09:30:00-05:00 +2024-04-13 18:34:53,693: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:34:53,694: root: INFO: Current backtesting datetime 2021-02-27 09:29:00-05:00 +2024-04-13 18:34:53,696: root: INFO: Current backtesting datetime 2021-02-27 09:29:00-05:00 +2024-04-13 18:34:53,696: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:34:53,697: root: INFO: Current backtesting datetime 2021-03-01 08:30:00-05:00 +2024-04-13 18:34:53,698: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:34:53,699: root: INFO: Current backtesting datetime 2021-03-01 09:30:00-05:00 +2024-04-13 18:34:53,699: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:34:53,700: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:53 +2024-04-13 18:34:53,700: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:53,701: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:53,701: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:53,701: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:53,701: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:55,936: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:55,937: root: INFO: Current backtesting datetime 2021-03-01 16:00:00-05:00 +2024-04-13 18:34:55,937: root: INFO: Current backtesting datetime 2021-03-02 09:30:00-05:00 +2024-04-13 18:34:55,938: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:55 +2024-04-13 18:34:55,938: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:55,939: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:55,939: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:55,939: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:55,940: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:57,127: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:57,128: root: INFO: Current backtesting datetime 2021-03-02 16:00:00-05:00 +2024-04-13 18:34:57,128: root: INFO: Current backtesting datetime 2021-03-03 09:30:00-05:00 +2024-04-13 18:34:57,129: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:57 +2024-04-13 18:34:57,129: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:57,130: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:57,130: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:57,130: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:57,130: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:58,244: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:58,245: root: INFO: Current backtesting datetime 2021-03-03 16:00:00-05:00 +2024-04-13 18:34:58,246: root: INFO: Current backtesting datetime 2021-03-04 09:30:00-05:00 +2024-04-13 18:34:58,246: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:58 +2024-04-13 18:34:58,246: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:58,247: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:58,247: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:58,248: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:58,248: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:34:59,143: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:34:59,144: root: INFO: Current backtesting datetime 2021-03-04 16:00:00-05:00 +2024-04-13 18:34:59,145: root: INFO: Current backtesting datetime 2021-03-05 09:30:00-05:00 +2024-04-13 18:34:59,145: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:34:59 +2024-04-13 18:34:59,145: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:59,146: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:34:59,146: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:34:59,147: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:34:59,147: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:00,270: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:00,272: root: INFO: Current backtesting datetime 2021-03-05 16:00:00-05:00 +2024-04-13 18:35:00,272: root: INFO: Current backtesting datetime 2021-03-06 09:30:00-05:00 +2024-04-13 18:35:00,272: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:35:00,274: root: INFO: Current backtesting datetime 2021-03-06 09:29:00-05:00 +2024-04-13 18:35:00,275: root: INFO: Current backtesting datetime 2021-03-06 09:29:00-05:00 +2024-04-13 18:35:00,275: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:35:00,276: root: INFO: Current backtesting datetime 2021-03-08 08:30:00-05:00 +2024-04-13 18:35:00,276: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:35:00,277: root: INFO: Current backtesting datetime 2021-03-08 09:30:00-05:00 +2024-04-13 18:35:00,277: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:35:00,278: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:00 +2024-04-13 18:35:00,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:00,279: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:00,279: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:00,280: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:00,280: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:01,433: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:01,434: root: INFO: Current backtesting datetime 2021-03-08 16:00:00-05:00 +2024-04-13 18:35:01,435: root: INFO: Current backtesting datetime 2021-03-09 09:30:00-05:00 +2024-04-13 18:35:01,435: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:01 +2024-04-13 18:35:01,435: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:01,436: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:01,436: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:01,437: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:01,437: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:02,593: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:02,594: root: INFO: Current backtesting datetime 2021-03-09 16:00:00-05:00 +2024-04-13 18:35:02,595: root: INFO: Current backtesting datetime 2021-03-10 09:30:00-05:00 +2024-04-13 18:35:02,595: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:02 +2024-04-13 18:35:02,595: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:02,596: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:02,596: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:02,597: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:02,597: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:06,394: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:06,395: root: INFO: Current backtesting datetime 2021-03-10 16:00:00-05:00 +2024-04-13 18:35:06,395: root: INFO: Current backtesting datetime 2021-03-11 09:30:00-05:00 +2024-04-13 18:35:06,396: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:06 +2024-04-13 18:35:06,396: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:06,397: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:06,397: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:06,398: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:06,398: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:09,764: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:09,765: root: INFO: Current backtesting datetime 2021-03-11 16:00:00-05:00 +2024-04-13 18:35:09,766: root: INFO: Current backtesting datetime 2021-03-12 09:30:00-05:00 +2024-04-13 18:35:09,766: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:09 +2024-04-13 18:35:09,766: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:09,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:09,767: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:09,768: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:09,768: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:12,020: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:12,021: root: INFO: Current backtesting datetime 2021-03-12 16:00:00-05:00 +2024-04-13 18:35:12,021: root: INFO: Current backtesting datetime 2021-03-13 09:30:00-05:00 +2024-04-13 18:35:12,022: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:35:12,023: root: INFO: Current backtesting datetime 2021-03-13 09:29:00-05:00 +2024-04-13 18:35:12,024: root: INFO: Current backtesting datetime 2021-03-13 09:29:00-05:00 +2024-04-13 18:35:12,024: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:35:12,025: root: INFO: Current backtesting datetime 2021-03-15 07:30:00-05:00 +2024-04-13 18:35:12,026: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:35:12,027: root: INFO: Current backtesting datetime 2021-03-15 08:30:00-05:00 +2024-04-13 18:35:12,027: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:35:12,028: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:12 +2024-04-13 18:35:12,028: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:12,029: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:12,029: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:12,029: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:12,029: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:13,675: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:13,676: root: INFO: Current backtesting datetime 2021-03-15 15:00:00-05:00 +2024-04-13 18:35:13,676: root: INFO: Current backtesting datetime 2021-03-16 08:30:00-05:00 +2024-04-13 18:35:13,676: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:13 +2024-04-13 18:35:13,676: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:13,676: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:13,678: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:13,678: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:13,678: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:16,612: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:16,613: root: INFO: Current backtesting datetime 2021-03-16 15:00:00-05:00 +2024-04-13 18:35:16,614: root: INFO: Current backtesting datetime 2021-03-17 08:30:00-05:00 +2024-04-13 18:35:16,614: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:16 +2024-04-13 18:35:16,614: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:16,615: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:16,615: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:16,616: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:16,616: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:18,993: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:18,994: root: INFO: Current backtesting datetime 2021-03-17 15:00:00-05:00 +2024-04-13 18:35:18,995: root: INFO: Current backtesting datetime 2021-03-18 08:30:00-05:00 +2024-04-13 18:35:18,995: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:18 +2024-04-13 18:35:18,995: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:18,996: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:18,996: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:18,997: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:18,997: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:23,321: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:23,322: root: INFO: Current backtesting datetime 2021-03-18 15:00:00-05:00 +2024-04-13 18:35:23,323: root: INFO: Current backtesting datetime 2021-03-19 08:30:00-05:00 +2024-04-13 18:35:23,323: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:23 +2024-04-13 18:35:23,323: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:23,324: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:23,324: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:23,325: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:23,325: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:25,980: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:25,981: root: INFO: Current backtesting datetime 2021-03-19 15:00:00-05:00 +2024-04-13 18:35:25,981: root: INFO: Current backtesting datetime 2021-03-20 08:30:00-05:00 +2024-04-13 18:35:25,982: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:35:25,983: root: INFO: Current backtesting datetime 2021-03-20 08:29:00-05:00 +2024-04-13 18:35:25,985: root: INFO: Current backtesting datetime 2021-03-20 08:29:00-05:00 +2024-04-13 18:35:25,985: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:35:25,986: root: INFO: Current backtesting datetime 2021-03-22 07:30:00-05:00 +2024-04-13 18:35:25,986: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:35:25,987: root: INFO: Current backtesting datetime 2021-03-22 08:30:00-05:00 +2024-04-13 18:35:25,987: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:35:25,988: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:25 +2024-04-13 18:35:25,988: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:25,989: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:25,989: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:25,990: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:25,990: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:27,626: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:27,627: root: INFO: Current backtesting datetime 2021-03-22 15:00:00-05:00 +2024-04-13 18:35:27,627: root: INFO: Current backtesting datetime 2021-03-23 08:30:00-05:00 +2024-04-13 18:35:27,628: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:27 +2024-04-13 18:35:27,628: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:27,629: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:27,629: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:27,629: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:27,629: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:29,270: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:29,271: root: INFO: Current backtesting datetime 2021-03-23 15:00:00-05:00 +2024-04-13 18:35:29,272: root: INFO: Current backtesting datetime 2021-03-24 08:30:00-05:00 +2024-04-13 18:35:29,272: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:29 +2024-04-13 18:35:29,272: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:29,273: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:29,274: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:29,274: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:29,274: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:30,948: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:30,949: root: INFO: Current backtesting datetime 2021-03-24 15:00:00-05:00 +2024-04-13 18:35:30,950: root: INFO: Current backtesting datetime 2021-03-25 08:30:00-05:00 +2024-04-13 18:35:30,950: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:30 +2024-04-13 18:35:30,950: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:30,951: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:30,951: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:30,952: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:30,952: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:32,409: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:32,410: root: INFO: Current backtesting datetime 2021-03-25 15:00:00-05:00 +2024-04-13 18:35:32,410: root: INFO: Current backtesting datetime 2021-03-26 08:30:00-05:00 +2024-04-13 18:35:32,411: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:32 +2024-04-13 18:35:32,411: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:32,412: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:32,412: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:32,413: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:32,413: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:33,734: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:33,735: root: INFO: Current backtesting datetime 2021-03-26 15:00:00-05:00 +2024-04-13 18:35:33,735: root: INFO: Current backtesting datetime 2021-03-27 08:30:00-05:00 +2024-04-13 18:35:33,736: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:35:33,737: root: INFO: Current backtesting datetime 2021-03-27 08:29:00-05:00 +2024-04-13 18:35:33,738: root: INFO: Current backtesting datetime 2021-03-27 08:29:00-05:00 +2024-04-13 18:35:33,738: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:35:33,739: root: INFO: Current backtesting datetime 2021-03-29 07:30:00-05:00 +2024-04-13 18:35:33,740: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:35:33,741: root: INFO: Current backtesting datetime 2021-03-29 08:30:00-05:00 +2024-04-13 18:35:33,741: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:35:33,742: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:33 +2024-04-13 18:35:33,742: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:33,743: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:33,743: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:33,743: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:33,743: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:35,650: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:35,651: root: INFO: Current backtesting datetime 2021-03-29 15:00:00-05:00 +2024-04-13 18:35:35,651: root: INFO: Current backtesting datetime 2021-03-30 08:30:00-05:00 +2024-04-13 18:35:35,652: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:35 +2024-04-13 18:35:35,652: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:35,653: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:35,653: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:35,653: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:35,653: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:36,627: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:36,628: root: INFO: Current backtesting datetime 2021-03-30 15:00:00-05:00 +2024-04-13 18:35:36,629: root: INFO: Current backtesting datetime 2021-03-31 08:30:00-05:00 +2024-04-13 18:35:36,629: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:36 +2024-04-13 18:35:36,629: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:36,630: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:36,630: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:36,631: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:36,631: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:37,523: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:37,524: root: INFO: Current backtesting datetime 2021-03-31 15:00:00-05:00 +2024-04-13 18:35:37,525: root: INFO: Current backtesting datetime 2021-04-01 08:30:00-05:00 +2024-04-13 18:35:37,525: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:37 +2024-04-13 18:35:37,525: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:37,526: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:37,526: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:37,527: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:37,527: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:38,247: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:38,248: root: INFO: Current backtesting datetime 2021-04-01 15:00:00-05:00 +2024-04-13 18:35:38,248: root: INFO: Current backtesting datetime 2021-04-02 08:30:00-05:00 +2024-04-13 18:35:38,248: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:35:38,250: root: INFO: Current backtesting datetime 2021-04-02 08:29:00-05:00 +2024-04-13 18:35:38,251: root: INFO: Current backtesting datetime 2021-04-02 08:29:00-05:00 +2024-04-13 18:35:38,251: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:35:38,252: root: INFO: Current backtesting datetime 2021-04-05 07:30:00-05:00 +2024-04-13 18:35:38,253: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:35:38,253: root: INFO: Current backtesting datetime 2021-04-05 08:30:00-05:00 +2024-04-13 18:35:38,254: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:35:38,255: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:38 +2024-04-13 18:35:38,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:38,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:38,256: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:38,256: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:38,256: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:39,771: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:39,771: root: INFO: Current backtesting datetime 2021-04-05 15:00:00-05:00 +2024-04-13 18:35:39,772: root: INFO: Current backtesting datetime 2021-04-06 08:30:00-05:00 +2024-04-13 18:35:39,772: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:39 +2024-04-13 18:35:39,772: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:39,773: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:39,773: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:39,774: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:39,774: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:43,345: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:43,345: root: INFO: Current backtesting datetime 2021-04-06 15:00:00-05:00 +2024-04-13 18:35:43,346: root: INFO: Current backtesting datetime 2021-04-07 08:30:00-05:00 +2024-04-13 18:35:43,346: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:43 +2024-04-13 18:35:43,346: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:43,347: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:43,347: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:43,348: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:43,348: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:44,936: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:44,937: root: INFO: Current backtesting datetime 2021-04-07 15:00:00-05:00 +2024-04-13 18:35:44,937: root: INFO: Current backtesting datetime 2021-04-08 08:30:00-05:00 +2024-04-13 18:35:44,938: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:44 +2024-04-13 18:35:44,938: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:44,939: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:44,939: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:44,939: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:44,939: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:47,179: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:47,180: root: INFO: Current backtesting datetime 2021-04-08 15:00:00-05:00 +2024-04-13 18:35:47,181: root: INFO: Current backtesting datetime 2021-04-09 08:30:00-05:00 +2024-04-13 18:35:47,181: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:47 +2024-04-13 18:35:47,181: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:47,182: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:47,182: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:47,183: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:47,183: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:48,812: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:48,813: root: INFO: Current backtesting datetime 2021-04-09 15:00:00-05:00 +2024-04-13 18:35:48,813: root: INFO: Current backtesting datetime 2021-04-10 08:30:00-05:00 +2024-04-13 18:35:48,814: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:35:48,815: root: INFO: Current backtesting datetime 2021-04-10 08:29:00-05:00 +2024-04-13 18:35:48,817: root: INFO: Current backtesting datetime 2021-04-10 08:29:00-05:00 +2024-04-13 18:35:48,817: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:35:48,817: root: INFO: Current backtesting datetime 2021-04-12 07:30:00-05:00 +2024-04-13 18:35:48,818: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:35:48,819: root: INFO: Current backtesting datetime 2021-04-12 08:30:00-05:00 +2024-04-13 18:35:48,819: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:35:48,820: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:48 +2024-04-13 18:35:48,820: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:48,821: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:48,821: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:48,821: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:48,822: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:51,162: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:51,163: root: INFO: Current backtesting datetime 2021-04-12 15:00:00-05:00 +2024-04-13 18:35:51,163: root: INFO: Current backtesting datetime 2021-04-13 08:30:00-05:00 +2024-04-13 18:35:51,164: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:51 +2024-04-13 18:35:51,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:51,165: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:51,165: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:51,166: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:51,166: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:52,012: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:52,013: root: INFO: Current backtesting datetime 2021-04-13 15:00:00-05:00 +2024-04-13 18:35:52,014: root: INFO: Current backtesting datetime 2021-04-14 08:30:00-05:00 +2024-04-13 18:35:52,014: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:52 +2024-04-13 18:35:52,014: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:52,015: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:52,015: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:52,016: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:52,016: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:52,797: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:52,798: root: INFO: Current backtesting datetime 2021-04-14 15:00:00-05:00 +2024-04-13 18:35:52,798: root: INFO: Current backtesting datetime 2021-04-15 08:30:00-05:00 +2024-04-13 18:35:52,799: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:52 +2024-04-13 18:35:52,799: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:52,800: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:52,800: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:52,801: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:52,801: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:53,694: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:53,695: root: INFO: Current backtesting datetime 2021-04-15 15:00:00-05:00 +2024-04-13 18:35:53,696: root: INFO: Current backtesting datetime 2021-04-16 08:30:00-05:00 +2024-04-13 18:35:53,696: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:53 +2024-04-13 18:35:53,696: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:53,697: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:53,697: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:53,698: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:53,698: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:54,788: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:54,789: root: INFO: Current backtesting datetime 2021-04-16 15:00:00-05:00 +2024-04-13 18:35:54,789: root: INFO: Current backtesting datetime 2021-04-17 08:30:00-05:00 +2024-04-13 18:35:54,790: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:35:54,792: root: INFO: Current backtesting datetime 2021-04-17 08:29:00-05:00 +2024-04-13 18:35:54,793: root: INFO: Current backtesting datetime 2021-04-17 08:29:00-05:00 +2024-04-13 18:35:54,793: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:35:54,794: root: INFO: Current backtesting datetime 2021-04-19 07:30:00-05:00 +2024-04-13 18:35:54,795: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:35:54,795: root: INFO: Current backtesting datetime 2021-04-19 08:30:00-05:00 +2024-04-13 18:35:54,795: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:35:54,797: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:54 +2024-04-13 18:35:54,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:54,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:54,798: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:54,798: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:54,798: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:55,530: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:55,531: root: INFO: Current backtesting datetime 2021-04-19 15:00:00-05:00 +2024-04-13 18:35:55,533: root: INFO: Current backtesting datetime 2021-04-20 08:30:00-05:00 +2024-04-13 18:35:55,533: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:55 +2024-04-13 18:35:55,533: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:55,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:55,534: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:55,535: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:55,535: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:56,006: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:56,007: root: INFO: Current backtesting datetime 2021-04-20 15:00:00-05:00 +2024-04-13 18:35:56,008: root: INFO: Current backtesting datetime 2021-04-21 08:30:00-05:00 +2024-04-13 18:35:56,008: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:56 +2024-04-13 18:35:56,008: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:56,009: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:56,009: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:56,010: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:56,010: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:57,338: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:57,339: root: INFO: Current backtesting datetime 2021-04-21 15:00:00-05:00 +2024-04-13 18:35:57,341: root: INFO: Current backtesting datetime 2021-04-22 08:30:00-05:00 +2024-04-13 18:35:57,341: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:57 +2024-04-13 18:35:57,341: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:57,342: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:57,342: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:57,343: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:57,343: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:58,767: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:58,768: root: INFO: Current backtesting datetime 2021-04-22 15:00:00-05:00 +2024-04-13 18:35:58,768: root: INFO: Current backtesting datetime 2021-04-23 08:30:00-05:00 +2024-04-13 18:35:58,769: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:58 +2024-04-13 18:35:58,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:58,770: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:58,770: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:58,770: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:58,770: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:35:59,688: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:35:59,689: root: INFO: Current backtesting datetime 2021-04-23 15:00:00-05:00 +2024-04-13 18:35:59,689: root: INFO: Current backtesting datetime 2021-04-24 08:30:00-05:00 +2024-04-13 18:35:59,690: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:35:59,691: root: INFO: Current backtesting datetime 2021-04-24 08:29:00-05:00 +2024-04-13 18:35:59,693: root: INFO: Current backtesting datetime 2021-04-24 08:29:00-05:00 +2024-04-13 18:35:59,693: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:35:59,693: root: INFO: Current backtesting datetime 2021-04-26 07:30:00-05:00 +2024-04-13 18:35:59,694: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:35:59,695: root: INFO: Current backtesting datetime 2021-04-26 08:30:00-05:00 +2024-04-13 18:35:59,695: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:35:59,696: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:35:59 +2024-04-13 18:35:59,696: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:59,697: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:35:59,697: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:35:59,697: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:35:59,698: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:00,473: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:00,473: root: INFO: Current backtesting datetime 2021-04-26 15:00:00-05:00 +2024-04-13 18:36:00,474: root: INFO: Current backtesting datetime 2021-04-27 08:30:00-05:00 +2024-04-13 18:36:00,474: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:00 +2024-04-13 18:36:00,474: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:00,475: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:00,475: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:00,476: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:00,476: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:01,433: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:01,434: root: INFO: Current backtesting datetime 2021-04-27 15:00:00-05:00 +2024-04-13 18:36:01,434: root: INFO: Current backtesting datetime 2021-04-28 08:30:00-05:00 +2024-04-13 18:36:01,435: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:01 +2024-04-13 18:36:01,435: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:01,436: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:01,436: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:01,436: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:01,436: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:02,183: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:02,184: root: INFO: Current backtesting datetime 2021-04-28 15:00:00-05:00 +2024-04-13 18:36:02,184: root: INFO: Current backtesting datetime 2021-04-29 08:30:00-05:00 +2024-04-13 18:36:02,184: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:02 +2024-04-13 18:36:02,184: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:02,185: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:02,185: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:02,186: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:02,186: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:02,916: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:02,917: root: INFO: Current backtesting datetime 2021-04-29 15:00:00-05:00 +2024-04-13 18:36:02,917: root: INFO: Current backtesting datetime 2021-04-30 08:30:00-05:00 +2024-04-13 18:36:02,917: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:02 +2024-04-13 18:36:02,917: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:02,918: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:02,918: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:02,919: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:02,919: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:03,526: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:03,527: root: INFO: Current backtesting datetime 2021-04-30 15:00:00-05:00 +2024-04-13 18:36:03,528: root: INFO: Current backtesting datetime 2021-05-01 08:30:00-05:00 +2024-04-13 18:36:03,528: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:03,530: root: INFO: Current backtesting datetime 2021-05-01 08:29:00-05:00 +2024-04-13 18:36:03,531: root: INFO: Current backtesting datetime 2021-05-01 08:29:00-05:00 +2024-04-13 18:36:03,531: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:03,532: root: INFO: Current backtesting datetime 2021-05-03 07:30:00-05:00 +2024-04-13 18:36:03,532: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:03,533: root: INFO: Current backtesting datetime 2021-05-03 08:30:00-05:00 +2024-04-13 18:36:03,533: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:03,534: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:03 +2024-04-13 18:36:03,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:03,535: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:03,535: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:03,536: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:03,536: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:04,504: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:04,505: root: INFO: Current backtesting datetime 2021-05-03 15:00:00-05:00 +2024-04-13 18:36:04,506: root: INFO: Current backtesting datetime 2021-05-04 08:30:00-05:00 +2024-04-13 18:36:04,506: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:04 +2024-04-13 18:36:04,506: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:04,507: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:04,507: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:04,508: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:04,508: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:06,294: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:06,295: root: INFO: Current backtesting datetime 2021-05-04 15:00:00-05:00 +2024-04-13 18:36:06,295: root: INFO: Current backtesting datetime 2021-05-05 08:30:00-05:00 +2024-04-13 18:36:06,296: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:06 +2024-04-13 18:36:06,296: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:06,297: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:06,297: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:06,297: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:06,298: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:07,480: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:07,481: root: INFO: Current backtesting datetime 2021-05-05 15:00:00-05:00 +2024-04-13 18:36:07,482: root: INFO: Current backtesting datetime 2021-05-06 08:30:00-05:00 +2024-04-13 18:36:07,482: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:07 +2024-04-13 18:36:07,482: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:07,483: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:07,483: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:07,484: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:07,484: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:08,585: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:08,586: root: INFO: Current backtesting datetime 2021-05-06 15:00:00-05:00 +2024-04-13 18:36:08,586: root: INFO: Current backtesting datetime 2021-05-07 08:30:00-05:00 +2024-04-13 18:36:08,587: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:08 +2024-04-13 18:36:08,587: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:08,587: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:08,588: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:08,588: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:08,588: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:09,509: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:09,510: root: INFO: Current backtesting datetime 2021-05-07 15:00:00-05:00 +2024-04-13 18:36:09,510: root: INFO: Current backtesting datetime 2021-05-08 08:30:00-05:00 +2024-04-13 18:36:09,511: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:09,512: root: INFO: Current backtesting datetime 2021-05-08 08:29:00-05:00 +2024-04-13 18:36:09,513: root: INFO: Current backtesting datetime 2021-05-08 08:29:00-05:00 +2024-04-13 18:36:09,513: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:09,514: root: INFO: Current backtesting datetime 2021-05-10 07:30:00-05:00 +2024-04-13 18:36:09,514: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:09,515: root: INFO: Current backtesting datetime 2021-05-10 08:30:00-05:00 +2024-04-13 18:36:09,515: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:09,516: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:09 +2024-04-13 18:36:09,516: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:09,517: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:09,517: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:09,518: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:09,518: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:10,883: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:10,884: root: INFO: Current backtesting datetime 2021-05-10 15:00:00-05:00 +2024-04-13 18:36:10,884: root: INFO: Current backtesting datetime 2021-05-11 08:30:00-05:00 +2024-04-13 18:36:10,885: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:10 +2024-04-13 18:36:10,885: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:10,886: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:10,886: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:10,886: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:10,886: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:11,695: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:11,695: root: INFO: Current backtesting datetime 2021-05-11 15:00:00-05:00 +2024-04-13 18:36:11,696: root: INFO: Current backtesting datetime 2021-05-12 08:30:00-05:00 +2024-04-13 18:36:11,696: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:11 +2024-04-13 18:36:11,696: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:11,697: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:11,697: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:11,698: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:11,698: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:12,860: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:12,860: root: INFO: Current backtesting datetime 2021-05-12 15:00:00-05:00 +2024-04-13 18:36:12,861: root: INFO: Current backtesting datetime 2021-05-13 08:30:00-05:00 +2024-04-13 18:36:12,861: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:12 +2024-04-13 18:36:12,861: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:12,862: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:12,862: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:12,863: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:12,863: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:13,706: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:13,707: root: INFO: Current backtesting datetime 2021-05-13 15:00:00-05:00 +2024-04-13 18:36:13,707: root: INFO: Current backtesting datetime 2021-05-14 08:30:00-05:00 +2024-04-13 18:36:13,708: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:13 +2024-04-13 18:36:13,708: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:13,709: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:13,709: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:13,709: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:13,709: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:14,539: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:14,540: root: INFO: Current backtesting datetime 2021-05-14 15:00:00-05:00 +2024-04-13 18:36:14,540: root: INFO: Current backtesting datetime 2021-05-15 08:30:00-05:00 +2024-04-13 18:36:14,540: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:14,542: root: INFO: Current backtesting datetime 2021-05-15 08:29:00-05:00 +2024-04-13 18:36:14,543: root: INFO: Current backtesting datetime 2021-05-15 08:29:00-05:00 +2024-04-13 18:36:14,543: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:14,543: root: INFO: Current backtesting datetime 2021-05-17 07:30:00-05:00 +2024-04-13 18:36:14,544: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:14,545: root: INFO: Current backtesting datetime 2021-05-17 08:30:00-05:00 +2024-04-13 18:36:14,545: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:14,546: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:14 +2024-04-13 18:36:14,546: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:14,547: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:14,547: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:14,547: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:14,547: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:15,163: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:15,164: root: INFO: Current backtesting datetime 2021-05-17 15:00:00-05:00 +2024-04-13 18:36:15,165: root: INFO: Current backtesting datetime 2021-05-18 08:30:00-05:00 +2024-04-13 18:36:15,165: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:15 +2024-04-13 18:36:15,165: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:15,166: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:15,166: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:15,167: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:15,167: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:16,004: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:16,004: root: INFO: Current backtesting datetime 2021-05-18 15:00:00-05:00 +2024-04-13 18:36:16,005: root: INFO: Current backtesting datetime 2021-05-19 08:30:00-05:00 +2024-04-13 18:36:16,005: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:16 +2024-04-13 18:36:16,005: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:16,006: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:16,006: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:16,007: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:16,007: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:16,948: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:16,949: root: INFO: Current backtesting datetime 2021-05-19 15:00:00-05:00 +2024-04-13 18:36:16,949: root: INFO: Current backtesting datetime 2021-05-20 08:30:00-05:00 +2024-04-13 18:36:16,949: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:16 +2024-04-13 18:36:16,949: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:16,950: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:16,950: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:16,951: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:16,951: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:17,705: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:17,706: root: INFO: Current backtesting datetime 2021-05-20 15:00:00-05:00 +2024-04-13 18:36:17,706: root: INFO: Current backtesting datetime 2021-05-21 08:30:00-05:00 +2024-04-13 18:36:17,707: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:17 +2024-04-13 18:36:17,707: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:17,708: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:17,708: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:17,708: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:17,708: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:18,496: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:18,497: root: INFO: Current backtesting datetime 2021-05-21 15:00:00-05:00 +2024-04-13 18:36:18,497: root: INFO: Current backtesting datetime 2021-05-22 08:30:00-05:00 +2024-04-13 18:36:18,498: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:18,499: root: INFO: Current backtesting datetime 2021-05-22 08:29:00-05:00 +2024-04-13 18:36:18,500: root: INFO: Current backtesting datetime 2021-05-22 08:29:00-05:00 +2024-04-13 18:36:18,500: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:18,501: root: INFO: Current backtesting datetime 2021-05-24 07:30:00-05:00 +2024-04-13 18:36:18,501: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:18,502: root: INFO: Current backtesting datetime 2021-05-24 08:30:00-05:00 +2024-04-13 18:36:18,502: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:18,503: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:18 +2024-04-13 18:36:18,503: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:18,504: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:18,504: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:18,505: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:18,505: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:19,005: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:19,006: root: INFO: Current backtesting datetime 2021-05-24 15:00:00-05:00 +2024-04-13 18:36:19,006: root: INFO: Current backtesting datetime 2021-05-25 08:30:00-05:00 +2024-04-13 18:36:19,007: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:19 +2024-04-13 18:36:19,007: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:19,008: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:19,008: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:19,008: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:19,008: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:19,623: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:19,624: root: INFO: Current backtesting datetime 2021-05-25 15:00:00-05:00 +2024-04-13 18:36:19,625: root: INFO: Current backtesting datetime 2021-05-26 08:30:00-05:00 +2024-04-13 18:36:19,625: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:19 +2024-04-13 18:36:19,625: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:19,626: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:19,626: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:19,627: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:19,627: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:19,931: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:19,932: root: INFO: Current backtesting datetime 2021-05-26 15:00:00-05:00 +2024-04-13 18:36:19,932: root: INFO: Current backtesting datetime 2021-05-27 08:30:00-05:00 +2024-04-13 18:36:19,933: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:19 +2024-04-13 18:36:19,933: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:19,933: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:19,934: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:19,934: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:19,934: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:20,492: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:20,493: root: INFO: Current backtesting datetime 2021-05-27 15:00:00-05:00 +2024-04-13 18:36:20,493: root: INFO: Current backtesting datetime 2021-05-28 08:30:00-05:00 +2024-04-13 18:36:20,493: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:20 +2024-04-13 18:36:20,493: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:20,494: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:20,494: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:20,495: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:20,495: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:21,420: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:21,421: root: INFO: Current backtesting datetime 2021-05-28 15:00:00-05:00 +2024-04-13 18:36:21,421: root: INFO: Current backtesting datetime 2021-05-29 08:30:00-05:00 +2024-04-13 18:36:21,421: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:21,423: root: INFO: Current backtesting datetime 2021-05-29 08:29:00-05:00 +2024-04-13 18:36:21,424: root: INFO: Current backtesting datetime 2021-05-29 08:29:00-05:00 +2024-04-13 18:36:21,424: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:21,424: root: INFO: Current backtesting datetime 2021-06-01 07:30:00-05:00 +2024-04-13 18:36:21,425: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:21,426: root: INFO: Current backtesting datetime 2021-06-01 08:30:00-05:00 +2024-04-13 18:36:21,426: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:21,427: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:21 +2024-04-13 18:36:21,427: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:21,428: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:21,428: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:21,428: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:21,428: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:22,080: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:22,081: root: INFO: Current backtesting datetime 2021-06-01 15:00:00-05:00 +2024-04-13 18:36:22,081: root: INFO: Current backtesting datetime 2021-06-02 08:30:00-05:00 +2024-04-13 18:36:22,082: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:22 +2024-04-13 18:36:22,082: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:22,083: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:22,083: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:22,083: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:22,083: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:23,115: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:23,116: root: INFO: Current backtesting datetime 2021-06-02 15:00:00-05:00 +2024-04-13 18:36:23,116: root: INFO: Current backtesting datetime 2021-06-03 08:30:00-05:00 +2024-04-13 18:36:23,116: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:23 +2024-04-13 18:36:23,117: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:23,117: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:23,118: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:23,118: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:23,118: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:24,260: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:24,261: root: INFO: Current backtesting datetime 2021-06-03 15:00:00-05:00 +2024-04-13 18:36:24,261: root: INFO: Current backtesting datetime 2021-06-04 08:30:00-05:00 +2024-04-13 18:36:24,262: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:24 +2024-04-13 18:36:24,262: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:24,262: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:24,263: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:24,263: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:24,263: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:25,290: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:25,291: root: INFO: Current backtesting datetime 2021-06-04 15:00:00-05:00 +2024-04-13 18:36:25,292: root: INFO: Current backtesting datetime 2021-06-05 08:30:00-05:00 +2024-04-13 18:36:25,292: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:25,294: root: INFO: Current backtesting datetime 2021-06-05 08:29:00-05:00 +2024-04-13 18:36:25,295: root: INFO: Current backtesting datetime 2021-06-05 08:29:00-05:00 +2024-04-13 18:36:25,295: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:25,296: root: INFO: Current backtesting datetime 2021-06-07 07:30:00-05:00 +2024-04-13 18:36:25,296: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:25,297: root: INFO: Current backtesting datetime 2021-06-07 08:30:00-05:00 +2024-04-13 18:36:25,297: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:25,298: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:25 +2024-04-13 18:36:25,298: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:25,299: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:25,299: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:25,300: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:25,300: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:26,587: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:26,588: root: INFO: Current backtesting datetime 2021-06-07 15:00:00-05:00 +2024-04-13 18:36:26,588: root: INFO: Current backtesting datetime 2021-06-08 08:30:00-05:00 +2024-04-13 18:36:26,589: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:26 +2024-04-13 18:36:26,589: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:26,590: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:26,590: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:26,590: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:26,591: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:27,839: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:27,840: root: INFO: Current backtesting datetime 2021-06-08 15:00:00-05:00 +2024-04-13 18:36:27,840: root: INFO: Current backtesting datetime 2021-06-09 08:30:00-05:00 +2024-04-13 18:36:27,840: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:27 +2024-04-13 18:36:27,841: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:27,841: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:27,842: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:27,842: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:27,842: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:29,040: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:29,041: root: INFO: Current backtesting datetime 2021-06-09 15:00:00-05:00 +2024-04-13 18:36:29,041: root: INFO: Current backtesting datetime 2021-06-10 08:30:00-05:00 +2024-04-13 18:36:29,042: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:29 +2024-04-13 18:36:29,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:29,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:29,042: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:29,043: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:29,043: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:30,022: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:30,023: root: INFO: Current backtesting datetime 2021-06-10 15:00:00-05:00 +2024-04-13 18:36:30,023: root: INFO: Current backtesting datetime 2021-06-11 08:30:00-05:00 +2024-04-13 18:36:30,023: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:30 +2024-04-13 18:36:30,024: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:30,024: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:30,025: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:30,025: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:30,025: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:31,013: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:31,014: root: INFO: Current backtesting datetime 2021-06-11 15:00:00-05:00 +2024-04-13 18:36:31,015: root: INFO: Current backtesting datetime 2021-06-12 08:30:00-05:00 +2024-04-13 18:36:31,015: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:31,016: root: INFO: Current backtesting datetime 2021-06-12 08:29:00-05:00 +2024-04-13 18:36:31,018: root: INFO: Current backtesting datetime 2021-06-12 08:29:00-05:00 +2024-04-13 18:36:31,018: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:31,019: root: INFO: Current backtesting datetime 2021-06-14 07:30:00-05:00 +2024-04-13 18:36:31,019: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:31,020: root: INFO: Current backtesting datetime 2021-06-14 08:30:00-05:00 +2024-04-13 18:36:31,020: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:31,021: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:31 +2024-04-13 18:36:31,021: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:31,022: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:31,022: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:31,023: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:31,023: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:31,931: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:31,932: root: INFO: Current backtesting datetime 2021-06-14 15:00:00-05:00 +2024-04-13 18:36:31,932: root: INFO: Current backtesting datetime 2021-06-15 08:30:00-05:00 +2024-04-13 18:36:31,932: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:31 +2024-04-13 18:36:31,932: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:31,934: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:31,934: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:31,935: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:31,935: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:32,529: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:32,530: root: INFO: Current backtesting datetime 2021-06-15 15:00:00-05:00 +2024-04-13 18:36:32,531: root: INFO: Current backtesting datetime 2021-06-16 08:30:00-05:00 +2024-04-13 18:36:32,531: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:32 +2024-04-13 18:36:32,531: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:32,532: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:32,532: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:32,533: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:32,533: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:33,044: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:33,045: root: INFO: Current backtesting datetime 2021-06-16 15:00:00-05:00 +2024-04-13 18:36:33,045: root: INFO: Current backtesting datetime 2021-06-17 08:30:00-05:00 +2024-04-13 18:36:33,045: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:33 +2024-04-13 18:36:33,046: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:33,046: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:33,046: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:33,046: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:33,047: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:33,956: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:33,956: root: INFO: Current backtesting datetime 2021-06-17 15:00:00-05:00 +2024-04-13 18:36:33,957: root: INFO: Current backtesting datetime 2021-06-18 08:30:00-05:00 +2024-04-13 18:36:33,957: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:33 +2024-04-13 18:36:33,957: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:33,958: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:33,958: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:33,959: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:33,959: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:34,493: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:34,494: root: INFO: Current backtesting datetime 2021-06-18 15:00:00-05:00 +2024-04-13 18:36:34,494: root: INFO: Current backtesting datetime 2021-06-19 08:30:00-05:00 +2024-04-13 18:36:34,495: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:34,496: root: INFO: Current backtesting datetime 2021-06-19 08:29:00-05:00 +2024-04-13 18:36:34,497: root: INFO: Current backtesting datetime 2021-06-19 08:29:00-05:00 +2024-04-13 18:36:34,497: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:34,498: root: INFO: Current backtesting datetime 2021-06-21 07:30:00-05:00 +2024-04-13 18:36:34,498: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:34,499: root: INFO: Current backtesting datetime 2021-06-21 08:30:00-05:00 +2024-04-13 18:36:34,499: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:34,500: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:34 +2024-04-13 18:36:34,500: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:34,501: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:34,501: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:34,502: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:34,502: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:34,988: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:34,989: root: INFO: Current backtesting datetime 2021-06-21 15:00:00-05:00 +2024-04-13 18:36:34,989: root: INFO: Current backtesting datetime 2021-06-22 08:30:00-05:00 +2024-04-13 18:36:34,990: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:34 +2024-04-13 18:36:34,990: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:34,991: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:34,991: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:34,991: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:34,992: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:35,754: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:35,755: root: INFO: Current backtesting datetime 2021-06-22 15:00:00-05:00 +2024-04-13 18:36:35,757: root: INFO: Current backtesting datetime 2021-06-23 08:30:00-05:00 +2024-04-13 18:36:35,757: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:35 +2024-04-13 18:36:35,757: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:35,758: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:35,758: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:35,759: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:35,759: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:36,337: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:36,338: root: INFO: Current backtesting datetime 2021-06-23 15:00:00-05:00 +2024-04-13 18:36:36,338: root: INFO: Current backtesting datetime 2021-06-24 08:30:00-05:00 +2024-04-13 18:36:36,338: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:36 +2024-04-13 18:36:36,338: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:36,339: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:36,339: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:36,340: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:36,340: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:36,945: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:36,946: root: INFO: Current backtesting datetime 2021-06-24 15:00:00-05:00 +2024-04-13 18:36:36,946: root: INFO: Current backtesting datetime 2021-06-25 08:30:00-05:00 +2024-04-13 18:36:36,947: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:36 +2024-04-13 18:36:36,947: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:36,948: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:36,948: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:36,949: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:36,949: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:37,489: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:37,490: root: INFO: Current backtesting datetime 2021-06-25 15:00:00-05:00 +2024-04-13 18:36:37,490: root: INFO: Current backtesting datetime 2021-06-26 08:30:00-05:00 +2024-04-13 18:36:37,491: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:37,492: root: INFO: Current backtesting datetime 2021-06-26 08:29:00-05:00 +2024-04-13 18:36:37,493: root: INFO: Current backtesting datetime 2021-06-26 08:29:00-05:00 +2024-04-13 18:36:37,493: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:37,494: root: INFO: Current backtesting datetime 2021-06-28 07:30:00-05:00 +2024-04-13 18:36:37,495: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:37,495: root: INFO: Current backtesting datetime 2021-06-28 08:30:00-05:00 +2024-04-13 18:36:37,495: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:37,496: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:37 +2024-04-13 18:36:37,496: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:37,497: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:37,497: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:37,498: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:37,498: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:38,059: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:38,060: root: INFO: Current backtesting datetime 2021-06-28 15:00:00-05:00 +2024-04-13 18:36:38,060: root: INFO: Current backtesting datetime 2021-06-29 08:30:00-05:00 +2024-04-13 18:36:38,061: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:38 +2024-04-13 18:36:38,061: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:38,061: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:38,062: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:38,062: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:38,062: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:39,013: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:39,013: root: INFO: Current backtesting datetime 2021-06-29 15:00:00-05:00 +2024-04-13 18:36:39,014: root: INFO: Current backtesting datetime 2021-06-30 08:30:00-05:00 +2024-04-13 18:36:39,015: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:39 +2024-04-13 18:36:39,015: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:39,015: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:39,016: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:39,016: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:39,016: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:40,203: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:40,204: root: INFO: Current backtesting datetime 2021-06-30 15:00:00-05:00 +2024-04-13 18:36:40,204: root: INFO: Current backtesting datetime 2021-07-01 08:30:00-05:00 +2024-04-13 18:36:40,205: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:40 +2024-04-13 18:36:40,205: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:40,206: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:40,206: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:40,206: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:40,207: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:41,872: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:41,873: root: INFO: Current backtesting datetime 2021-07-01 15:00:00-05:00 +2024-04-13 18:36:41,873: root: INFO: Current backtesting datetime 2021-07-02 08:30:00-05:00 +2024-04-13 18:36:41,873: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:41 +2024-04-13 18:36:41,873: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:41,874: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:41,874: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:41,875: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:41,875: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:43,184: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:43,185: root: INFO: Current backtesting datetime 2021-07-02 15:00:00-05:00 +2024-04-13 18:36:43,185: root: INFO: Current backtesting datetime 2021-07-03 08:30:00-05:00 +2024-04-13 18:36:43,186: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:43,187: root: INFO: Current backtesting datetime 2021-07-03 08:29:00-05:00 +2024-04-13 18:36:43,188: root: INFO: Current backtesting datetime 2021-07-03 08:29:00-05:00 +2024-04-13 18:36:43,188: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:43,189: root: INFO: Current backtesting datetime 2021-07-06 07:30:00-05:00 +2024-04-13 18:36:43,190: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:43,191: root: INFO: Current backtesting datetime 2021-07-06 08:30:00-05:00 +2024-04-13 18:36:43,191: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:43,192: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:43 +2024-04-13 18:36:43,192: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:43,193: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:43,193: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:43,193: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:43,193: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:45,536: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:45,537: root: INFO: Current backtesting datetime 2021-07-06 15:00:00-05:00 +2024-04-13 18:36:45,537: root: INFO: Current backtesting datetime 2021-07-07 08:30:00-05:00 +2024-04-13 18:36:45,538: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:45 +2024-04-13 18:36:45,538: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:45,539: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:45,539: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:45,539: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:45,539: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:48,182: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:48,183: root: INFO: Current backtesting datetime 2021-07-07 15:00:00-05:00 +2024-04-13 18:36:48,183: root: INFO: Current backtesting datetime 2021-07-08 08:30:00-05:00 +2024-04-13 18:36:48,183: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:48 +2024-04-13 18:36:48,183: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:48,184: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:48,184: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:48,185: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:48,185: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:49,726: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:49,727: root: INFO: Current backtesting datetime 2021-07-08 15:00:00-05:00 +2024-04-13 18:36:49,728: root: INFO: Current backtesting datetime 2021-07-09 08:30:00-05:00 +2024-04-13 18:36:49,728: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:49 +2024-04-13 18:36:49,728: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:49,729: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:49,729: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:49,730: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:49,730: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:51,643: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:51,644: root: INFO: Current backtesting datetime 2021-07-09 15:00:00-05:00 +2024-04-13 18:36:51,645: root: INFO: Current backtesting datetime 2021-07-10 08:30:00-05:00 +2024-04-13 18:36:51,645: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:51,647: root: INFO: Current backtesting datetime 2021-07-10 08:29:00-05:00 +2024-04-13 18:36:51,648: root: INFO: Current backtesting datetime 2021-07-10 08:29:00-05:00 +2024-04-13 18:36:51,648: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:51,649: root: INFO: Current backtesting datetime 2021-07-12 07:30:00-05:00 +2024-04-13 18:36:51,649: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:51,650: root: INFO: Current backtesting datetime 2021-07-12 08:30:00-05:00 +2024-04-13 18:36:51,650: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:51,650: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:51 +2024-04-13 18:36:51,650: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:51,652: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:51,652: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:51,653: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:51,653: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:52,774: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:52,774: root: INFO: Current backtesting datetime 2021-07-12 15:00:00-05:00 +2024-04-13 18:36:52,775: root: INFO: Current backtesting datetime 2021-07-13 08:30:00-05:00 +2024-04-13 18:36:52,775: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:52 +2024-04-13 18:36:52,775: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:52,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:52,776: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:52,776: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:52,776: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:54,375: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:54,376: root: INFO: Current backtesting datetime 2021-07-13 15:00:00-05:00 +2024-04-13 18:36:54,377: root: INFO: Current backtesting datetime 2021-07-14 08:30:00-05:00 +2024-04-13 18:36:54,377: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:54 +2024-04-13 18:36:54,377: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:54,378: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:54,378: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:54,379: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:54,379: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:55,468: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:55,469: root: INFO: Current backtesting datetime 2021-07-14 15:00:00-05:00 +2024-04-13 18:36:55,469: root: INFO: Current backtesting datetime 2021-07-15 08:30:00-05:00 +2024-04-13 18:36:55,470: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:55 +2024-04-13 18:36:55,470: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:55,471: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:55,471: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:55,471: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:55,472: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:56,795: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:56,796: root: INFO: Current backtesting datetime 2021-07-15 15:00:00-05:00 +2024-04-13 18:36:56,797: root: INFO: Current backtesting datetime 2021-07-16 08:30:00-05:00 +2024-04-13 18:36:56,797: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:56 +2024-04-13 18:36:56,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:56,798: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:56,798: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:56,799: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:56,799: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:58,328: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:58,328: root: INFO: Current backtesting datetime 2021-07-16 15:00:00-05:00 +2024-04-13 18:36:58,329: root: INFO: Current backtesting datetime 2021-07-17 08:30:00-05:00 +2024-04-13 18:36:58,330: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:36:58,331: root: INFO: Current backtesting datetime 2021-07-17 08:29:00-05:00 +2024-04-13 18:36:58,332: root: INFO: Current backtesting datetime 2021-07-17 08:29:00-05:00 +2024-04-13 18:36:58,332: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:36:58,333: root: INFO: Current backtesting datetime 2021-07-19 07:30:00-05:00 +2024-04-13 18:36:58,333: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:36:58,334: root: INFO: Current backtesting datetime 2021-07-19 08:30:00-05:00 +2024-04-13 18:36:58,334: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:36:58,335: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:58 +2024-04-13 18:36:58,335: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:58,336: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:58,336: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:58,337: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:58,337: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:36:59,453: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:36:59,454: root: INFO: Current backtesting datetime 2021-07-19 15:00:00-05:00 +2024-04-13 18:36:59,454: root: INFO: Current backtesting datetime 2021-07-20 08:30:00-05:00 +2024-04-13 18:36:59,454: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:36:59 +2024-04-13 18:36:59,454: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:59,455: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:36:59,455: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:36:59,456: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:36:59,456: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:00,196: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:00,197: root: INFO: Current backtesting datetime 2021-07-20 15:00:00-05:00 +2024-04-13 18:37:00,198: root: INFO: Current backtesting datetime 2021-07-21 08:30:00-05:00 +2024-04-13 18:37:00,198: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:00 +2024-04-13 18:37:00,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:00,199: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:00,199: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:00,200: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:00,200: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:01,968: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:01,969: root: INFO: Current backtesting datetime 2021-07-21 15:00:00-05:00 +2024-04-13 18:37:01,969: root: INFO: Current backtesting datetime 2021-07-22 08:30:00-05:00 +2024-04-13 18:37:01,970: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:01 +2024-04-13 18:37:01,970: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:01,971: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:01,971: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:01,971: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:01,971: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:02,773: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:02,774: root: INFO: Current backtesting datetime 2021-07-22 15:00:00-05:00 +2024-04-13 18:37:02,774: root: INFO: Current backtesting datetime 2021-07-23 08:30:00-05:00 +2024-04-13 18:37:02,775: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:02 +2024-04-13 18:37:02,775: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:02,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:02,776: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:02,776: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:02,776: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:04,543: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:04,544: root: INFO: Current backtesting datetime 2021-07-23 15:00:00-05:00 +2024-04-13 18:37:04,545: root: INFO: Current backtesting datetime 2021-07-24 08:30:00-05:00 +2024-04-13 18:37:04,545: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:37:04,546: root: INFO: Current backtesting datetime 2021-07-24 08:29:00-05:00 +2024-04-13 18:37:04,548: root: INFO: Current backtesting datetime 2021-07-24 08:29:00-05:00 +2024-04-13 18:37:04,548: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:37:04,549: root: INFO: Current backtesting datetime 2021-07-26 07:30:00-05:00 +2024-04-13 18:37:04,549: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:37:04,550: root: INFO: Current backtesting datetime 2021-07-26 08:30:00-05:00 +2024-04-13 18:37:04,550: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:37:04,551: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:04 +2024-04-13 18:37:04,551: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:04,552: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:04,552: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:04,553: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:04,553: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:05,815: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:05,816: root: INFO: Current backtesting datetime 2021-07-26 15:00:00-05:00 +2024-04-13 18:37:05,816: root: INFO: Current backtesting datetime 2021-07-27 08:30:00-05:00 +2024-04-13 18:37:05,817: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:05 +2024-04-13 18:37:05,817: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:05,817: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:05,818: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:05,818: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:05,818: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:07,174: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:07,176: root: INFO: Current backtesting datetime 2021-07-27 15:00:00-05:00 +2024-04-13 18:37:07,176: root: INFO: Current backtesting datetime 2021-07-28 08:30:00-05:00 +2024-04-13 18:37:07,176: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:07 +2024-04-13 18:37:07,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:07,177: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:07,177: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:07,178: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:07,178: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:08,458: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:08,459: root: INFO: Current backtesting datetime 2021-07-28 15:00:00-05:00 +2024-04-13 18:37:08,460: root: INFO: Current backtesting datetime 2021-07-29 08:30:00-05:00 +2024-04-13 18:37:08,460: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:08 +2024-04-13 18:37:08,460: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:08,461: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:08,461: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:08,462: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:08,462: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:10,207: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:10,208: root: INFO: Current backtesting datetime 2021-07-29 15:00:00-05:00 +2024-04-13 18:37:10,209: root: INFO: Current backtesting datetime 2021-07-30 08:30:00-05:00 +2024-04-13 18:37:10,209: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:10 +2024-04-13 18:37:10,209: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:10,210: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:10,210: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:10,211: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:10,211: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:11,564: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:11,565: root: INFO: Current backtesting datetime 2021-07-30 15:00:00-05:00 +2024-04-13 18:37:11,565: root: INFO: Current backtesting datetime 2021-07-31 08:30:00-05:00 +2024-04-13 18:37:11,565: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:37:11,567: root: INFO: Current backtesting datetime 2021-07-31 08:29:00-05:00 +2024-04-13 18:37:11,568: root: INFO: Current backtesting datetime 2021-07-31 08:29:00-05:00 +2024-04-13 18:37:11,568: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:37:11,569: root: INFO: Current backtesting datetime 2021-08-02 07:30:00-05:00 +2024-04-13 18:37:11,569: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:37:11,570: root: INFO: Current backtesting datetime 2021-08-02 08:30:00-05:00 +2024-04-13 18:37:11,570: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:37:11,571: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:11 +2024-04-13 18:37:11,571: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:11,572: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:11,572: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:11,572: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:11,573: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:13,049: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:13,050: root: INFO: Current backtesting datetime 2021-08-02 15:00:00-05:00 +2024-04-13 18:37:13,050: root: INFO: Current backtesting datetime 2021-08-03 08:30:00-05:00 +2024-04-13 18:37:13,051: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:13 +2024-04-13 18:37:13,051: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:13,051: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:13,052: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:13,052: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:13,052: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:14,662: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:14,663: root: INFO: Current backtesting datetime 2021-08-03 15:00:00-05:00 +2024-04-13 18:37:14,663: root: INFO: Current backtesting datetime 2021-08-04 08:30:00-05:00 +2024-04-13 18:37:14,664: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:14 +2024-04-13 18:37:14,664: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:14,665: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:14,665: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:14,665: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:14,665: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:17,566: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:17,567: root: INFO: Current backtesting datetime 2021-08-04 15:00:00-05:00 +2024-04-13 18:37:17,567: root: INFO: Current backtesting datetime 2021-08-05 08:30:00-05:00 +2024-04-13 18:37:17,568: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:17 +2024-04-13 18:37:17,568: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:17,569: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:17,569: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:17,570: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:17,570: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:19,462: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:19,463: root: INFO: Current backtesting datetime 2021-08-05 15:00:00-05:00 +2024-04-13 18:37:19,464: root: INFO: Current backtesting datetime 2021-08-06 08:30:00-05:00 +2024-04-13 18:37:19,464: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:19 +2024-04-13 18:37:19,464: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:19,465: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:19,465: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:19,466: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:19,466: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:20,929: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:20,930: root: INFO: Current backtesting datetime 2021-08-06 15:00:00-05:00 +2024-04-13 18:37:20,930: root: INFO: Current backtesting datetime 2021-08-07 08:30:00-05:00 +2024-04-13 18:37:20,930: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:37:20,932: root: INFO: Current backtesting datetime 2021-08-07 08:29:00-05:00 +2024-04-13 18:37:20,933: root: INFO: Current backtesting datetime 2021-08-07 08:29:00-05:00 +2024-04-13 18:37:20,933: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:37:20,934: root: INFO: Current backtesting datetime 2021-08-09 07:30:00-05:00 +2024-04-13 18:37:20,934: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:37:20,935: root: INFO: Current backtesting datetime 2021-08-09 08:30:00-05:00 +2024-04-13 18:37:20,935: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:37:20,936: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:20 +2024-04-13 18:37:20,936: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:20,937: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:20,937: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:20,938: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:20,938: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:23,984: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:23,985: root: INFO: Current backtesting datetime 2021-08-09 15:00:00-05:00 +2024-04-13 18:37:23,985: root: INFO: Current backtesting datetime 2021-08-10 08:30:00-05:00 +2024-04-13 18:37:23,986: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:23 +2024-04-13 18:37:23,986: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:23,986: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:23,987: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:23,987: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:23,987: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:26,259: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:26,259: root: INFO: Current backtesting datetime 2021-08-10 15:00:00-05:00 +2024-04-13 18:37:26,260: root: INFO: Current backtesting datetime 2021-08-11 08:30:00-05:00 +2024-04-13 18:37:26,261: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:26 +2024-04-13 18:37:26,261: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:26,261: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:26,262: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:26,262: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:26,262: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:28,778: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:28,779: root: INFO: Current backtesting datetime 2021-08-11 15:00:00-05:00 +2024-04-13 18:37:28,779: root: INFO: Current backtesting datetime 2021-08-12 08:30:00-05:00 +2024-04-13 18:37:28,779: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:28 +2024-04-13 18:37:28,780: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:28,780: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:28,781: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:28,781: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:28,781: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:30,025: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:30,026: root: INFO: Current backtesting datetime 2021-08-12 15:00:00-05:00 +2024-04-13 18:37:30,027: root: INFO: Current backtesting datetime 2021-08-13 08:30:00-05:00 +2024-04-13 18:37:30,027: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:30 +2024-04-13 18:37:30,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:30,028: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:30,028: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:30,029: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:30,029: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:31,089: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:31,090: root: INFO: Current backtesting datetime 2021-08-13 15:00:00-05:00 +2024-04-13 18:37:31,090: root: INFO: Current backtesting datetime 2021-08-14 08:30:00-05:00 +2024-04-13 18:37:31,091: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:37:31,092: root: INFO: Current backtesting datetime 2021-08-14 08:29:00-05:00 +2024-04-13 18:37:31,093: root: INFO: Current backtesting datetime 2021-08-14 08:29:00-05:00 +2024-04-13 18:37:31,093: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:37:31,095: root: INFO: Current backtesting datetime 2021-08-16 07:30:00-05:00 +2024-04-13 18:37:31,095: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:37:31,095: root: INFO: Current backtesting datetime 2021-08-16 08:30:00-05:00 +2024-04-13 18:37:31,095: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:37:31,097: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:31 +2024-04-13 18:37:31,097: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:31,097: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:31,098: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:31,098: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:31,098: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:32,653: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:32,654: root: INFO: Current backtesting datetime 2021-08-16 15:00:00-05:00 +2024-04-13 18:37:32,654: root: INFO: Current backtesting datetime 2021-08-17 08:30:00-05:00 +2024-04-13 18:37:32,655: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:32 +2024-04-13 18:37:32,655: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:32,655: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:32,656: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:32,656: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:32,656: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:34,250: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:34,251: root: INFO: Current backtesting datetime 2021-08-17 15:00:00-05:00 +2024-04-13 18:37:34,251: root: INFO: Current backtesting datetime 2021-08-18 08:30:00-05:00 +2024-04-13 18:37:34,251: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:34 +2024-04-13 18:37:34,252: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:34,252: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:34,253: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:34,253: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:34,253: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:36,403: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:36,403: root: INFO: Current backtesting datetime 2021-08-18 15:00:00-05:00 +2024-04-13 18:37:36,404: root: INFO: Current backtesting datetime 2021-08-19 08:30:00-05:00 +2024-04-13 18:37:36,404: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:36 +2024-04-13 18:37:36,404: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:36,405: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:36,405: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:36,406: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:36,406: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:38,356: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:38,357: root: INFO: Current backtesting datetime 2021-08-19 15:00:00-05:00 +2024-04-13 18:37:38,357: root: INFO: Current backtesting datetime 2021-08-20 08:30:00-05:00 +2024-04-13 18:37:38,358: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:38 +2024-04-13 18:37:38,358: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:38,358: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:38,359: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:38,359: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:38,359: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:39,660: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:39,661: root: INFO: Current backtesting datetime 2021-08-20 15:00:00-05:00 +2024-04-13 18:37:39,661: root: INFO: Current backtesting datetime 2021-08-21 08:30:00-05:00 +2024-04-13 18:37:39,661: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:37:39,662: root: INFO: Current backtesting datetime 2021-08-21 08:29:00-05:00 +2024-04-13 18:37:39,663: root: INFO: Current backtesting datetime 2021-08-21 08:29:00-05:00 +2024-04-13 18:37:39,664: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:37:39,665: root: INFO: Current backtesting datetime 2021-08-23 07:30:00-05:00 +2024-04-13 18:37:39,665: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:37:39,666: root: INFO: Current backtesting datetime 2021-08-23 08:30:00-05:00 +2024-04-13 18:37:39,666: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:37:39,667: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:39 +2024-04-13 18:37:39,667: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:39,668: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:39,668: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:39,669: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:39,669: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:41,486: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:41,487: root: INFO: Current backtesting datetime 2021-08-23 15:00:00-05:00 +2024-04-13 18:37:41,487: root: INFO: Current backtesting datetime 2021-08-24 08:30:00-05:00 +2024-04-13 18:37:41,488: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:41 +2024-04-13 18:37:41,488: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:41,488: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:41,489: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:41,489: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:41,489: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:43,255: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:43,257: root: INFO: Current backtesting datetime 2021-08-24 15:00:00-05:00 +2024-04-13 18:37:43,257: root: INFO: Current backtesting datetime 2021-08-25 08:30:00-05:00 +2024-04-13 18:37:43,257: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:43 +2024-04-13 18:37:43,257: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:43,258: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:43,258: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:43,259: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:43,259: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:44,348: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:44,349: root: INFO: Current backtesting datetime 2021-08-25 15:00:00-05:00 +2024-04-13 18:37:44,349: root: INFO: Current backtesting datetime 2021-08-26 08:30:00-05:00 +2024-04-13 18:37:44,350: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:44 +2024-04-13 18:37:44,350: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:44,351: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:44,351: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:44,351: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:44,351: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:46,367: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:46,368: root: INFO: Current backtesting datetime 2021-08-26 15:00:00-05:00 +2024-04-13 18:37:46,369: root: INFO: Current backtesting datetime 2021-08-27 08:30:00-05:00 +2024-04-13 18:37:46,369: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:46 +2024-04-13 18:37:46,369: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:46,370: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:46,370: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:46,371: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:46,371: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:47,633: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:47,634: root: INFO: Current backtesting datetime 2021-08-27 15:00:00-05:00 +2024-04-13 18:37:47,634: root: INFO: Current backtesting datetime 2021-08-28 08:30:00-05:00 +2024-04-13 18:37:47,635: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:37:47,636: root: INFO: Current backtesting datetime 2021-08-28 08:29:00-05:00 +2024-04-13 18:37:47,637: root: INFO: Current backtesting datetime 2021-08-28 08:29:00-05:00 +2024-04-13 18:37:47,637: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:37:47,638: root: INFO: Current backtesting datetime 2021-08-30 07:30:00-05:00 +2024-04-13 18:37:47,638: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:37:47,639: root: INFO: Current backtesting datetime 2021-08-30 08:30:00-05:00 +2024-04-13 18:37:47,639: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:37:47,640: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:47 +2024-04-13 18:37:47,640: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:47,641: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:47,641: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:47,642: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:47,642: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:49,203: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:49,204: root: INFO: Current backtesting datetime 2021-08-30 15:00:00-05:00 +2024-04-13 18:37:49,204: root: INFO: Current backtesting datetime 2021-08-31 08:30:00-05:00 +2024-04-13 18:37:49,205: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:49 +2024-04-13 18:37:49,205: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:49,206: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:49,206: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:49,206: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:49,206: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:51,024: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:51,025: root: INFO: Current backtesting datetime 2021-08-31 15:00:00-05:00 +2024-04-13 18:37:51,025: root: INFO: Current backtesting datetime 2021-09-01 08:30:00-05:00 +2024-04-13 18:37:51,026: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:51 +2024-04-13 18:37:51,026: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:51,026: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:51,027: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:51,027: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:51,027: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:52,901: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:52,902: root: INFO: Current backtesting datetime 2021-09-01 15:00:00-05:00 +2024-04-13 18:37:52,903: root: INFO: Current backtesting datetime 2021-09-02 08:30:00-05:00 +2024-04-13 18:37:52,903: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:52 +2024-04-13 18:37:52,903: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:52,904: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:52,904: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:52,905: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:52,905: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:54,464: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:54,465: root: INFO: Current backtesting datetime 2021-09-02 15:00:00-05:00 +2024-04-13 18:37:54,465: root: INFO: Current backtesting datetime 2021-09-03 08:30:00-05:00 +2024-04-13 18:37:54,466: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:54 +2024-04-13 18:37:54,466: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:54,467: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:54,467: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:54,467: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:54,467: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:57,403: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:57,404: root: INFO: Current backtesting datetime 2021-09-03 15:00:00-05:00 +2024-04-13 18:37:57,405: root: INFO: Current backtesting datetime 2021-09-04 08:30:00-05:00 +2024-04-13 18:37:57,405: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:37:57,407: root: INFO: Current backtesting datetime 2021-09-04 08:29:00-05:00 +2024-04-13 18:37:57,408: root: INFO: Current backtesting datetime 2021-09-04 08:29:00-05:00 +2024-04-13 18:37:57,408: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:37:57,409: root: INFO: Current backtesting datetime 2021-09-07 07:30:00-05:00 +2024-04-13 18:37:57,409: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:37:57,410: root: INFO: Current backtesting datetime 2021-09-07 08:30:00-05:00 +2024-04-13 18:37:57,410: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:37:57,411: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:57 +2024-04-13 18:37:57,411: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:57,412: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:57,412: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:57,413: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:57,413: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:58,533: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:58,534: root: INFO: Current backtesting datetime 2021-09-07 15:00:00-05:00 +2024-04-13 18:37:58,534: root: INFO: Current backtesting datetime 2021-09-08 08:30:00-05:00 +2024-04-13 18:37:58,535: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:58 +2024-04-13 18:37:58,535: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:58,536: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:58,536: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:58,537: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:58,537: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:37:59,643: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:37:59,644: root: INFO: Current backtesting datetime 2021-09-08 15:00:00-05:00 +2024-04-13 18:37:59,645: root: INFO: Current backtesting datetime 2021-09-09 08:30:00-05:00 +2024-04-13 18:37:59,645: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:37:59 +2024-04-13 18:37:59,645: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:59,646: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:37:59,646: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:37:59,647: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:37:59,647: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:01,137: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:01,138: root: INFO: Current backtesting datetime 2021-09-09 15:00:00-05:00 +2024-04-13 18:38:01,139: root: INFO: Current backtesting datetime 2021-09-10 08:30:00-05:00 +2024-04-13 18:38:01,139: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:01 +2024-04-13 18:38:01,139: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:01,140: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:01,140: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:01,141: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:01,141: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:02,845: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:02,846: root: INFO: Current backtesting datetime 2021-09-10 15:00:00-05:00 +2024-04-13 18:38:02,846: root: INFO: Current backtesting datetime 2021-09-11 08:30:00-05:00 +2024-04-13 18:38:02,846: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:38:02,847: root: INFO: Current backtesting datetime 2021-09-11 08:29:00-05:00 +2024-04-13 18:38:02,849: root: INFO: Current backtesting datetime 2021-09-11 08:29:00-05:00 +2024-04-13 18:38:02,849: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:38:02,849: root: INFO: Current backtesting datetime 2021-09-13 07:30:00-05:00 +2024-04-13 18:38:02,850: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:38:02,852: root: INFO: Current backtesting datetime 2021-09-13 08:30:00-05:00 +2024-04-13 18:38:02,852: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:38:02,852: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:02 +2024-04-13 18:38:02,852: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:02,853: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:02,853: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:02,853: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:02,853: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:03,880: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:03,881: root: INFO: Current backtesting datetime 2021-09-13 15:00:00-05:00 +2024-04-13 18:38:03,882: root: INFO: Current backtesting datetime 2021-09-14 08:30:00-05:00 +2024-04-13 18:38:03,882: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:03 +2024-04-13 18:38:03,882: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:03,882: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:03,883: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:03,884: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:03,884: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:04,961: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:04,962: root: INFO: Current backtesting datetime 2021-09-14 15:00:00-05:00 +2024-04-13 18:38:04,962: root: INFO: Current backtesting datetime 2021-09-15 08:30:00-05:00 +2024-04-13 18:38:04,962: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:04 +2024-04-13 18:38:04,962: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:04,963: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:04,963: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:04,964: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:04,964: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:07,138: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:07,139: root: INFO: Current backtesting datetime 2021-09-15 15:00:00-05:00 +2024-04-13 18:38:07,139: root: INFO: Current backtesting datetime 2021-09-16 08:30:00-05:00 +2024-04-13 18:38:07,140: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:07 +2024-04-13 18:38:07,140: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:07,140: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:07,141: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:07,141: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:07,141: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:08,172: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:08,173: root: INFO: Current backtesting datetime 2021-09-16 15:00:00-05:00 +2024-04-13 18:38:08,173: root: INFO: Current backtesting datetime 2021-09-17 08:30:00-05:00 +2024-04-13 18:38:08,173: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:08 +2024-04-13 18:38:08,174: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:08,174: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:08,175: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:08,175: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:08,175: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:09,501: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:09,502: root: INFO: Current backtesting datetime 2021-09-17 15:00:00-05:00 +2024-04-13 18:38:09,502: root: INFO: Current backtesting datetime 2021-09-18 08:30:00-05:00 +2024-04-13 18:38:09,502: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:38:09,504: root: INFO: Current backtesting datetime 2021-09-18 08:29:00-05:00 +2024-04-13 18:38:09,505: root: INFO: Current backtesting datetime 2021-09-18 08:29:00-05:00 +2024-04-13 18:38:09,505: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:38:09,506: root: INFO: Current backtesting datetime 2021-09-20 07:30:00-05:00 +2024-04-13 18:38:09,506: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:38:09,507: root: INFO: Current backtesting datetime 2021-09-20 08:30:00-05:00 +2024-04-13 18:38:09,507: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:38:09,508: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:09 +2024-04-13 18:38:09,508: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:09,509: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:09,509: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:09,510: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:09,510: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:11,574: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:11,575: root: INFO: Current backtesting datetime 2021-09-20 15:00:00-05:00 +2024-04-13 18:38:11,575: root: INFO: Current backtesting datetime 2021-09-21 08:30:00-05:00 +2024-04-13 18:38:11,575: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:11 +2024-04-13 18:38:11,575: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:11,576: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:11,576: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:11,577: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:11,577: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:12,737: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:12,738: root: INFO: Current backtesting datetime 2021-09-21 15:00:00-05:00 +2024-04-13 18:38:12,738: root: INFO: Current backtesting datetime 2021-09-22 08:30:00-05:00 +2024-04-13 18:38:12,739: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:12 +2024-04-13 18:38:12,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:12,740: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:12,740: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:12,740: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:12,740: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:14,162: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:14,163: root: INFO: Current backtesting datetime 2021-09-22 15:00:00-05:00 +2024-04-13 18:38:14,163: root: INFO: Current backtesting datetime 2021-09-23 08:30:00-05:00 +2024-04-13 18:38:14,164: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:14 +2024-04-13 18:38:14,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:14,165: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:14,165: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:14,165: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:14,165: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:15,670: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:15,671: root: INFO: Current backtesting datetime 2021-09-23 15:00:00-05:00 +2024-04-13 18:38:15,671: root: INFO: Current backtesting datetime 2021-09-24 08:30:00-05:00 +2024-04-13 18:38:15,672: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:15 +2024-04-13 18:38:15,672: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:15,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:15,673: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:15,674: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:15,674: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:21,657: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:21,658: root: INFO: Current backtesting datetime 2021-09-24 15:00:00-05:00 +2024-04-13 18:38:21,658: root: INFO: Current backtesting datetime 2021-09-25 08:30:00-05:00 +2024-04-13 18:38:21,659: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:38:21,660: root: INFO: Current backtesting datetime 2021-09-25 08:29:00-05:00 +2024-04-13 18:38:21,661: root: INFO: Current backtesting datetime 2021-09-25 08:29:00-05:00 +2024-04-13 18:38:21,661: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:38:21,662: root: INFO: Current backtesting datetime 2021-09-27 07:30:00-05:00 +2024-04-13 18:38:21,663: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:38:21,664: root: INFO: Current backtesting datetime 2021-09-27 08:30:00-05:00 +2024-04-13 18:38:21,664: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:38:21,665: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:21 +2024-04-13 18:38:21,665: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:21,666: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:21,666: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:21,666: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:21,666: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:23,827: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:23,828: root: INFO: Current backtesting datetime 2021-09-27 15:00:00-05:00 +2024-04-13 18:38:23,828: root: INFO: Current backtesting datetime 2021-09-28 08:30:00-05:00 +2024-04-13 18:38:23,829: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:23 +2024-04-13 18:38:23,829: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:23,829: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:23,830: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:23,830: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:23,830: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:26,430: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:26,431: root: INFO: Current backtesting datetime 2021-09-28 15:00:00-05:00 +2024-04-13 18:38:26,431: root: INFO: Current backtesting datetime 2021-09-29 08:30:00-05:00 +2024-04-13 18:38:26,432: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:26 +2024-04-13 18:38:26,432: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:26,433: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:26,433: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:26,434: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:26,434: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:28,064: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:28,065: root: INFO: Current backtesting datetime 2021-09-29 15:00:00-05:00 +2024-04-13 18:38:28,065: root: INFO: Current backtesting datetime 2021-09-30 08:30:00-05:00 +2024-04-13 18:38:28,066: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:28 +2024-04-13 18:38:28,066: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:28,067: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:28,067: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:28,067: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:28,067: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:30,094: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:30,095: root: INFO: Current backtesting datetime 2021-09-30 15:00:00-05:00 +2024-04-13 18:38:30,095: root: INFO: Current backtesting datetime 2021-10-01 08:30:00-05:00 +2024-04-13 18:38:30,095: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:30 +2024-04-13 18:38:30,096: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:30,096: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:30,097: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:30,097: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:30,097: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:31,497: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:31,498: root: INFO: Current backtesting datetime 2021-10-01 15:00:00-05:00 +2024-04-13 18:38:31,498: root: INFO: Current backtesting datetime 2021-10-02 08:30:00-05:00 +2024-04-13 18:38:31,499: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:38:31,501: root: INFO: Current backtesting datetime 2021-10-02 08:29:00-05:00 +2024-04-13 18:38:31,502: root: INFO: Current backtesting datetime 2021-10-02 08:29:00-05:00 +2024-04-13 18:38:31,502: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:38:31,503: root: INFO: Current backtesting datetime 2021-10-04 07:30:00-05:00 +2024-04-13 18:38:31,503: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:38:31,504: root: INFO: Current backtesting datetime 2021-10-04 08:30:00-05:00 +2024-04-13 18:38:31,504: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:38:31,505: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:31 +2024-04-13 18:38:31,505: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:31,506: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:31,506: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:31,507: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:31,507: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:33,275: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:33,277: root: INFO: Current backtesting datetime 2021-10-04 15:00:00-05:00 +2024-04-13 18:38:33,277: root: INFO: Current backtesting datetime 2021-10-05 08:30:00-05:00 +2024-04-13 18:38:33,277: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:33 +2024-04-13 18:38:33,277: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:33,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:33,278: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:33,278: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:33,279: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:34,948: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:34,949: root: INFO: Current backtesting datetime 2021-10-05 15:00:00-05:00 +2024-04-13 18:38:34,950: root: INFO: Current backtesting datetime 2021-10-06 08:30:00-05:00 +2024-04-13 18:38:34,950: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:34 +2024-04-13 18:38:34,950: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:34,951: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:34,951: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:34,952: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:34,952: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:36,747: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:36,748: root: INFO: Current backtesting datetime 2021-10-06 15:00:00-05:00 +2024-04-13 18:38:36,748: root: INFO: Current backtesting datetime 2021-10-07 08:30:00-05:00 +2024-04-13 18:38:36,748: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:36 +2024-04-13 18:38:36,749: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:36,749: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:36,750: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:36,750: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:36,750: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:38,168: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:38,169: root: INFO: Current backtesting datetime 2021-10-07 15:00:00-05:00 +2024-04-13 18:38:38,169: root: INFO: Current backtesting datetime 2021-10-08 08:30:00-05:00 +2024-04-13 18:38:38,170: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:38 +2024-04-13 18:38:38,170: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:38,171: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:38,171: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:38,171: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:38,171: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:39,265: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:39,266: root: INFO: Current backtesting datetime 2021-10-08 15:00:00-05:00 +2024-04-13 18:38:39,266: root: INFO: Current backtesting datetime 2021-10-09 08:30:00-05:00 +2024-04-13 18:38:39,267: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:38:39,268: root: INFO: Current backtesting datetime 2021-10-09 08:29:00-05:00 +2024-04-13 18:38:39,269: root: INFO: Current backtesting datetime 2021-10-09 08:29:00-05:00 +2024-04-13 18:38:39,269: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:38:39,270: root: INFO: Current backtesting datetime 2021-10-11 07:30:00-05:00 +2024-04-13 18:38:39,270: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:38:39,271: root: INFO: Current backtesting datetime 2021-10-11 08:30:00-05:00 +2024-04-13 18:38:39,271: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:38:39,272: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:39 +2024-04-13 18:38:39,272: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:39,273: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:39,273: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:39,274: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:39,274: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:40,320: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:40,321: root: INFO: Current backtesting datetime 2021-10-11 15:00:00-05:00 +2024-04-13 18:38:40,321: root: INFO: Current backtesting datetime 2021-10-12 08:30:00-05:00 +2024-04-13 18:38:40,321: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:40 +2024-04-13 18:38:40,322: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:40,322: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:40,323: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:40,323: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:40,323: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:41,961: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:41,961: root: INFO: Current backtesting datetime 2021-10-12 15:00:00-05:00 +2024-04-13 18:38:41,962: root: INFO: Current backtesting datetime 2021-10-13 08:30:00-05:00 +2024-04-13 18:38:41,962: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:41 +2024-04-13 18:38:41,962: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:41,963: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:41,963: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:41,964: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:41,964: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:43,555: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:43,556: root: INFO: Current backtesting datetime 2021-10-13 15:00:00-05:00 +2024-04-13 18:38:43,556: root: INFO: Current backtesting datetime 2021-10-14 08:30:00-05:00 +2024-04-13 18:38:43,557: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:43 +2024-04-13 18:38:43,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:43,558: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:43,558: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:43,558: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:43,558: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:44,924: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:44,925: root: INFO: Current backtesting datetime 2021-10-14 15:00:00-05:00 +2024-04-13 18:38:44,925: root: INFO: Current backtesting datetime 2021-10-15 08:30:00-05:00 +2024-04-13 18:38:44,926: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:44 +2024-04-13 18:38:44,926: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:44,927: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:44,927: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:44,927: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:44,927: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:45,880: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:45,881: root: INFO: Current backtesting datetime 2021-10-15 15:00:00-05:00 +2024-04-13 18:38:45,882: root: INFO: Current backtesting datetime 2021-10-16 08:30:00-05:00 +2024-04-13 18:38:45,882: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:38:45,883: root: INFO: Current backtesting datetime 2021-10-16 08:29:00-05:00 +2024-04-13 18:38:45,884: root: INFO: Current backtesting datetime 2021-10-16 08:29:00-05:00 +2024-04-13 18:38:45,884: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:38:45,885: root: INFO: Current backtesting datetime 2021-10-18 07:30:00-05:00 +2024-04-13 18:38:45,886: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:38:45,887: root: INFO: Current backtesting datetime 2021-10-18 08:30:00-05:00 +2024-04-13 18:38:45,887: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:38:45,888: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:45 +2024-04-13 18:38:45,888: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:45,888: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:45,889: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:45,889: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:45,889: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:46,867: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:46,868: root: INFO: Current backtesting datetime 2021-10-18 15:00:00-05:00 +2024-04-13 18:38:46,868: root: INFO: Current backtesting datetime 2021-10-19 08:30:00-05:00 +2024-04-13 18:38:46,869: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:46 +2024-04-13 18:38:46,869: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:46,870: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:46,870: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:46,870: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:46,870: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:48,631: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:48,632: root: INFO: Current backtesting datetime 2021-10-19 15:00:00-05:00 +2024-04-13 18:38:48,632: root: INFO: Current backtesting datetime 2021-10-20 08:30:00-05:00 +2024-04-13 18:38:48,632: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:48 +2024-04-13 18:38:48,633: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:48,633: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:48,634: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:48,634: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:48,634: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:49,630: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:49,631: root: INFO: Current backtesting datetime 2021-10-20 15:00:00-05:00 +2024-04-13 18:38:49,631: root: INFO: Current backtesting datetime 2021-10-21 08:30:00-05:00 +2024-04-13 18:38:49,631: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:49 +2024-04-13 18:38:49,632: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:49,632: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:49,633: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:49,633: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:49,633: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:51,036: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:51,037: root: INFO: Current backtesting datetime 2021-10-21 15:00:00-05:00 +2024-04-13 18:38:51,037: root: INFO: Current backtesting datetime 2021-10-22 08:30:00-05:00 +2024-04-13 18:38:51,038: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:51 +2024-04-13 18:38:51,038: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:51,039: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:51,039: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:51,039: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:51,039: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:53,672: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:53,673: root: INFO: Current backtesting datetime 2021-10-22 15:00:00-05:00 +2024-04-13 18:38:53,673: root: INFO: Current backtesting datetime 2021-10-23 08:30:00-05:00 +2024-04-13 18:38:53,674: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:38:53,675: root: INFO: Current backtesting datetime 2021-10-23 08:29:00-05:00 +2024-04-13 18:38:53,677: root: INFO: Current backtesting datetime 2021-10-23 08:29:00-05:00 +2024-04-13 18:38:53,677: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:38:53,677: root: INFO: Current backtesting datetime 2021-10-25 07:30:00-05:00 +2024-04-13 18:38:53,678: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:38:53,678: root: INFO: Current backtesting datetime 2021-10-25 08:30:00-05:00 +2024-04-13 18:38:53,679: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:38:53,680: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:53 +2024-04-13 18:38:53,680: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:53,680: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:53,681: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:53,681: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:53,681: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:56,737: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:56,738: root: INFO: Current backtesting datetime 2021-10-25 15:00:00-05:00 +2024-04-13 18:38:56,738: root: INFO: Current backtesting datetime 2021-10-26 08:30:00-05:00 +2024-04-13 18:38:56,739: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:56 +2024-04-13 18:38:56,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:56,740: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:56,740: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:56,740: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:56,741: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:58,485: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:58,486: root: INFO: Current backtesting datetime 2021-10-26 15:00:00-05:00 +2024-04-13 18:38:58,486: root: INFO: Current backtesting datetime 2021-10-27 08:30:00-05:00 +2024-04-13 18:38:58,487: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:58 +2024-04-13 18:38:58,487: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:58,487: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:58,488: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:58,488: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:58,488: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:38:59,531: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:38:59,532: root: INFO: Current backtesting datetime 2021-10-27 15:00:00-05:00 +2024-04-13 18:38:59,533: root: INFO: Current backtesting datetime 2021-10-28 08:30:00-05:00 +2024-04-13 18:38:59,533: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:38:59 +2024-04-13 18:38:59,533: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:59,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:38:59,534: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:38:59,535: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:38:59,535: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:01,160: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:01,161: root: INFO: Current backtesting datetime 2021-10-28 15:00:00-05:00 +2024-04-13 18:39:01,162: root: INFO: Current backtesting datetime 2021-10-29 08:30:00-05:00 +2024-04-13 18:39:01,162: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:01 +2024-04-13 18:39:01,162: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:01,163: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:01,163: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:01,164: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:01,164: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:03,198: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:03,199: root: INFO: Current backtesting datetime 2021-10-29 15:00:00-05:00 +2024-04-13 18:39:03,200: root: INFO: Current backtesting datetime 2021-10-30 08:30:00-05:00 +2024-04-13 18:39:03,200: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:39:03,201: root: INFO: Current backtesting datetime 2021-10-30 08:29:00-05:00 +2024-04-13 18:39:03,203: root: INFO: Current backtesting datetime 2021-10-30 08:29:00-05:00 +2024-04-13 18:39:03,203: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:39:03,203: root: INFO: Current backtesting datetime 2021-11-01 07:30:00-05:00 +2024-04-13 18:39:03,204: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:39:03,205: root: INFO: Current backtesting datetime 2021-11-01 08:30:00-05:00 +2024-04-13 18:39:03,205: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:39:03,206: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:03 +2024-04-13 18:39:03,206: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:03,207: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:03,207: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:03,208: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:03,208: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:05,018: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:05,019: root: INFO: Current backtesting datetime 2021-11-01 15:00:00-05:00 +2024-04-13 18:39:05,020: root: INFO: Current backtesting datetime 2021-11-02 08:30:00-05:00 +2024-04-13 18:39:05,020: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:05 +2024-04-13 18:39:05,020: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:05,021: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:05,021: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:05,022: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:05,022: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:06,473: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:06,473: root: INFO: Current backtesting datetime 2021-11-02 15:00:00-05:00 +2024-04-13 18:39:06,474: root: INFO: Current backtesting datetime 2021-11-03 08:30:00-05:00 +2024-04-13 18:39:06,474: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:06 +2024-04-13 18:39:06,474: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:06,475: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:06,475: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:06,476: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:06,476: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:08,598: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:08,599: root: INFO: Current backtesting datetime 2021-11-03 15:00:00-05:00 +2024-04-13 18:39:08,600: root: INFO: Current backtesting datetime 2021-11-04 08:30:00-05:00 +2024-04-13 18:39:08,600: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:08 +2024-04-13 18:39:08,600: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:08,601: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:08,601: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:08,602: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:08,602: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:09,810: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:09,811: root: INFO: Current backtesting datetime 2021-11-04 15:00:00-05:00 +2024-04-13 18:39:09,811: root: INFO: Current backtesting datetime 2021-11-05 08:30:00-05:00 +2024-04-13 18:39:09,811: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:09 +2024-04-13 18:39:09,812: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:09,812: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:09,813: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:09,813: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:09,813: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:11,540: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:11,541: root: INFO: Current backtesting datetime 2021-11-05 15:00:00-05:00 +2024-04-13 18:39:11,541: root: INFO: Current backtesting datetime 2021-11-06 08:30:00-05:00 +2024-04-13 18:39:11,541: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:39:11,543: root: INFO: Current backtesting datetime 2021-11-06 08:29:00-05:00 +2024-04-13 18:39:11,544: root: INFO: Current backtesting datetime 2021-11-06 08:29:00-05:00 +2024-04-13 18:39:11,544: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:39:11,545: root: INFO: Current backtesting datetime 2021-11-08 08:30:00-05:00 +2024-04-13 18:39:11,546: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:39:11,547: root: INFO: Current backtesting datetime 2021-11-08 09:30:00-05:00 +2024-04-13 18:39:11,547: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:39:11,548: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:11 +2024-04-13 18:39:11,548: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:11,549: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:11,549: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:11,550: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:11,550: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:13,578: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:13,580: root: INFO: Current backtesting datetime 2021-11-08 16:00:00-05:00 +2024-04-13 18:39:13,580: root: INFO: Current backtesting datetime 2021-11-09 09:30:00-05:00 +2024-04-13 18:39:13,581: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:13 +2024-04-13 18:39:13,581: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:13,582: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:13,582: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:13,582: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:13,582: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:15,704: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:15,705: root: INFO: Current backtesting datetime 2021-11-09 16:00:00-05:00 +2024-04-13 18:39:15,706: root: INFO: Current backtesting datetime 2021-11-10 09:30:00-05:00 +2024-04-13 18:39:15,706: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:15 +2024-04-13 18:39:15,706: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:15,707: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:15,707: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:15,708: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:15,708: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:19,056: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:19,057: root: INFO: Current backtesting datetime 2021-11-10 16:00:00-05:00 +2024-04-13 18:39:19,058: root: INFO: Current backtesting datetime 2021-11-11 09:30:00-05:00 +2024-04-13 18:39:19,058: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:19 +2024-04-13 18:39:19,058: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:19,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:19,059: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:19,060: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:19,060: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:21,232: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:21,232: root: INFO: Current backtesting datetime 2021-11-11 16:00:00-05:00 +2024-04-13 18:39:21,233: root: INFO: Current backtesting datetime 2021-11-12 09:30:00-05:00 +2024-04-13 18:39:21,233: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:21 +2024-04-13 18:39:21,233: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:21,234: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:21,234: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:21,235: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:21,235: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:24,026: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:24,027: root: INFO: Current backtesting datetime 2021-11-12 16:00:00-05:00 +2024-04-13 18:39:24,028: root: INFO: Current backtesting datetime 2021-11-13 09:30:00-05:00 +2024-04-13 18:39:24,028: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:39:24,029: root: INFO: Current backtesting datetime 2021-11-13 09:29:00-05:00 +2024-04-13 18:39:24,031: root: INFO: Current backtesting datetime 2021-11-13 09:29:00-05:00 +2024-04-13 18:39:24,031: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:39:24,032: root: INFO: Current backtesting datetime 2021-11-15 08:30:00-05:00 +2024-04-13 18:39:24,032: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:39:24,033: root: INFO: Current backtesting datetime 2021-11-15 09:30:00-05:00 +2024-04-13 18:39:24,033: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:39:24,034: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:24 +2024-04-13 18:39:24,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:24,035: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:24,035: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:24,035: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:24,035: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:27,310: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:27,311: root: INFO: Current backtesting datetime 2021-11-15 16:00:00-05:00 +2024-04-13 18:39:27,311: root: INFO: Current backtesting datetime 2021-11-16 09:30:00-05:00 +2024-04-13 18:39:27,312: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:27 +2024-04-13 18:39:27,312: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:27,313: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:27,313: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:27,313: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:27,313: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:28,993: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:28,995: root: INFO: Current backtesting datetime 2021-11-16 16:00:00-05:00 +2024-04-13 18:39:28,995: root: INFO: Current backtesting datetime 2021-11-17 09:30:00-05:00 +2024-04-13 18:39:28,995: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:28 +2024-04-13 18:39:28,995: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:28,996: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:28,996: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:28,997: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:28,997: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:30,863: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:30,864: root: INFO: Current backtesting datetime 2021-11-17 16:00:00-05:00 +2024-04-13 18:39:30,864: root: INFO: Current backtesting datetime 2021-11-18 09:30:00-05:00 +2024-04-13 18:39:30,865: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:30 +2024-04-13 18:39:30,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:30,865: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:30,866: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:30,866: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:30,866: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:32,040: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:32,041: root: INFO: Current backtesting datetime 2021-11-18 16:00:00-05:00 +2024-04-13 18:39:32,041: root: INFO: Current backtesting datetime 2021-11-19 09:30:00-05:00 +2024-04-13 18:39:32,042: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:32 +2024-04-13 18:39:32,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:32,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:32,043: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:32,043: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:32,043: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:34,759: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:34,760: root: INFO: Current backtesting datetime 2021-11-19 16:00:00-05:00 +2024-04-13 18:39:34,761: root: INFO: Current backtesting datetime 2021-11-20 09:30:00-05:00 +2024-04-13 18:39:34,761: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:39:34,763: root: INFO: Current backtesting datetime 2021-11-20 09:29:00-05:00 +2024-04-13 18:39:34,764: root: INFO: Current backtesting datetime 2021-11-20 09:29:00-05:00 +2024-04-13 18:39:34,764: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:39:34,765: root: INFO: Current backtesting datetime 2021-11-22 08:30:00-05:00 +2024-04-13 18:39:34,765: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:39:34,766: root: INFO: Current backtesting datetime 2021-11-22 09:30:00-05:00 +2024-04-13 18:39:34,766: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:39:34,767: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:34 +2024-04-13 18:39:34,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:34,768: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:34,768: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:34,769: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:34,769: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:36,177: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:36,178: root: INFO: Current backtesting datetime 2021-11-22 16:00:00-05:00 +2024-04-13 18:39:36,178: root: INFO: Current backtesting datetime 2021-11-23 09:30:00-05:00 +2024-04-13 18:39:36,179: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:36 +2024-04-13 18:39:36,179: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:36,180: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:36,180: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:36,180: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:36,181: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:37,599: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:37,600: root: INFO: Current backtesting datetime 2021-11-23 16:00:00-05:00 +2024-04-13 18:39:37,600: root: INFO: Current backtesting datetime 2021-11-24 09:30:00-05:00 +2024-04-13 18:39:37,601: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:37 +2024-04-13 18:39:37,601: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:37,602: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:37,602: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:37,602: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:37,602: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:40,222: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:40,223: root: INFO: Current backtesting datetime 2021-11-24 16:00:00-05:00 +2024-04-13 18:39:40,223: root: INFO: Current backtesting datetime 2021-11-25 09:30:00-05:00 +2024-04-13 18:39:40,224: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:39:40,225: root: INFO: Current backtesting datetime 2021-11-25 09:29:00-05:00 +2024-04-13 18:39:40,226: root: INFO: Current backtesting datetime 2021-11-25 09:29:00-05:00 +2024-04-13 18:39:40,226: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:39:40,227: root: INFO: Current backtesting datetime 2021-11-26 08:30:00-05:00 +2024-04-13 18:39:40,227: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:39:40,229: root: INFO: Current backtesting datetime 2021-11-26 09:30:00-05:00 +2024-04-13 18:39:40,229: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:39:40,230: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:40 +2024-04-13 18:39:40,230: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:40,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:40,231: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:40,232: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:40,232: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:42,270: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:42,271: root: INFO: Current backtesting datetime 2021-11-26 13:00:00-05:00 +2024-04-13 18:39:42,271: root: INFO: Current backtesting datetime 2021-11-27 09:30:00-05:00 +2024-04-13 18:39:42,272: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:39:42,273: root: INFO: Current backtesting datetime 2021-11-27 09:29:00-05:00 +2024-04-13 18:39:42,275: root: INFO: Current backtesting datetime 2021-11-27 09:29:00-05:00 +2024-04-13 18:39:42,275: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:39:42,276: root: INFO: Current backtesting datetime 2021-11-29 08:30:00-05:00 +2024-04-13 18:39:42,276: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:39:42,277: root: INFO: Current backtesting datetime 2021-11-29 09:30:00-05:00 +2024-04-13 18:39:42,277: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:39:42,278: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:42 +2024-04-13 18:39:42,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:42,279: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:42,279: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:42,280: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:42,280: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:43,744: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:43,745: root: INFO: Current backtesting datetime 2021-11-29 16:00:00-05:00 +2024-04-13 18:39:43,745: root: INFO: Current backtesting datetime 2021-11-30 09:30:00-05:00 +2024-04-13 18:39:43,746: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:43 +2024-04-13 18:39:43,746: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:43,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:43,747: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:43,748: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:43,748: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:44,684: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:44,685: root: INFO: Current backtesting datetime 2021-11-30 16:00:00-05:00 +2024-04-13 18:39:44,685: root: INFO: Current backtesting datetime 2021-12-01 09:30:00-05:00 +2024-04-13 18:39:44,686: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:44 +2024-04-13 18:39:44,686: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:44,687: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:44,687: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:44,687: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:44,687: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:46,053: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:46,054: root: INFO: Current backtesting datetime 2021-12-01 16:00:00-05:00 +2024-04-13 18:39:46,054: root: INFO: Current backtesting datetime 2021-12-02 09:30:00-05:00 +2024-04-13 18:39:46,055: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:46 +2024-04-13 18:39:46,055: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:46,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:46,056: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:46,056: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:46,056: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:47,969: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:47,970: root: INFO: Current backtesting datetime 2021-12-02 16:00:00-05:00 +2024-04-13 18:39:47,970: root: INFO: Current backtesting datetime 2021-12-03 09:30:00-05:00 +2024-04-13 18:39:47,971: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:47 +2024-04-13 18:39:47,971: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:47,972: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:47,972: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:47,973: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:47,973: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:49,569: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:49,570: root: INFO: Current backtesting datetime 2021-12-03 16:00:00-05:00 +2024-04-13 18:39:49,570: root: INFO: Current backtesting datetime 2021-12-04 09:30:00-05:00 +2024-04-13 18:39:49,571: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:39:49,573: root: INFO: Current backtesting datetime 2021-12-04 09:29:00-05:00 +2024-04-13 18:39:49,574: root: INFO: Current backtesting datetime 2021-12-04 09:29:00-05:00 +2024-04-13 18:39:49,574: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:39:49,575: root: INFO: Current backtesting datetime 2021-12-06 08:30:00-05:00 +2024-04-13 18:39:49,575: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:39:49,576: root: INFO: Current backtesting datetime 2021-12-06 09:30:00-05:00 +2024-04-13 18:39:49,576: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:39:49,577: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:49 +2024-04-13 18:39:49,577: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:49,578: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:49,578: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:49,579: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:49,579: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:51,161: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:51,162: root: INFO: Current backtesting datetime 2021-12-06 16:00:00-05:00 +2024-04-13 18:39:51,162: root: INFO: Current backtesting datetime 2021-12-07 09:30:00-05:00 +2024-04-13 18:39:51,162: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:51 +2024-04-13 18:39:51,163: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:51,163: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:51,164: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:51,164: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:51,164: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:54,506: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:54,507: root: INFO: Current backtesting datetime 2021-12-07 16:00:00-05:00 +2024-04-13 18:39:54,508: root: INFO: Current backtesting datetime 2021-12-08 09:30:00-05:00 +2024-04-13 18:39:54,508: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:54 +2024-04-13 18:39:54,508: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:54,509: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:54,509: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:54,510: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:54,510: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:56,396: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:56,397: root: INFO: Current backtesting datetime 2021-12-08 16:00:00-05:00 +2024-04-13 18:39:56,397: root: INFO: Current backtesting datetime 2021-12-09 09:30:00-05:00 +2024-04-13 18:39:56,398: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:56 +2024-04-13 18:39:56,398: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:56,399: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:56,399: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:56,399: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:56,399: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:57,673: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:57,674: root: INFO: Current backtesting datetime 2021-12-09 16:00:00-05:00 +2024-04-13 18:39:57,675: root: INFO: Current backtesting datetime 2021-12-10 09:30:00-05:00 +2024-04-13 18:39:57,675: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:57 +2024-04-13 18:39:57,675: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:57,676: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:57,676: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:57,677: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:57,677: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:39:59,287: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:39:59,288: root: INFO: Current backtesting datetime 2021-12-10 16:00:00-05:00 +2024-04-13 18:39:59,289: root: INFO: Current backtesting datetime 2021-12-11 09:30:00-05:00 +2024-04-13 18:39:59,289: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:39:59,290: root: INFO: Current backtesting datetime 2021-12-11 09:29:00-05:00 +2024-04-13 18:39:59,292: root: INFO: Current backtesting datetime 2021-12-11 09:29:00-05:00 +2024-04-13 18:39:59,292: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:39:59,293: root: INFO: Current backtesting datetime 2021-12-13 08:30:00-05:00 +2024-04-13 18:39:59,293: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:39:59,294: root: INFO: Current backtesting datetime 2021-12-13 09:30:00-05:00 +2024-04-13 18:39:59,294: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:39:59,295: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:39:59 +2024-04-13 18:39:59,295: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:59,296: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:39:59,296: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:39:59,297: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:39:59,297: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:02,316: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:02,317: root: INFO: Current backtesting datetime 2021-12-13 16:00:00-05:00 +2024-04-13 18:40:02,317: root: INFO: Current backtesting datetime 2021-12-14 09:30:00-05:00 +2024-04-13 18:40:02,318: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:02 +2024-04-13 18:40:02,318: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:02,319: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:02,319: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:02,320: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:02,320: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:03,775: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:03,776: root: INFO: Current backtesting datetime 2021-12-14 16:00:00-05:00 +2024-04-13 18:40:03,776: root: INFO: Current backtesting datetime 2021-12-15 09:30:00-05:00 +2024-04-13 18:40:03,777: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:03 +2024-04-13 18:40:03,777: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:03,777: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:03,778: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:03,778: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:03,778: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:05,016: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:05,017: root: INFO: Current backtesting datetime 2021-12-15 16:00:00-05:00 +2024-04-13 18:40:05,017: root: INFO: Current backtesting datetime 2021-12-16 09:30:00-05:00 +2024-04-13 18:40:05,017: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:05 +2024-04-13 18:40:05,018: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:05,018: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:05,018: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:05,019: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:05,019: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:06,830: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:06,832: root: INFO: Current backtesting datetime 2021-12-16 16:00:00-05:00 +2024-04-13 18:40:06,832: root: INFO: Current backtesting datetime 2021-12-17 09:30:00-05:00 +2024-04-13 18:40:06,833: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:06 +2024-04-13 18:40:06,833: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:06,833: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:06,834: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:06,834: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:06,834: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:08,953: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:08,954: root: INFO: Current backtesting datetime 2021-12-17 16:00:00-05:00 +2024-04-13 18:40:08,954: root: INFO: Current backtesting datetime 2021-12-18 09:30:00-05:00 +2024-04-13 18:40:08,954: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:40:08,956: root: INFO: Current backtesting datetime 2021-12-18 09:29:00-05:00 +2024-04-13 18:40:08,957: root: INFO: Current backtesting datetime 2021-12-18 09:29:00-05:00 +2024-04-13 18:40:08,957: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:40:08,958: root: INFO: Current backtesting datetime 2021-12-20 08:30:00-05:00 +2024-04-13 18:40:08,959: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:40:08,959: root: INFO: Current backtesting datetime 2021-12-20 09:30:00-05:00 +2024-04-13 18:40:08,959: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:40:08,960: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:08 +2024-04-13 18:40:08,961: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:08,961: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:08,962: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:08,962: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:08,962: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:10,147: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:10,148: root: INFO: Current backtesting datetime 2021-12-20 16:00:00-05:00 +2024-04-13 18:40:10,148: root: INFO: Current backtesting datetime 2021-12-21 09:30:00-05:00 +2024-04-13 18:40:10,149: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:10 +2024-04-13 18:40:10,149: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:10,149: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:10,150: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:10,150: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:10,150: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:11,617: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:11,618: root: INFO: Current backtesting datetime 2021-12-21 16:00:00-05:00 +2024-04-13 18:40:11,618: root: INFO: Current backtesting datetime 2021-12-22 09:30:00-05:00 +2024-04-13 18:40:11,619: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:11 +2024-04-13 18:40:11,619: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:11,620: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:11,620: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:11,621: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:11,621: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:13,347: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:13,348: root: INFO: Current backtesting datetime 2021-12-22 16:00:00-05:00 +2024-04-13 18:40:13,349: root: INFO: Current backtesting datetime 2021-12-23 09:30:00-05:00 +2024-04-13 18:40:13,349: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:13 +2024-04-13 18:40:13,349: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:13,350: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:13,350: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:13,351: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:13,351: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:17,564: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:17,565: root: INFO: Current backtesting datetime 2021-12-23 16:00:00-05:00 +2024-04-13 18:40:17,565: root: INFO: Current backtesting datetime 2021-12-24 09:30:00-05:00 +2024-04-13 18:40:17,565: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:40:17,567: root: INFO: Current backtesting datetime 2021-12-24 09:29:00-05:00 +2024-04-13 18:40:17,568: root: INFO: Current backtesting datetime 2021-12-24 09:29:00-05:00 +2024-04-13 18:40:17,568: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:40:17,569: root: INFO: Current backtesting datetime 2021-12-27 08:30:00-05:00 +2024-04-13 18:40:17,569: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:40:17,570: root: INFO: Current backtesting datetime 2021-12-27 09:30:00-05:00 +2024-04-13 18:40:17,570: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:40:17,571: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:17 +2024-04-13 18:40:17,572: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:17,572: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:17,573: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:17,573: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:17,573: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:19,445: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:19,446: root: INFO: Current backtesting datetime 2021-12-27 16:00:00-05:00 +2024-04-13 18:40:19,446: root: INFO: Current backtesting datetime 2021-12-28 09:30:00-05:00 +2024-04-13 18:40:19,447: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:19 +2024-04-13 18:40:19,447: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:19,447: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:19,448: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:19,448: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:19,448: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:21,288: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:21,289: root: INFO: Current backtesting datetime 2021-12-28 16:00:00-05:00 +2024-04-13 18:40:21,289: root: INFO: Current backtesting datetime 2021-12-29 09:30:00-05:00 +2024-04-13 18:40:21,290: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:21 +2024-04-13 18:40:21,290: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:21,291: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:21,291: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:21,291: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:21,291: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:23,484: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:23,485: root: INFO: Current backtesting datetime 2021-12-29 16:00:00-05:00 +2024-04-13 18:40:23,485: root: INFO: Current backtesting datetime 2021-12-30 09:30:00-05:00 +2024-04-13 18:40:23,486: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:23 +2024-04-13 18:40:23,486: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:23,487: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:23,487: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:23,488: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:23,488: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:26,649: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:26,650: root: INFO: Current backtesting datetime 2021-12-30 16:00:00-05:00 +2024-04-13 18:40:26,650: root: INFO: Current backtesting datetime 2021-12-31 09:30:00-05:00 +2024-04-13 18:40:26,651: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:26 +2024-04-13 18:40:26,651: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:26,652: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:26,652: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:26,652: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:26,652: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:29,428: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:29,429: root: INFO: Current backtesting datetime 2021-12-31 16:00:00-05:00 +2024-04-13 18:40:29,429: root: INFO: Current backtesting datetime 2022-01-01 09:30:00-05:00 +2024-04-13 18:40:29,430: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:40:29,431: root: INFO: Current backtesting datetime 2022-01-01 09:29:00-05:00 +2024-04-13 18:40:29,433: root: INFO: Current backtesting datetime 2022-01-01 09:29:00-05:00 +2024-04-13 18:40:29,433: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:40:29,433: root: INFO: Current backtesting datetime 2022-01-03 08:30:00-05:00 +2024-04-13 18:40:29,434: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:40:29,434: root: INFO: Current backtesting datetime 2022-01-03 09:30:00-05:00 +2024-04-13 18:40:29,434: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:40:29,436: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:29 +2024-04-13 18:40:29,436: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:29,436: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:29,437: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:29,437: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:29,437: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:30,981: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:30,982: root: INFO: Current backtesting datetime 2022-01-03 16:00:00-05:00 +2024-04-13 18:40:30,983: root: INFO: Current backtesting datetime 2022-01-04 09:30:00-05:00 +2024-04-13 18:40:30,983: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:30 +2024-04-13 18:40:30,983: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:30,984: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:30,984: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:30,985: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:30,985: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:32,433: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:32,434: root: INFO: Current backtesting datetime 2022-01-04 16:00:00-05:00 +2024-04-13 18:40:32,435: root: INFO: Current backtesting datetime 2022-01-05 09:30:00-05:00 +2024-04-13 18:40:32,435: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:32 +2024-04-13 18:40:32,435: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:32,436: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:32,436: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:32,437: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:32,437: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:34,521: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:34,522: root: INFO: Current backtesting datetime 2022-01-05 16:00:00-05:00 +2024-04-13 18:40:34,522: root: INFO: Current backtesting datetime 2022-01-06 09:30:00-05:00 +2024-04-13 18:40:34,522: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:34 +2024-04-13 18:40:34,522: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:34,523: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:34,523: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:34,524: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:34,524: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:35,720: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:35,721: root: INFO: Current backtesting datetime 2022-01-06 16:00:00-05:00 +2024-04-13 18:40:35,721: root: INFO: Current backtesting datetime 2022-01-07 09:30:00-05:00 +2024-04-13 18:40:35,722: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:35 +2024-04-13 18:40:35,722: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:35,723: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:35,723: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:35,723: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:35,723: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:36,716: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:36,717: root: INFO: Current backtesting datetime 2022-01-07 16:00:00-05:00 +2024-04-13 18:40:36,717: root: INFO: Current backtesting datetime 2022-01-08 09:30:00-05:00 +2024-04-13 18:40:36,718: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:40:36,720: root: INFO: Current backtesting datetime 2022-01-08 09:29:00-05:00 +2024-04-13 18:40:36,721: root: INFO: Current backtesting datetime 2022-01-08 09:29:00-05:00 +2024-04-13 18:40:36,721: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:40:36,722: root: INFO: Current backtesting datetime 2022-01-10 08:30:00-05:00 +2024-04-13 18:40:36,722: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:40:36,722: root: INFO: Current backtesting datetime 2022-01-10 09:30:00-05:00 +2024-04-13 18:40:36,722: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:40:36,723: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:36 +2024-04-13 18:40:36,723: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:36,724: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:36,724: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:36,725: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:36,725: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:37,769: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:37,770: root: INFO: Current backtesting datetime 2022-01-10 16:00:00-05:00 +2024-04-13 18:40:37,770: root: INFO: Current backtesting datetime 2022-01-11 09:30:00-05:00 +2024-04-13 18:40:37,771: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:37 +2024-04-13 18:40:37,771: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:37,772: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:37,772: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:37,773: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:37,773: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:39,099: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:39,099: root: INFO: Current backtesting datetime 2022-01-11 16:00:00-05:00 +2024-04-13 18:40:39,099: root: INFO: Current backtesting datetime 2022-01-12 09:30:00-05:00 +2024-04-13 18:40:39,099: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:39 +2024-04-13 18:40:39,099: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:39,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:39,101: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:39,102: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:39,102: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:40,301: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:40,302: root: INFO: Current backtesting datetime 2022-01-12 16:00:00-05:00 +2024-04-13 18:40:40,302: root: INFO: Current backtesting datetime 2022-01-13 09:30:00-05:00 +2024-04-13 18:40:40,303: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:40 +2024-04-13 18:40:40,303: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:40,304: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:40,304: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:40,304: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:40,304: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:43,200: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:43,201: root: INFO: Current backtesting datetime 2022-01-13 16:00:00-05:00 +2024-04-13 18:40:43,202: root: INFO: Current backtesting datetime 2022-01-14 09:30:00-05:00 +2024-04-13 18:40:43,202: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:43 +2024-04-13 18:40:43,202: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:43,203: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:43,203: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:43,204: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:43,204: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:45,476: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:45,477: root: INFO: Current backtesting datetime 2022-01-14 16:00:00-05:00 +2024-04-13 18:40:45,477: root: INFO: Current backtesting datetime 2022-01-15 09:30:00-05:00 +2024-04-13 18:40:45,477: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:40:45,479: root: INFO: Current backtesting datetime 2022-01-15 09:29:00-05:00 +2024-04-13 18:40:45,480: root: INFO: Current backtesting datetime 2022-01-15 09:29:00-05:00 +2024-04-13 18:40:45,480: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:40:45,481: root: INFO: Current backtesting datetime 2022-01-18 08:30:00-05:00 +2024-04-13 18:40:45,482: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:40:45,482: root: INFO: Current backtesting datetime 2022-01-18 09:30:00-05:00 +2024-04-13 18:40:45,482: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:40:45,484: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:45 +2024-04-13 18:40:45,484: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:45,484: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:45,485: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:45,485: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:45,485: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:46,825: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:46,826: root: INFO: Current backtesting datetime 2022-01-18 16:00:00-05:00 +2024-04-13 18:40:46,826: root: INFO: Current backtesting datetime 2022-01-19 09:30:00-05:00 +2024-04-13 18:40:46,826: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:46 +2024-04-13 18:40:46,826: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:46,827: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:46,827: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:46,828: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:46,828: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:48,136: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:48,137: root: INFO: Current backtesting datetime 2022-01-19 16:00:00-05:00 +2024-04-13 18:40:48,137: root: INFO: Current backtesting datetime 2022-01-20 09:30:00-05:00 +2024-04-13 18:40:48,137: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:48 +2024-04-13 18:40:48,137: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:48,138: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:48,138: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:48,139: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:48,139: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:49,077: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:49,078: root: INFO: Current backtesting datetime 2022-01-20 16:00:00-05:00 +2024-04-13 18:40:49,078: root: INFO: Current backtesting datetime 2022-01-21 09:30:00-05:00 +2024-04-13 18:40:49,079: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:49 +2024-04-13 18:40:49,079: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:49,080: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:49,080: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:49,081: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:49,081: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:50,311: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:50,312: root: INFO: Current backtesting datetime 2022-01-21 16:00:00-05:00 +2024-04-13 18:40:50,312: root: INFO: Current backtesting datetime 2022-01-22 09:30:00-05:00 +2024-04-13 18:40:50,312: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:40:50,314: root: INFO: Current backtesting datetime 2022-01-22 09:29:00-05:00 +2024-04-13 18:40:50,315: root: INFO: Current backtesting datetime 2022-01-22 09:29:00-05:00 +2024-04-13 18:40:50,315: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:40:50,316: root: INFO: Current backtesting datetime 2022-01-24 08:30:00-05:00 +2024-04-13 18:40:50,316: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:40:50,317: root: INFO: Current backtesting datetime 2022-01-24 09:30:00-05:00 +2024-04-13 18:40:50,317: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:40:50,319: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:50 +2024-04-13 18:40:50,319: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:50,319: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:50,320: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:50,320: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:50,320: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:51,350: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:51,351: root: INFO: Current backtesting datetime 2022-01-24 16:00:00-05:00 +2024-04-13 18:40:51,351: root: INFO: Current backtesting datetime 2022-01-25 09:30:00-05:00 +2024-04-13 18:40:51,352: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:51 +2024-04-13 18:40:51,352: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:51,353: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:51,353: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:51,353: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:51,353: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:52,357: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:52,358: root: INFO: Current backtesting datetime 2022-01-25 16:00:00-05:00 +2024-04-13 18:40:52,358: root: INFO: Current backtesting datetime 2022-01-26 09:30:00-05:00 +2024-04-13 18:40:52,358: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:52 +2024-04-13 18:40:52,359: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:52,359: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:52,360: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:52,360: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:52,360: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:53,717: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:53,718: root: INFO: Current backtesting datetime 2022-01-26 16:00:00-05:00 +2024-04-13 18:40:53,718: root: INFO: Current backtesting datetime 2022-01-27 09:30:00-05:00 +2024-04-13 18:40:53,719: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:53 +2024-04-13 18:40:53,719: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:53,720: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:53,720: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:53,720: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:53,720: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:55,162: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:55,163: root: INFO: Current backtesting datetime 2022-01-27 16:00:00-05:00 +2024-04-13 18:40:55,163: root: INFO: Current backtesting datetime 2022-01-28 09:30:00-05:00 +2024-04-13 18:40:55,164: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:55 +2024-04-13 18:40:55,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:55,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:55,165: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:55,165: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:55,165: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:56,602: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:56,603: root: INFO: Current backtesting datetime 2022-01-28 16:00:00-05:00 +2024-04-13 18:40:56,603: root: INFO: Current backtesting datetime 2022-01-29 09:30:00-05:00 +2024-04-13 18:40:56,603: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:40:56,605: root: INFO: Current backtesting datetime 2022-01-29 09:29:00-05:00 +2024-04-13 18:40:56,606: root: INFO: Current backtesting datetime 2022-01-29 09:29:00-05:00 +2024-04-13 18:40:56,606: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:40:56,607: root: INFO: Current backtesting datetime 2022-01-31 08:30:00-05:00 +2024-04-13 18:40:56,607: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:40:56,608: root: INFO: Current backtesting datetime 2022-01-31 09:30:00-05:00 +2024-04-13 18:40:56,608: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:40:56,609: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:56 +2024-04-13 18:40:56,609: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:56,609: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:56,610: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:56,610: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:56,610: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:58,166: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:58,167: root: INFO: Current backtesting datetime 2022-01-31 16:00:00-05:00 +2024-04-13 18:40:58,167: root: INFO: Current backtesting datetime 2022-02-01 09:30:00-05:00 +2024-04-13 18:40:58,168: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:58 +2024-04-13 18:40:58,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:58,169: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:58,169: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:58,169: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:58,170: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:40:59,492: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:40:59,493: root: INFO: Current backtesting datetime 2022-02-01 16:00:00-05:00 +2024-04-13 18:40:59,493: root: INFO: Current backtesting datetime 2022-02-02 09:30:00-05:00 +2024-04-13 18:40:59,494: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:40:59 +2024-04-13 18:40:59,494: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:59,495: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:40:59,495: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:40:59,495: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:40:59,496: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:00,980: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:00,981: root: INFO: Current backtesting datetime 2022-02-02 16:00:00-05:00 +2024-04-13 18:41:00,981: root: INFO: Current backtesting datetime 2022-02-03 09:30:00-05:00 +2024-04-13 18:41:00,981: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:00 +2024-04-13 18:41:00,981: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:00,982: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:00,983: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:00,983: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:00,983: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:02,091: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:02,092: root: INFO: Current backtesting datetime 2022-02-03 16:00:00-05:00 +2024-04-13 18:41:02,093: root: INFO: Current backtesting datetime 2022-02-04 09:30:00-05:00 +2024-04-13 18:41:02,093: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:02 +2024-04-13 18:41:02,093: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:02,094: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:02,094: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:02,095: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:02,095: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:03,135: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:03,136: root: INFO: Current backtesting datetime 2022-02-04 16:00:00-05:00 +2024-04-13 18:41:03,136: root: INFO: Current backtesting datetime 2022-02-05 09:30:00-05:00 +2024-04-13 18:41:03,137: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:03,138: root: INFO: Current backtesting datetime 2022-02-05 09:29:00-05:00 +2024-04-13 18:41:03,140: root: INFO: Current backtesting datetime 2022-02-05 09:29:00-05:00 +2024-04-13 18:41:03,140: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:03,140: root: INFO: Current backtesting datetime 2022-02-07 08:30:00-05:00 +2024-04-13 18:41:03,141: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:03,142: root: INFO: Current backtesting datetime 2022-02-07 09:30:00-05:00 +2024-04-13 18:41:03,142: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:03,143: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:03 +2024-04-13 18:41:03,143: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:03,144: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:03,144: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:03,144: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:03,144: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:05,149: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:05,150: root: INFO: Current backtesting datetime 2022-02-07 16:00:00-05:00 +2024-04-13 18:41:05,150: root: INFO: Current backtesting datetime 2022-02-08 09:30:00-05:00 +2024-04-13 18:41:05,151: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:05 +2024-04-13 18:41:05,151: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:05,151: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:05,152: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:05,152: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:05,152: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:05,913: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:05,914: root: INFO: Current backtesting datetime 2022-02-08 16:00:00-05:00 +2024-04-13 18:41:05,914: root: INFO: Current backtesting datetime 2022-02-09 09:30:00-05:00 +2024-04-13 18:41:05,914: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:05 +2024-04-13 18:41:05,914: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:05,915: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:05,915: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:05,916: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:05,916: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:06,632: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:06,633: root: INFO: Current backtesting datetime 2022-02-09 16:00:00-05:00 +2024-04-13 18:41:06,633: root: INFO: Current backtesting datetime 2022-02-10 09:30:00-05:00 +2024-04-13 18:41:06,633: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:06 +2024-04-13 18:41:06,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:06,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:06,635: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:06,635: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:06,635: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:07,823: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:07,824: root: INFO: Current backtesting datetime 2022-02-10 16:00:00-05:00 +2024-04-13 18:41:07,824: root: INFO: Current backtesting datetime 2022-02-11 09:30:00-05:00 +2024-04-13 18:41:07,825: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:07 +2024-04-13 18:41:07,825: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:07,826: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:07,826: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:07,826: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:07,826: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:08,697: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:08,697: root: INFO: Current backtesting datetime 2022-02-11 16:00:00-05:00 +2024-04-13 18:41:08,698: root: INFO: Current backtesting datetime 2022-02-12 09:30:00-05:00 +2024-04-13 18:41:08,698: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:08,700: root: INFO: Current backtesting datetime 2022-02-12 09:29:00-05:00 +2024-04-13 18:41:08,701: root: INFO: Current backtesting datetime 2022-02-12 09:29:00-05:00 +2024-04-13 18:41:08,701: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:08,702: root: INFO: Current backtesting datetime 2022-02-14 08:30:00-05:00 +2024-04-13 18:41:08,702: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:08,703: root: INFO: Current backtesting datetime 2022-02-14 09:30:00-05:00 +2024-04-13 18:41:08,703: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:08,704: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:08 +2024-04-13 18:41:08,704: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:08,705: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:08,705: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:08,706: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:08,706: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:09,411: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:09,412: root: INFO: Current backtesting datetime 2022-02-14 16:00:00-05:00 +2024-04-13 18:41:09,412: root: INFO: Current backtesting datetime 2022-02-15 09:30:00-05:00 +2024-04-13 18:41:09,413: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:09 +2024-04-13 18:41:09,413: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:09,414: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:09,414: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:09,415: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:09,415: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:09,951: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:09,952: root: INFO: Current backtesting datetime 2022-02-15 16:00:00-05:00 +2024-04-13 18:41:09,952: root: INFO: Current backtesting datetime 2022-02-16 09:30:00-05:00 +2024-04-13 18:41:09,952: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:09 +2024-04-13 18:41:09,952: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:09,953: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:09,953: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:09,954: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:09,954: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:10,506: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:10,507: root: INFO: Current backtesting datetime 2022-02-16 16:00:00-05:00 +2024-04-13 18:41:10,507: root: INFO: Current backtesting datetime 2022-02-17 09:30:00-05:00 +2024-04-13 18:41:10,508: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:10 +2024-04-13 18:41:10,508: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:10,509: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:10,509: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:10,510: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:10,510: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:11,077: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:11,079: root: INFO: Current backtesting datetime 2022-02-17 16:00:00-05:00 +2024-04-13 18:41:11,079: root: INFO: Current backtesting datetime 2022-02-18 09:30:00-05:00 +2024-04-13 18:41:11,079: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:11 +2024-04-13 18:41:11,079: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:11,080: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:11,080: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:11,081: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:11,081: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:12,399: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:12,400: root: INFO: Current backtesting datetime 2022-02-18 16:00:00-05:00 +2024-04-13 18:41:12,400: root: INFO: Current backtesting datetime 2022-02-19 09:30:00-05:00 +2024-04-13 18:41:12,400: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:12,402: root: INFO: Current backtesting datetime 2022-02-19 09:29:00-05:00 +2024-04-13 18:41:12,403: root: INFO: Current backtesting datetime 2022-02-19 09:29:00-05:00 +2024-04-13 18:41:12,403: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:12,404: root: INFO: Current backtesting datetime 2022-02-22 08:30:00-05:00 +2024-04-13 18:41:12,404: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:12,405: root: INFO: Current backtesting datetime 2022-02-22 09:30:00-05:00 +2024-04-13 18:41:12,405: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:12,406: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:12 +2024-04-13 18:41:12,406: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:12,407: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:12,407: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:12,408: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:12,408: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:13,766: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:13,767: root: INFO: Current backtesting datetime 2022-02-22 16:00:00-05:00 +2024-04-13 18:41:13,767: root: INFO: Current backtesting datetime 2022-02-23 09:30:00-05:00 +2024-04-13 18:41:13,768: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:13 +2024-04-13 18:41:13,768: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:13,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:13,769: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:13,769: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:13,769: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:14,971: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:14,972: root: INFO: Current backtesting datetime 2022-02-23 16:00:00-05:00 +2024-04-13 18:41:14,973: root: INFO: Current backtesting datetime 2022-02-24 09:30:00-05:00 +2024-04-13 18:41:14,974: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:14 +2024-04-13 18:41:14,974: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:14,974: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:14,974: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:14,975: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:14,975: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:15,818: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:15,818: root: INFO: Current backtesting datetime 2022-02-24 16:00:00-05:00 +2024-04-13 18:41:15,819: root: INFO: Current backtesting datetime 2022-02-25 09:30:00-05:00 +2024-04-13 18:41:15,819: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:15 +2024-04-13 18:41:15,819: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:15,820: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:15,820: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:15,821: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:15,821: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:16,801: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:16,802: root: INFO: Current backtesting datetime 2022-02-25 16:00:00-05:00 +2024-04-13 18:41:16,803: root: INFO: Current backtesting datetime 2022-02-26 09:30:00-05:00 +2024-04-13 18:41:16,803: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:16,804: root: INFO: Current backtesting datetime 2022-02-26 09:29:00-05:00 +2024-04-13 18:41:16,805: root: INFO: Current backtesting datetime 2022-02-26 09:29:00-05:00 +2024-04-13 18:41:16,805: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:16,806: root: INFO: Current backtesting datetime 2022-02-28 08:30:00-05:00 +2024-04-13 18:41:16,806: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:16,807: root: INFO: Current backtesting datetime 2022-02-28 09:30:00-05:00 +2024-04-13 18:41:16,807: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:16,808: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:16 +2024-04-13 18:41:16,808: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:16,809: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:16,809: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:16,810: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:16,810: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:17,649: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:17,650: root: INFO: Current backtesting datetime 2022-02-28 16:00:00-05:00 +2024-04-13 18:41:17,650: root: INFO: Current backtesting datetime 2022-03-01 09:30:00-05:00 +2024-04-13 18:41:17,650: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:17 +2024-04-13 18:41:17,651: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:17,651: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:17,652: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:17,652: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:17,652: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:19,439: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:19,440: root: INFO: Current backtesting datetime 2022-03-01 16:00:00-05:00 +2024-04-13 18:41:19,441: root: INFO: Current backtesting datetime 2022-03-02 09:30:00-05:00 +2024-04-13 18:41:19,441: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:19 +2024-04-13 18:41:19,441: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:19,442: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:19,442: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:19,443: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:19,443: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:20,751: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:20,752: root: INFO: Current backtesting datetime 2022-03-02 16:00:00-05:00 +2024-04-13 18:41:20,752: root: INFO: Current backtesting datetime 2022-03-03 09:30:00-05:00 +2024-04-13 18:41:20,752: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:20 +2024-04-13 18:41:20,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:20,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:20,754: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:20,754: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:20,754: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:22,100: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:22,102: root: INFO: Current backtesting datetime 2022-03-03 16:00:00-05:00 +2024-04-13 18:41:22,102: root: INFO: Current backtesting datetime 2022-03-04 09:30:00-05:00 +2024-04-13 18:41:22,102: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:22 +2024-04-13 18:41:22,102: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:22,103: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:22,103: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:22,104: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:22,104: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:24,281: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:24,282: root: INFO: Current backtesting datetime 2022-03-04 16:00:00-05:00 +2024-04-13 18:41:24,283: root: INFO: Current backtesting datetime 2022-03-05 09:30:00-05:00 +2024-04-13 18:41:24,283: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:24,284: root: INFO: Current backtesting datetime 2022-03-05 09:29:00-05:00 +2024-04-13 18:41:24,286: root: INFO: Current backtesting datetime 2022-03-05 09:29:00-05:00 +2024-04-13 18:41:24,286: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:24,287: root: INFO: Current backtesting datetime 2022-03-07 08:30:00-05:00 +2024-04-13 18:41:24,287: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:24,288: root: INFO: Current backtesting datetime 2022-03-07 09:30:00-05:00 +2024-04-13 18:41:24,288: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:24,289: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:24 +2024-04-13 18:41:24,289: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:24,290: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:24,290: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:24,291: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:24,291: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:25,373: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:25,374: root: INFO: Current backtesting datetime 2022-03-07 16:00:00-05:00 +2024-04-13 18:41:25,374: root: INFO: Current backtesting datetime 2022-03-08 09:30:00-05:00 +2024-04-13 18:41:25,375: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:25 +2024-04-13 18:41:25,375: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:25,376: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:25,376: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:25,376: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:25,376: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:26,632: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:26,633: root: INFO: Current backtesting datetime 2022-03-08 16:00:00-05:00 +2024-04-13 18:41:26,633: root: INFO: Current backtesting datetime 2022-03-09 09:30:00-05:00 +2024-04-13 18:41:26,633: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:26 +2024-04-13 18:41:26,633: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:26,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:26,634: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:26,635: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:26,635: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:28,136: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:28,137: root: INFO: Current backtesting datetime 2022-03-09 16:00:00-05:00 +2024-04-13 18:41:28,138: root: INFO: Current backtesting datetime 2022-03-10 09:30:00-05:00 +2024-04-13 18:41:28,138: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:28 +2024-04-13 18:41:28,138: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:28,139: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:28,139: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:28,140: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:28,140: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:30,462: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:30,462: root: INFO: Current backtesting datetime 2022-03-10 16:00:00-05:00 +2024-04-13 18:41:30,463: root: INFO: Current backtesting datetime 2022-03-11 09:30:00-05:00 +2024-04-13 18:41:30,463: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:30 +2024-04-13 18:41:30,463: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:30,464: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:30,464: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:30,465: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:30,465: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:32,400: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:32,401: root: INFO: Current backtesting datetime 2022-03-11 16:00:00-05:00 +2024-04-13 18:41:32,401: root: INFO: Current backtesting datetime 2022-03-12 09:30:00-05:00 +2024-04-13 18:41:32,402: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:32,403: root: INFO: Current backtesting datetime 2022-03-12 09:29:00-05:00 +2024-04-13 18:41:32,404: root: INFO: Current backtesting datetime 2022-03-12 09:29:00-05:00 +2024-04-13 18:41:32,405: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:32,406: root: INFO: Current backtesting datetime 2022-03-14 07:30:00-05:00 +2024-04-13 18:41:32,406: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:32,407: root: INFO: Current backtesting datetime 2022-03-14 08:30:00-05:00 +2024-04-13 18:41:32,407: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:32,408: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:32 +2024-04-13 18:41:32,409: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:32,409: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:32,410: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:32,410: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:32,410: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:33,150: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:33,151: root: INFO: Current backtesting datetime 2022-03-14 15:00:00-05:00 +2024-04-13 18:41:33,151: root: INFO: Current backtesting datetime 2022-03-15 08:30:00-05:00 +2024-04-13 18:41:33,151: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:33 +2024-04-13 18:41:33,152: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:33,152: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:33,153: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:33,153: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:33,153: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:33,851: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:33,852: root: INFO: Current backtesting datetime 2022-03-15 15:00:00-05:00 +2024-04-13 18:41:33,853: root: INFO: Current backtesting datetime 2022-03-16 08:30:00-05:00 +2024-04-13 18:41:33,853: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:33 +2024-04-13 18:41:33,853: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:33,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:33,854: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:33,855: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:33,855: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:34,393: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:34,394: root: INFO: Current backtesting datetime 2022-03-16 15:00:00-05:00 +2024-04-13 18:41:34,395: root: INFO: Current backtesting datetime 2022-03-17 08:30:00-05:00 +2024-04-13 18:41:34,395: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:34 +2024-04-13 18:41:34,395: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:34,396: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:34,396: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:34,396: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:34,397: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:34,916: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:34,917: root: INFO: Current backtesting datetime 2022-03-17 15:00:00-05:00 +2024-04-13 18:41:34,917: root: INFO: Current backtesting datetime 2022-03-18 08:30:00-05:00 +2024-04-13 18:41:34,918: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:34 +2024-04-13 18:41:34,918: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:34,919: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:34,919: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:34,919: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:34,920: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:35,435: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:35,436: root: INFO: Current backtesting datetime 2022-03-18 15:00:00-05:00 +2024-04-13 18:41:35,437: root: INFO: Current backtesting datetime 2022-03-19 08:30:00-05:00 +2024-04-13 18:41:35,437: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:35,438: root: INFO: Current backtesting datetime 2022-03-19 08:29:00-05:00 +2024-04-13 18:41:35,440: root: INFO: Current backtesting datetime 2022-03-19 08:29:00-05:00 +2024-04-13 18:41:35,440: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:35,441: root: INFO: Current backtesting datetime 2022-03-21 07:30:00-05:00 +2024-04-13 18:41:35,441: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:35,442: root: INFO: Current backtesting datetime 2022-03-21 08:30:00-05:00 +2024-04-13 18:41:35,442: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:35,443: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:35 +2024-04-13 18:41:35,443: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:35,444: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:35,444: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:35,444: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:35,444: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:36,158: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:36,159: root: INFO: Current backtesting datetime 2022-03-21 15:00:00-05:00 +2024-04-13 18:41:36,159: root: INFO: Current backtesting datetime 2022-03-22 08:30:00-05:00 +2024-04-13 18:41:36,160: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:36 +2024-04-13 18:41:36,160: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:36,161: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:36,161: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:36,161: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:36,161: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:36,945: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:36,946: root: INFO: Current backtesting datetime 2022-03-22 15:00:00-05:00 +2024-04-13 18:41:36,946: root: INFO: Current backtesting datetime 2022-03-23 08:30:00-05:00 +2024-04-13 18:41:36,947: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:36 +2024-04-13 18:41:36,947: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:36,948: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:36,948: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:36,948: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:36,948: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:37,597: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:37,598: root: INFO: Current backtesting datetime 2022-03-23 15:00:00-05:00 +2024-04-13 18:41:37,599: root: INFO: Current backtesting datetime 2022-03-24 08:30:00-05:00 +2024-04-13 18:41:37,599: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:37 +2024-04-13 18:41:37,599: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:37,600: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:37,600: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:37,601: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:37,601: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:38,173: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:38,174: root: INFO: Current backtesting datetime 2022-03-24 15:00:00-05:00 +2024-04-13 18:41:38,175: root: INFO: Current backtesting datetime 2022-03-25 08:30:00-05:00 +2024-04-13 18:41:38,175: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:38 +2024-04-13 18:41:38,175: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:38,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:38,176: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:38,177: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:38,177: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:39,036: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:39,037: root: INFO: Current backtesting datetime 2022-03-25 15:00:00-05:00 +2024-04-13 18:41:39,038: root: INFO: Current backtesting datetime 2022-03-26 08:30:00-05:00 +2024-04-13 18:41:39,038: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:39,039: root: INFO: Current backtesting datetime 2022-03-26 08:29:00-05:00 +2024-04-13 18:41:39,041: root: INFO: Current backtesting datetime 2022-03-26 08:29:00-05:00 +2024-04-13 18:41:39,041: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:39,041: root: INFO: Current backtesting datetime 2022-03-28 07:30:00-05:00 +2024-04-13 18:41:39,042: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:39,043: root: INFO: Current backtesting datetime 2022-03-28 08:30:00-05:00 +2024-04-13 18:41:39,043: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:39,044: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:39 +2024-04-13 18:41:39,044: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:39,045: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:39,045: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:39,045: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:39,045: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:39,851: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:39,852: root: INFO: Current backtesting datetime 2022-03-28 15:00:00-05:00 +2024-04-13 18:41:39,853: root: INFO: Current backtesting datetime 2022-03-29 08:30:00-05:00 +2024-04-13 18:41:39,853: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:39 +2024-04-13 18:41:39,853: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:39,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:39,854: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:39,855: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:39,855: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:40,880: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:40,881: root: INFO: Current backtesting datetime 2022-03-29 15:00:00-05:00 +2024-04-13 18:41:40,881: root: INFO: Current backtesting datetime 2022-03-30 08:30:00-05:00 +2024-04-13 18:41:40,881: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:40 +2024-04-13 18:41:40,882: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:40,882: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:40,883: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:40,883: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:40,883: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:41,671: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:41,672: root: INFO: Current backtesting datetime 2022-03-30 15:00:00-05:00 +2024-04-13 18:41:41,673: root: INFO: Current backtesting datetime 2022-03-31 08:30:00-05:00 +2024-04-13 18:41:41,674: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:41 +2024-04-13 18:41:41,674: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:41,674: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:41,675: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:41,675: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:41,675: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:42,341: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:42,342: root: INFO: Current backtesting datetime 2022-03-31 15:00:00-05:00 +2024-04-13 18:41:42,342: root: INFO: Current backtesting datetime 2022-04-01 08:30:00-05:00 +2024-04-13 18:41:42,343: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:42 +2024-04-13 18:41:42,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:42,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:42,344: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:42,344: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:42,344: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:42,864: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:42,865: root: INFO: Current backtesting datetime 2022-04-01 15:00:00-05:00 +2024-04-13 18:41:42,865: root: INFO: Current backtesting datetime 2022-04-02 08:30:00-05:00 +2024-04-13 18:41:42,866: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:42,867: root: INFO: Current backtesting datetime 2022-04-02 08:29:00-05:00 +2024-04-13 18:41:42,868: root: INFO: Current backtesting datetime 2022-04-02 08:29:00-05:00 +2024-04-13 18:41:42,869: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:42,869: root: INFO: Current backtesting datetime 2022-04-04 07:30:00-05:00 +2024-04-13 18:41:42,870: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:42,871: root: INFO: Current backtesting datetime 2022-04-04 08:30:00-05:00 +2024-04-13 18:41:42,871: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:42,872: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:42 +2024-04-13 18:41:42,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:42,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:42,873: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:42,873: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:42,873: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:43,420: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:43,421: root: INFO: Current backtesting datetime 2022-04-04 15:00:00-05:00 +2024-04-13 18:41:43,422: root: INFO: Current backtesting datetime 2022-04-05 08:30:00-05:00 +2024-04-13 18:41:43,422: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:43 +2024-04-13 18:41:43,422: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:43,423: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:43,423: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:43,424: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:43,424: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:43,911: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:43,912: root: INFO: Current backtesting datetime 2022-04-05 15:00:00-05:00 +2024-04-13 18:41:43,913: root: INFO: Current backtesting datetime 2022-04-06 08:30:00-05:00 +2024-04-13 18:41:43,913: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:43 +2024-04-13 18:41:43,913: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:43,914: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:43,914: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:43,915: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:43,915: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:44,413: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:44,414: root: INFO: Current backtesting datetime 2022-04-06 15:00:00-05:00 +2024-04-13 18:41:44,415: root: INFO: Current backtesting datetime 2022-04-07 08:30:00-05:00 +2024-04-13 18:41:44,415: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:44 +2024-04-13 18:41:44,415: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:44,416: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:44,416: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:44,417: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:44,417: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:44,908: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:44,909: root: INFO: Current backtesting datetime 2022-04-07 15:00:00-05:00 +2024-04-13 18:41:44,909: root: INFO: Current backtesting datetime 2022-04-08 08:30:00-05:00 +2024-04-13 18:41:44,910: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:44 +2024-04-13 18:41:44,910: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:44,911: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:44,911: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:44,911: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:44,911: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:45,413: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:45,414: root: INFO: Current backtesting datetime 2022-04-08 15:00:00-05:00 +2024-04-13 18:41:45,414: root: INFO: Current backtesting datetime 2022-04-09 08:30:00-05:00 +2024-04-13 18:41:45,415: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:45,417: root: INFO: Current backtesting datetime 2022-04-09 08:29:00-05:00 +2024-04-13 18:41:45,417: root: INFO: Current backtesting datetime 2022-04-09 08:29:00-05:00 +2024-04-13 18:41:45,417: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:45,418: root: INFO: Current backtesting datetime 2022-04-11 07:30:00-05:00 +2024-04-13 18:41:45,419: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:45,420: root: INFO: Current backtesting datetime 2022-04-11 08:30:00-05:00 +2024-04-13 18:41:45,420: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:45,421: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:45 +2024-04-13 18:41:45,421: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:45,422: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:45,422: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:45,422: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:45,422: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:45,955: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:45,956: root: INFO: Current backtesting datetime 2022-04-11 15:00:00-05:00 +2024-04-13 18:41:45,956: root: INFO: Current backtesting datetime 2022-04-12 08:30:00-05:00 +2024-04-13 18:41:45,957: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:45 +2024-04-13 18:41:45,957: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:45,958: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:45,959: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:45,959: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:45,959: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:46,494: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:46,495: root: INFO: Current backtesting datetime 2022-04-12 15:00:00-05:00 +2024-04-13 18:41:46,495: root: INFO: Current backtesting datetime 2022-04-13 08:30:00-05:00 +2024-04-13 18:41:46,496: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:46 +2024-04-13 18:41:46,496: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:46,497: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:46,497: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:46,497: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:46,497: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:46,994: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:46,995: root: INFO: Current backtesting datetime 2022-04-13 15:00:00-05:00 +2024-04-13 18:41:46,995: root: INFO: Current backtesting datetime 2022-04-14 08:30:00-05:00 +2024-04-13 18:41:46,996: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:46 +2024-04-13 18:41:46,996: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:46,997: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:46,997: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:46,997: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:46,997: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:47,801: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:47,803: root: INFO: Current backtesting datetime 2022-04-14 15:00:00-05:00 +2024-04-13 18:41:47,803: root: INFO: Current backtesting datetime 2022-04-15 08:30:00-05:00 +2024-04-13 18:41:47,803: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:47,805: root: INFO: Current backtesting datetime 2022-04-15 08:29:00-05:00 +2024-04-13 18:41:47,806: root: INFO: Current backtesting datetime 2022-04-15 08:29:00-05:00 +2024-04-13 18:41:47,806: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:47,807: root: INFO: Current backtesting datetime 2022-04-18 07:30:00-05:00 +2024-04-13 18:41:47,807: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:47,808: root: INFO: Current backtesting datetime 2022-04-18 08:30:00-05:00 +2024-04-13 18:41:47,808: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:47,809: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:47 +2024-04-13 18:41:47,809: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:47,810: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:47,810: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:47,811: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:47,811: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:48,073: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:48,074: root: INFO: Current backtesting datetime 2022-04-18 15:00:00-05:00 +2024-04-13 18:41:48,074: root: INFO: Current backtesting datetime 2022-04-19 08:30:00-05:00 +2024-04-13 18:41:48,075: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:48 +2024-04-13 18:41:48,075: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:48,076: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:48,076: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:48,076: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:48,076: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:48,775: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:48,776: root: INFO: Current backtesting datetime 2022-04-19 15:00:00-05:00 +2024-04-13 18:41:48,776: root: INFO: Current backtesting datetime 2022-04-20 08:30:00-05:00 +2024-04-13 18:41:48,777: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:48 +2024-04-13 18:41:48,777: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:48,778: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:48,778: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:48,778: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:48,778: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:49,032: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:49,033: root: INFO: Current backtesting datetime 2022-04-20 15:00:00-05:00 +2024-04-13 18:41:49,033: root: INFO: Current backtesting datetime 2022-04-21 08:30:00-05:00 +2024-04-13 18:41:49,034: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:49 +2024-04-13 18:41:49,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:49,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:49,035: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:49,035: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:49,035: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:49,743: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:49,744: root: INFO: Current backtesting datetime 2022-04-21 15:00:00-05:00 +2024-04-13 18:41:49,744: root: INFO: Current backtesting datetime 2022-04-22 08:30:00-05:00 +2024-04-13 18:41:49,744: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:49 +2024-04-13 18:41:49,745: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:49,745: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:49,746: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:49,746: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:49,746: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:49,980: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:49,981: root: INFO: Current backtesting datetime 2022-04-22 15:00:00-05:00 +2024-04-13 18:41:49,982: root: INFO: Current backtesting datetime 2022-04-23 08:30:00-05:00 +2024-04-13 18:41:49,982: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:49,983: root: INFO: Current backtesting datetime 2022-04-23 08:29:00-05:00 +2024-04-13 18:41:49,985: root: INFO: Current backtesting datetime 2022-04-23 08:29:00-05:00 +2024-04-13 18:41:49,985: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:49,985: root: INFO: Current backtesting datetime 2022-04-25 07:30:00-05:00 +2024-04-13 18:41:49,986: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:49,987: root: INFO: Current backtesting datetime 2022-04-25 08:30:00-05:00 +2024-04-13 18:41:49,987: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:49,988: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:49 +2024-04-13 18:41:49,988: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:49,989: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:49,989: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:49,989: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:49,989: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:50,655: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:50,656: root: INFO: Current backtesting datetime 2022-04-25 15:00:00-05:00 +2024-04-13 18:41:50,657: root: INFO: Current backtesting datetime 2022-04-26 08:30:00-05:00 +2024-04-13 18:41:50,657: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:50 +2024-04-13 18:41:50,657: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:50,658: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:50,658: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:50,659: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:50,659: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:50,889: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:50,890: root: INFO: Current backtesting datetime 2022-04-26 15:00:00-05:00 +2024-04-13 18:41:50,891: root: INFO: Current backtesting datetime 2022-04-27 08:30:00-05:00 +2024-04-13 18:41:50,891: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:50 +2024-04-13 18:41:50,891: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:50,892: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:50,892: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:50,893: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:50,893: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:51,280: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:51,281: root: INFO: Current backtesting datetime 2022-04-27 15:00:00-05:00 +2024-04-13 18:41:51,282: root: INFO: Current backtesting datetime 2022-04-28 08:30:00-05:00 +2024-04-13 18:41:51,282: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:51 +2024-04-13 18:41:51,282: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:51,283: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:51,283: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:51,284: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:51,284: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:51,776: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:51,777: root: INFO: Current backtesting datetime 2022-04-28 15:00:00-05:00 +2024-04-13 18:41:51,777: root: INFO: Current backtesting datetime 2022-04-29 08:30:00-05:00 +2024-04-13 18:41:51,778: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:51 +2024-04-13 18:41:51,778: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:51,779: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:51,779: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:51,780: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:51,780: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:52,020: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:52,021: root: INFO: Current backtesting datetime 2022-04-29 15:00:00-05:00 +2024-04-13 18:41:52,021: root: INFO: Current backtesting datetime 2022-04-30 08:30:00-05:00 +2024-04-13 18:41:52,022: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:52,023: root: INFO: Current backtesting datetime 2022-04-30 08:29:00-05:00 +2024-04-13 18:41:52,024: root: INFO: Current backtesting datetime 2022-04-30 08:29:00-05:00 +2024-04-13 18:41:52,024: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:52,025: root: INFO: Current backtesting datetime 2022-05-02 07:30:00-05:00 +2024-04-13 18:41:52,025: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:52,026: root: INFO: Current backtesting datetime 2022-05-02 08:30:00-05:00 +2024-04-13 18:41:52,026: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:52,027: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:52 +2024-04-13 18:41:52,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:52,028: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:52,028: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:52,029: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:52,029: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:52,637: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:52,638: root: INFO: Current backtesting datetime 2022-05-02 15:00:00-05:00 +2024-04-13 18:41:52,639: root: INFO: Current backtesting datetime 2022-05-03 08:30:00-05:00 +2024-04-13 18:41:52,639: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:52 +2024-04-13 18:41:52,639: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:52,640: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:52,640: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:52,641: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:52,641: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:52,965: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:52,965: root: INFO: Current backtesting datetime 2022-05-03 15:00:00-05:00 +2024-04-13 18:41:52,965: root: INFO: Current backtesting datetime 2022-05-04 08:30:00-05:00 +2024-04-13 18:41:52,965: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:52 +2024-04-13 18:41:52,967: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:52,967: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:52,968: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:52,968: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:52,968: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:53,436: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:53,437: root: INFO: Current backtesting datetime 2022-05-04 15:00:00-05:00 +2024-04-13 18:41:53,438: root: INFO: Current backtesting datetime 2022-05-05 08:30:00-05:00 +2024-04-13 18:41:53,438: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:53 +2024-04-13 18:41:53,438: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:53,439: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:53,439: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:53,440: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:53,440: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:53,990: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:53,991: root: INFO: Current backtesting datetime 2022-05-05 15:00:00-05:00 +2024-04-13 18:41:53,992: root: INFO: Current backtesting datetime 2022-05-06 08:30:00-05:00 +2024-04-13 18:41:53,992: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:53 +2024-04-13 18:41:53,992: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:53,993: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:53,993: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:53,994: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:53,994: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:54,674: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:54,675: root: INFO: Current backtesting datetime 2022-05-06 15:00:00-05:00 +2024-04-13 18:41:54,675: root: INFO: Current backtesting datetime 2022-05-07 08:30:00-05:00 +2024-04-13 18:41:54,675: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:54,677: root: INFO: Current backtesting datetime 2022-05-07 08:29:00-05:00 +2024-04-13 18:41:54,678: root: INFO: Current backtesting datetime 2022-05-07 08:29:00-05:00 +2024-04-13 18:41:54,678: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:54,679: root: INFO: Current backtesting datetime 2022-05-09 07:30:00-05:00 +2024-04-13 18:41:54,679: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:54,680: root: INFO: Current backtesting datetime 2022-05-09 08:30:00-05:00 +2024-04-13 18:41:54,680: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:54,681: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:54 +2024-04-13 18:41:54,681: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:54,682: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:54,682: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:54,683: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:54,683: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:54,999: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:55,000: root: INFO: Current backtesting datetime 2022-05-09 15:00:00-05:00 +2024-04-13 18:41:55,000: root: INFO: Current backtesting datetime 2022-05-10 08:30:00-05:00 +2024-04-13 18:41:55,000: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:55 +2024-04-13 18:41:55,000: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:55,001: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:55,001: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:55,002: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:55,002: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:55,671: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:55,672: root: INFO: Current backtesting datetime 2022-05-10 15:00:00-05:00 +2024-04-13 18:41:55,673: root: INFO: Current backtesting datetime 2022-05-11 08:30:00-05:00 +2024-04-13 18:41:55,673: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:55 +2024-04-13 18:41:55,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:55,674: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:55,674: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:55,675: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:55,675: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:55,994: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:55,996: root: INFO: Current backtesting datetime 2022-05-11 15:00:00-05:00 +2024-04-13 18:41:55,996: root: INFO: Current backtesting datetime 2022-05-12 08:30:00-05:00 +2024-04-13 18:41:55,996: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:55 +2024-04-13 18:41:55,996: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:55,997: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:55,997: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:55,998: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:55,998: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:56,623: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:56,624: root: INFO: Current backtesting datetime 2022-05-12 15:00:00-05:00 +2024-04-13 18:41:56,624: root: INFO: Current backtesting datetime 2022-05-13 08:30:00-05:00 +2024-04-13 18:41:56,624: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:56 +2024-04-13 18:41:56,624: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:56,625: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:56,625: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:56,626: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:56,626: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:57,133: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:57,134: root: INFO: Current backtesting datetime 2022-05-13 15:00:00-05:00 +2024-04-13 18:41:57,135: root: INFO: Current backtesting datetime 2022-05-14 08:30:00-05:00 +2024-04-13 18:41:57,135: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:41:57,136: root: INFO: Current backtesting datetime 2022-05-14 08:29:00-05:00 +2024-04-13 18:41:57,137: root: INFO: Current backtesting datetime 2022-05-14 08:29:00-05:00 +2024-04-13 18:41:57,138: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:41:57,138: root: INFO: Current backtesting datetime 2022-05-16 07:30:00-05:00 +2024-04-13 18:41:57,139: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:41:57,139: root: INFO: Current backtesting datetime 2022-05-16 08:30:00-05:00 +2024-04-13 18:41:57,139: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:41:57,141: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:57 +2024-04-13 18:41:57,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:57,142: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:57,142: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:57,143: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:57,143: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:57,976: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:57,977: root: INFO: Current backtesting datetime 2022-05-16 15:00:00-05:00 +2024-04-13 18:41:57,977: root: INFO: Current backtesting datetime 2022-05-17 08:30:00-05:00 +2024-04-13 18:41:57,978: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:57 +2024-04-13 18:41:57,979: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:57,979: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:57,980: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:57,980: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:57,980: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:58,616: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:58,617: root: INFO: Current backtesting datetime 2022-05-17 15:00:00-05:00 +2024-04-13 18:41:58,617: root: INFO: Current backtesting datetime 2022-05-18 08:30:00-05:00 +2024-04-13 18:41:58,618: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:58 +2024-04-13 18:41:58,618: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:58,619: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:58,619: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:58,619: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:58,619: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:41:59,377: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:41:59,378: root: INFO: Current backtesting datetime 2022-05-18 15:00:00-05:00 +2024-04-13 18:41:59,378: root: INFO: Current backtesting datetime 2022-05-19 08:30:00-05:00 +2024-04-13 18:41:59,379: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:41:59 +2024-04-13 18:41:59,379: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:59,380: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:41:59,380: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:41:59,381: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:41:59,381: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:00,072: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:00,072: root: INFO: Current backtesting datetime 2022-05-19 15:00:00-05:00 +2024-04-13 18:42:00,073: root: INFO: Current backtesting datetime 2022-05-20 08:30:00-05:00 +2024-04-13 18:42:00,073: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:00 +2024-04-13 18:42:00,073: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:00,074: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:00,074: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:00,075: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:00,075: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:00,893: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:00,894: root: INFO: Current backtesting datetime 2022-05-20 15:00:00-05:00 +2024-04-13 18:42:00,894: root: INFO: Current backtesting datetime 2022-05-21 08:30:00-05:00 +2024-04-13 18:42:00,894: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:00,895: root: INFO: Current backtesting datetime 2022-05-21 08:29:00-05:00 +2024-04-13 18:42:00,897: root: INFO: Current backtesting datetime 2022-05-21 08:29:00-05:00 +2024-04-13 18:42:00,897: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:00,898: root: INFO: Current backtesting datetime 2022-05-23 07:30:00-05:00 +2024-04-13 18:42:00,898: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:00,899: root: INFO: Current backtesting datetime 2022-05-23 08:30:00-05:00 +2024-04-13 18:42:00,899: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:00,900: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:00 +2024-04-13 18:42:00,900: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:00,901: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:00,901: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:00,901: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:00,901: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:01,721: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:01,722: root: INFO: Current backtesting datetime 2022-05-23 15:00:00-05:00 +2024-04-13 18:42:01,723: root: INFO: Current backtesting datetime 2022-05-24 08:30:00-05:00 +2024-04-13 18:42:01,723: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:01 +2024-04-13 18:42:01,723: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:01,724: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:01,724: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:01,725: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:01,725: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:03,053: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:03,054: root: INFO: Current backtesting datetime 2022-05-24 15:00:00-05:00 +2024-04-13 18:42:03,054: root: INFO: Current backtesting datetime 2022-05-25 08:30:00-05:00 +2024-04-13 18:42:03,055: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:03 +2024-04-13 18:42:03,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:03,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:03,057: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:03,057: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:03,057: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:03,845: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:03,845: root: INFO: Current backtesting datetime 2022-05-25 15:00:00-05:00 +2024-04-13 18:42:03,846: root: INFO: Current backtesting datetime 2022-05-26 08:30:00-05:00 +2024-04-13 18:42:03,846: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:03 +2024-04-13 18:42:03,846: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:03,847: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:03,847: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:03,848: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:03,848: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:04,405: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:04,406: root: INFO: Current backtesting datetime 2022-05-26 15:00:00-05:00 +2024-04-13 18:42:04,406: root: INFO: Current backtesting datetime 2022-05-27 08:30:00-05:00 +2024-04-13 18:42:04,406: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:04 +2024-04-13 18:42:04,407: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:04,407: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:04,408: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:04,408: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:04,408: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:04,983: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:04,984: root: INFO: Current backtesting datetime 2022-05-27 15:00:00-05:00 +2024-04-13 18:42:04,984: root: INFO: Current backtesting datetime 2022-05-28 08:30:00-05:00 +2024-04-13 18:42:04,985: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:04,986: root: INFO: Current backtesting datetime 2022-05-28 08:29:00-05:00 +2024-04-13 18:42:04,987: root: INFO: Current backtesting datetime 2022-05-28 08:29:00-05:00 +2024-04-13 18:42:04,987: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:04,988: root: INFO: Current backtesting datetime 2022-05-31 07:30:00-05:00 +2024-04-13 18:42:04,989: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:04,990: root: INFO: Current backtesting datetime 2022-05-31 08:30:00-05:00 +2024-04-13 18:42:04,990: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:04,991: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:04 +2024-04-13 18:42:04,991: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:04,992: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:04,992: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:04,993: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:04,993: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:06,362: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:06,363: root: INFO: Current backtesting datetime 2022-05-31 15:00:00-05:00 +2024-04-13 18:42:06,364: root: INFO: Current backtesting datetime 2022-06-01 08:30:00-05:00 +2024-04-13 18:42:06,364: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:06 +2024-04-13 18:42:06,364: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:06,365: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:06,365: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:06,366: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:06,366: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:07,313: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:07,314: root: INFO: Current backtesting datetime 2022-06-01 15:00:00-05:00 +2024-04-13 18:42:07,314: root: INFO: Current backtesting datetime 2022-06-02 08:30:00-05:00 +2024-04-13 18:42:07,315: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:07 +2024-04-13 18:42:07,315: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:07,315: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:07,316: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:07,316: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:07,316: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:08,206: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:08,207: root: INFO: Current backtesting datetime 2022-06-02 15:00:00-05:00 +2024-04-13 18:42:08,208: root: INFO: Current backtesting datetime 2022-06-03 08:30:00-05:00 +2024-04-13 18:42:08,208: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:08 +2024-04-13 18:42:08,208: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:08,209: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:08,209: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:08,210: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:08,210: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:09,002: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:09,003: root: INFO: Current backtesting datetime 2022-06-03 15:00:00-05:00 +2024-04-13 18:42:09,004: root: INFO: Current backtesting datetime 2022-06-04 08:30:00-05:00 +2024-04-13 18:42:09,004: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:09,005: root: INFO: Current backtesting datetime 2022-06-04 08:29:00-05:00 +2024-04-13 18:42:09,006: root: INFO: Current backtesting datetime 2022-06-04 08:29:00-05:00 +2024-04-13 18:42:09,006: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:09,007: root: INFO: Current backtesting datetime 2022-06-06 07:30:00-05:00 +2024-04-13 18:42:09,008: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:09,008: root: INFO: Current backtesting datetime 2022-06-06 08:30:00-05:00 +2024-04-13 18:42:09,009: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:09,010: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:09 +2024-04-13 18:42:09,010: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:09,011: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:09,011: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:09,011: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:09,012: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:09,752: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:09,753: root: INFO: Current backtesting datetime 2022-06-06 15:00:00-05:00 +2024-04-13 18:42:09,754: root: INFO: Current backtesting datetime 2022-06-07 08:30:00-05:00 +2024-04-13 18:42:09,754: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:09 +2024-04-13 18:42:09,754: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:09,755: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:09,755: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:09,756: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:09,756: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:10,586: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:10,587: root: INFO: Current backtesting datetime 2022-06-07 15:00:00-05:00 +2024-04-13 18:42:10,587: root: INFO: Current backtesting datetime 2022-06-08 08:30:00-05:00 +2024-04-13 18:42:10,588: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:10 +2024-04-13 18:42:10,588: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:10,588: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:10,589: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:10,589: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:10,589: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:11,673: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:11,674: root: INFO: Current backtesting datetime 2022-06-08 15:00:00-05:00 +2024-04-13 18:42:11,674: root: INFO: Current backtesting datetime 2022-06-09 08:30:00-05:00 +2024-04-13 18:42:11,675: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:11 +2024-04-13 18:42:11,675: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:11,676: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:11,676: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:11,676: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:11,677: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:12,682: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:12,683: root: INFO: Current backtesting datetime 2022-06-09 15:00:00-05:00 +2024-04-13 18:42:12,683: root: INFO: Current backtesting datetime 2022-06-10 08:30:00-05:00 +2024-04-13 18:42:12,683: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:12 +2024-04-13 18:42:12,684: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:12,684: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:12,685: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:12,685: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:12,685: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:13,407: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:13,408: root: INFO: Current backtesting datetime 2022-06-10 15:00:00-05:00 +2024-04-13 18:42:13,408: root: INFO: Current backtesting datetime 2022-06-11 08:30:00-05:00 +2024-04-13 18:42:13,409: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:13,410: root: INFO: Current backtesting datetime 2022-06-11 08:29:00-05:00 +2024-04-13 18:42:13,411: root: INFO: Current backtesting datetime 2022-06-11 08:29:00-05:00 +2024-04-13 18:42:13,411: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:13,412: root: INFO: Current backtesting datetime 2022-06-13 07:30:00-05:00 +2024-04-13 18:42:13,413: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:13,413: root: INFO: Current backtesting datetime 2022-06-13 08:30:00-05:00 +2024-04-13 18:42:13,414: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:13,415: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:13 +2024-04-13 18:42:13,415: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:13,415: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:13,416: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:13,416: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:13,416: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:13,909: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:13,911: root: INFO: Current backtesting datetime 2022-06-13 15:00:00-05:00 +2024-04-13 18:42:13,911: root: INFO: Current backtesting datetime 2022-06-14 08:30:00-05:00 +2024-04-13 18:42:13,911: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:13 +2024-04-13 18:42:13,911: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:13,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:13,912: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:13,913: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:13,913: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:14,618: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:14,619: root: INFO: Current backtesting datetime 2022-06-14 15:00:00-05:00 +2024-04-13 18:42:14,620: root: INFO: Current backtesting datetime 2022-06-15 08:30:00-05:00 +2024-04-13 18:42:14,620: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:14 +2024-04-13 18:42:14,620: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:14,621: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:14,621: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:14,622: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:14,622: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:15,502: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:15,503: root: INFO: Current backtesting datetime 2022-06-15 15:00:00-05:00 +2024-04-13 18:42:15,504: root: INFO: Current backtesting datetime 2022-06-16 08:30:00-05:00 +2024-04-13 18:42:15,504: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:15 +2024-04-13 18:42:15,504: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:15,505: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:15,505: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:15,506: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:15,506: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:16,122: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:16,123: root: INFO: Current backtesting datetime 2022-06-16 15:00:00-05:00 +2024-04-13 18:42:16,123: root: INFO: Current backtesting datetime 2022-06-17 08:30:00-05:00 +2024-04-13 18:42:16,124: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:16 +2024-04-13 18:42:16,124: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:16,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:16,125: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:16,125: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:16,125: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:17,147: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:17,148: root: INFO: Current backtesting datetime 2022-06-17 15:00:00-05:00 +2024-04-13 18:42:17,148: root: INFO: Current backtesting datetime 2022-06-18 08:30:00-05:00 +2024-04-13 18:42:17,148: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:17,151: root: INFO: Current backtesting datetime 2022-06-18 08:29:00-05:00 +2024-04-13 18:42:17,152: root: INFO: Current backtesting datetime 2022-06-18 08:29:00-05:00 +2024-04-13 18:42:17,152: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:17,152: root: INFO: Current backtesting datetime 2022-06-21 07:30:00-05:00 +2024-04-13 18:42:17,153: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:17,154: root: INFO: Current backtesting datetime 2022-06-21 08:30:00-05:00 +2024-04-13 18:42:17,154: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:17,155: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:17 +2024-04-13 18:42:17,155: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:17,156: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:17,156: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:17,157: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:17,157: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:18,070: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:18,071: root: INFO: Current backtesting datetime 2022-06-21 15:00:00-05:00 +2024-04-13 18:42:18,071: root: INFO: Current backtesting datetime 2022-06-22 08:30:00-05:00 +2024-04-13 18:42:18,072: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:18 +2024-04-13 18:42:18,072: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:18,072: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:18,073: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:18,073: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:18,073: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:18,989: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:18,990: root: INFO: Current backtesting datetime 2022-06-22 15:00:00-05:00 +2024-04-13 18:42:18,990: root: INFO: Current backtesting datetime 2022-06-23 08:30:00-05:00 +2024-04-13 18:42:18,991: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:18 +2024-04-13 18:42:18,991: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:18,992: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:18,992: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:18,993: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:18,993: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:19,904: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:19,905: root: INFO: Current backtesting datetime 2022-06-23 15:00:00-05:00 +2024-04-13 18:42:19,905: root: INFO: Current backtesting datetime 2022-06-24 08:30:00-05:00 +2024-04-13 18:42:19,906: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:19 +2024-04-13 18:42:19,906: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:19,907: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:19,907: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:19,908: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:19,908: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:20,710: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:20,711: root: INFO: Current backtesting datetime 2022-06-24 15:00:00-05:00 +2024-04-13 18:42:20,711: root: INFO: Current backtesting datetime 2022-06-25 08:30:00-05:00 +2024-04-13 18:42:20,712: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:20,713: root: INFO: Current backtesting datetime 2022-06-25 08:29:00-05:00 +2024-04-13 18:42:20,714: root: INFO: Current backtesting datetime 2022-06-25 08:29:00-05:00 +2024-04-13 18:42:20,714: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:20,715: root: INFO: Current backtesting datetime 2022-06-27 07:30:00-05:00 +2024-04-13 18:42:20,715: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:20,716: root: INFO: Current backtesting datetime 2022-06-27 08:30:00-05:00 +2024-04-13 18:42:20,716: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:20,717: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:20 +2024-04-13 18:42:20,717: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:20,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:20,718: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:20,719: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:20,719: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:21,448: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:21,449: root: INFO: Current backtesting datetime 2022-06-27 15:00:00-05:00 +2024-04-13 18:42:21,449: root: INFO: Current backtesting datetime 2022-06-28 08:30:00-05:00 +2024-04-13 18:42:21,451: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:21 +2024-04-13 18:42:21,451: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:21,452: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:21,452: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:21,452: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:21,452: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:22,120: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:22,121: root: INFO: Current backtesting datetime 2022-06-28 15:00:00-05:00 +2024-04-13 18:42:22,121: root: INFO: Current backtesting datetime 2022-06-29 08:30:00-05:00 +2024-04-13 18:42:22,121: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:22 +2024-04-13 18:42:22,122: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:22,122: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:22,123: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:22,123: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:22,123: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:22,956: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:22,957: root: INFO: Current backtesting datetime 2022-06-29 15:00:00-05:00 +2024-04-13 18:42:22,957: root: INFO: Current backtesting datetime 2022-06-30 08:30:00-05:00 +2024-04-13 18:42:22,957: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:22 +2024-04-13 18:42:22,957: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:22,958: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:22,958: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:22,959: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:22,959: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:23,787: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:23,787: root: INFO: Current backtesting datetime 2022-06-30 15:00:00-05:00 +2024-04-13 18:42:23,788: root: INFO: Current backtesting datetime 2022-07-01 08:30:00-05:00 +2024-04-13 18:42:23,788: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:23 +2024-04-13 18:42:23,788: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:23,789: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:23,789: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:23,790: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:23,790: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:24,788: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:24,789: root: INFO: Current backtesting datetime 2022-07-01 15:00:00-05:00 +2024-04-13 18:42:24,790: root: INFO: Current backtesting datetime 2022-07-02 08:30:00-05:00 +2024-04-13 18:42:24,790: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:24,791: root: INFO: Current backtesting datetime 2022-07-02 08:29:00-05:00 +2024-04-13 18:42:24,793: root: INFO: Current backtesting datetime 2022-07-02 08:29:00-05:00 +2024-04-13 18:42:24,793: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:24,794: root: INFO: Current backtesting datetime 2022-07-05 07:30:00-05:00 +2024-04-13 18:42:24,794: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:24,795: root: INFO: Current backtesting datetime 2022-07-05 08:30:00-05:00 +2024-04-13 18:42:24,795: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:24,796: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:24 +2024-04-13 18:42:24,796: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:24,796: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:24,797: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:24,797: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:24,797: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:25,634: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:25,635: root: INFO: Current backtesting datetime 2022-07-05 15:00:00-05:00 +2024-04-13 18:42:25,635: root: INFO: Current backtesting datetime 2022-07-06 08:30:00-05:00 +2024-04-13 18:42:25,635: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:25 +2024-04-13 18:42:25,635: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:25,636: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:25,636: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:25,637: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:25,637: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:27,569: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:27,570: root: INFO: Current backtesting datetime 2022-07-06 15:00:00-05:00 +2024-04-13 18:42:27,570: root: INFO: Current backtesting datetime 2022-07-07 08:30:00-05:00 +2024-04-13 18:42:27,571: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:27 +2024-04-13 18:42:27,571: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:27,572: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:27,572: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:27,572: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:27,572: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:29,123: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:29,124: root: INFO: Current backtesting datetime 2022-07-07 15:00:00-05:00 +2024-04-13 18:42:29,125: root: INFO: Current backtesting datetime 2022-07-08 08:30:00-05:00 +2024-04-13 18:42:29,125: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:29 +2024-04-13 18:42:29,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:29,126: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:29,126: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:29,127: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:29,127: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:29,909: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:29,910: root: INFO: Current backtesting datetime 2022-07-08 15:00:00-05:00 +2024-04-13 18:42:29,910: root: INFO: Current backtesting datetime 2022-07-09 08:30:00-05:00 +2024-04-13 18:42:29,910: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:29,912: root: INFO: Current backtesting datetime 2022-07-09 08:29:00-05:00 +2024-04-13 18:42:29,913: root: INFO: Current backtesting datetime 2022-07-09 08:29:00-05:00 +2024-04-13 18:42:29,913: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:29,914: root: INFO: Current backtesting datetime 2022-07-11 07:30:00-05:00 +2024-04-13 18:42:29,914: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:29,915: root: INFO: Current backtesting datetime 2022-07-11 08:30:00-05:00 +2024-04-13 18:42:29,915: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:29,916: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:29 +2024-04-13 18:42:29,916: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:29,917: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:29,917: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:29,918: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:29,918: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:30,487: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:30,488: root: INFO: Current backtesting datetime 2022-07-11 15:00:00-05:00 +2024-04-13 18:42:30,488: root: INFO: Current backtesting datetime 2022-07-12 08:30:00-05:00 +2024-04-13 18:42:30,489: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:30 +2024-04-13 18:42:30,489: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:30,490: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:30,490: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:30,491: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:30,491: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:31,097: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:31,098: root: INFO: Current backtesting datetime 2022-07-12 15:00:00-05:00 +2024-04-13 18:42:31,098: root: INFO: Current backtesting datetime 2022-07-13 08:30:00-05:00 +2024-04-13 18:42:31,099: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:31 +2024-04-13 18:42:31,099: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:31,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:31,100: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:31,100: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:31,101: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:32,184: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:32,185: root: INFO: Current backtesting datetime 2022-07-13 15:00:00-05:00 +2024-04-13 18:42:32,185: root: INFO: Current backtesting datetime 2022-07-14 08:30:00-05:00 +2024-04-13 18:42:32,186: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:32 +2024-04-13 18:42:32,186: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:32,187: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:32,187: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:32,187: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:32,187: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:33,000: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:33,001: root: INFO: Current backtesting datetime 2022-07-14 15:00:00-05:00 +2024-04-13 18:42:33,001: root: INFO: Current backtesting datetime 2022-07-15 08:30:00-05:00 +2024-04-13 18:42:33,002: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:33 +2024-04-13 18:42:33,002: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:33,003: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:33,003: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:33,003: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:33,003: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:33,778: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:33,779: root: INFO: Current backtesting datetime 2022-07-15 15:00:00-05:00 +2024-04-13 18:42:33,779: root: INFO: Current backtesting datetime 2022-07-16 08:30:00-05:00 +2024-04-13 18:42:33,779: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:33,781: root: INFO: Current backtesting datetime 2022-07-16 08:29:00-05:00 +2024-04-13 18:42:33,782: root: INFO: Current backtesting datetime 2022-07-16 08:29:00-05:00 +2024-04-13 18:42:33,782: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:33,784: root: INFO: Current backtesting datetime 2022-07-18 07:30:00-05:00 +2024-04-13 18:42:33,784: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:33,784: root: INFO: Current backtesting datetime 2022-07-18 08:30:00-05:00 +2024-04-13 18:42:33,785: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:33,786: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:33 +2024-04-13 18:42:33,786: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:33,786: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:33,787: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:33,787: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:33,787: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:34,437: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:34,437: root: INFO: Current backtesting datetime 2022-07-18 15:00:00-05:00 +2024-04-13 18:42:34,438: root: INFO: Current backtesting datetime 2022-07-19 08:30:00-05:00 +2024-04-13 18:42:34,438: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:34 +2024-04-13 18:42:34,438: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:34,439: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:34,439: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:34,440: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:34,440: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:35,000: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:35,001: root: INFO: Current backtesting datetime 2022-07-19 15:00:00-05:00 +2024-04-13 18:42:35,001: root: INFO: Current backtesting datetime 2022-07-20 08:30:00-05:00 +2024-04-13 18:42:35,001: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:35 +2024-04-13 18:42:35,001: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:35,002: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:35,002: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:35,003: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:35,003: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:35,948: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:35,948: root: INFO: Current backtesting datetime 2022-07-20 15:00:00-05:00 +2024-04-13 18:42:35,949: root: INFO: Current backtesting datetime 2022-07-21 08:30:00-05:00 +2024-04-13 18:42:35,949: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:35 +2024-04-13 18:42:35,949: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:35,950: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:35,950: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:35,950: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:35,950: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:36,547: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:36,548: root: INFO: Current backtesting datetime 2022-07-21 15:00:00-05:00 +2024-04-13 18:42:36,548: root: INFO: Current backtesting datetime 2022-07-22 08:30:00-05:00 +2024-04-13 18:42:36,549: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:36 +2024-04-13 18:42:36,549: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:36,550: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:36,550: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:36,550: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:36,550: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:37,136: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:37,137: root: INFO: Current backtesting datetime 2022-07-22 15:00:00-05:00 +2024-04-13 18:42:37,137: root: INFO: Current backtesting datetime 2022-07-23 08:30:00-05:00 +2024-04-13 18:42:37,138: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:37,139: root: INFO: Current backtesting datetime 2022-07-23 08:29:00-05:00 +2024-04-13 18:42:37,140: root: INFO: Current backtesting datetime 2022-07-23 08:29:00-05:00 +2024-04-13 18:42:37,141: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:37,141: root: INFO: Current backtesting datetime 2022-07-25 07:30:00-05:00 +2024-04-13 18:42:37,142: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:37,143: root: INFO: Current backtesting datetime 2022-07-25 08:30:00-05:00 +2024-04-13 18:42:37,143: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:37,144: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:37 +2024-04-13 18:42:37,144: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:37,145: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:37,145: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:37,145: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:37,145: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:38,031: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:38,033: root: INFO: Current backtesting datetime 2022-07-25 15:00:00-05:00 +2024-04-13 18:42:38,033: root: INFO: Current backtesting datetime 2022-07-26 08:30:00-05:00 +2024-04-13 18:42:38,033: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:38 +2024-04-13 18:42:38,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:38,034: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:38,034: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:38,035: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:38,035: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:38,728: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:38,729: root: INFO: Current backtesting datetime 2022-07-26 15:00:00-05:00 +2024-04-13 18:42:38,730: root: INFO: Current backtesting datetime 2022-07-27 08:30:00-05:00 +2024-04-13 18:42:38,730: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:38 +2024-04-13 18:42:38,730: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:38,731: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:38,731: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:38,732: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:38,732: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:39,304: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:39,305: root: INFO: Current backtesting datetime 2022-07-27 15:00:00-05:00 +2024-04-13 18:42:39,306: root: INFO: Current backtesting datetime 2022-07-28 08:30:00-05:00 +2024-04-13 18:42:39,306: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:39 +2024-04-13 18:42:39,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:39,307: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:39,307: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:39,308: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:39,308: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:39,927: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:39,928: root: INFO: Current backtesting datetime 2022-07-28 15:00:00-05:00 +2024-04-13 18:42:39,929: root: INFO: Current backtesting datetime 2022-07-29 08:30:00-05:00 +2024-04-13 18:42:39,929: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:39 +2024-04-13 18:42:39,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:39,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:39,930: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:39,931: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:39,931: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:40,690: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:40,691: root: INFO: Current backtesting datetime 2022-07-29 15:00:00-05:00 +2024-04-13 18:42:40,692: root: INFO: Current backtesting datetime 2022-07-30 08:30:00-05:00 +2024-04-13 18:42:40,692: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:40,693: root: INFO: Current backtesting datetime 2022-07-30 08:29:00-05:00 +2024-04-13 18:42:40,695: root: INFO: Current backtesting datetime 2022-07-30 08:29:00-05:00 +2024-04-13 18:42:40,695: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:40,696: root: INFO: Current backtesting datetime 2022-08-01 07:30:00-05:00 +2024-04-13 18:42:40,696: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:40,697: root: INFO: Current backtesting datetime 2022-08-01 08:30:00-05:00 +2024-04-13 18:42:40,697: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:40,698: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:40 +2024-04-13 18:42:40,698: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:40,699: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:40,699: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:40,700: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:40,700: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:41,394: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:41,395: root: INFO: Current backtesting datetime 2022-08-01 15:00:00-05:00 +2024-04-13 18:42:41,395: root: INFO: Current backtesting datetime 2022-08-02 08:30:00-05:00 +2024-04-13 18:42:41,395: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:41 +2024-04-13 18:42:41,396: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:41,396: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:41,397: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:41,397: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:41,397: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:41,876: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:41,877: root: INFO: Current backtesting datetime 2022-08-02 15:00:00-05:00 +2024-04-13 18:42:41,878: root: INFO: Current backtesting datetime 2022-08-03 08:30:00-05:00 +2024-04-13 18:42:41,878: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:41 +2024-04-13 18:42:41,878: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:41,879: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:41,879: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:41,880: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:41,880: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:42,438: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:42,439: root: INFO: Current backtesting datetime 2022-08-03 15:00:00-05:00 +2024-04-13 18:42:42,439: root: INFO: Current backtesting datetime 2022-08-04 08:30:00-05:00 +2024-04-13 18:42:42,440: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:42 +2024-04-13 18:42:42,440: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:42,440: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:42,441: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:42,441: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:42,441: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:43,104: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:43,105: root: INFO: Current backtesting datetime 2022-08-04 15:00:00-05:00 +2024-04-13 18:42:43,105: root: INFO: Current backtesting datetime 2022-08-05 08:30:00-05:00 +2024-04-13 18:42:43,106: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:43 +2024-04-13 18:42:43,106: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:43,107: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:43,107: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:43,107: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:43,107: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:43,864: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:43,865: root: INFO: Current backtesting datetime 2022-08-05 15:00:00-05:00 +2024-04-13 18:42:43,865: root: INFO: Current backtesting datetime 2022-08-06 08:30:00-05:00 +2024-04-13 18:42:43,866: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:43,867: root: INFO: Current backtesting datetime 2022-08-06 08:29:00-05:00 +2024-04-13 18:42:43,868: root: INFO: Current backtesting datetime 2022-08-06 08:29:00-05:00 +2024-04-13 18:42:43,868: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:43,869: root: INFO: Current backtesting datetime 2022-08-08 07:30:00-05:00 +2024-04-13 18:42:43,870: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:43,870: root: INFO: Current backtesting datetime 2022-08-08 08:30:00-05:00 +2024-04-13 18:42:43,870: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:43,871: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:43 +2024-04-13 18:42:43,871: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:43,873: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:43,873: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:43,873: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:43,873: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:44,551: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:44,552: root: INFO: Current backtesting datetime 2022-08-08 15:00:00-05:00 +2024-04-13 18:42:44,552: root: INFO: Current backtesting datetime 2022-08-09 08:30:00-05:00 +2024-04-13 18:42:44,553: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:44 +2024-04-13 18:42:44,553: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:44,554: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:44,554: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:44,554: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:44,555: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:45,499: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:45,500: root: INFO: Current backtesting datetime 2022-08-09 15:00:00-05:00 +2024-04-13 18:42:45,500: root: INFO: Current backtesting datetime 2022-08-10 08:30:00-05:00 +2024-04-13 18:42:45,501: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:45 +2024-04-13 18:42:45,501: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:45,501: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:45,502: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:45,502: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:45,502: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:46,156: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:46,157: root: INFO: Current backtesting datetime 2022-08-10 15:00:00-05:00 +2024-04-13 18:42:46,158: root: INFO: Current backtesting datetime 2022-08-11 08:30:00-05:00 +2024-04-13 18:42:46,158: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:46 +2024-04-13 18:42:46,158: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:46,159: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:46,159: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:46,160: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:46,160: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:47,085: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:47,086: root: INFO: Current backtesting datetime 2022-08-11 15:00:00-05:00 +2024-04-13 18:42:47,086: root: INFO: Current backtesting datetime 2022-08-12 08:30:00-05:00 +2024-04-13 18:42:47,087: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:47 +2024-04-13 18:42:47,087: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:47,088: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:47,088: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:47,089: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:47,089: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:47,879: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:47,880: root: INFO: Current backtesting datetime 2022-08-12 15:00:00-05:00 +2024-04-13 18:42:47,880: root: INFO: Current backtesting datetime 2022-08-13 08:30:00-05:00 +2024-04-13 18:42:47,881: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:47,882: root: INFO: Current backtesting datetime 2022-08-13 08:29:00-05:00 +2024-04-13 18:42:47,883: root: INFO: Current backtesting datetime 2022-08-13 08:29:00-05:00 +2024-04-13 18:42:47,884: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:47,884: root: INFO: Current backtesting datetime 2022-08-15 07:30:00-05:00 +2024-04-13 18:42:47,885: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:47,886: root: INFO: Current backtesting datetime 2022-08-15 08:30:00-05:00 +2024-04-13 18:42:47,886: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:47,887: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:47 +2024-04-13 18:42:47,887: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:47,888: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:47,888: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:47,888: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:47,889: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:48,377: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:48,378: root: INFO: Current backtesting datetime 2022-08-15 15:00:00-05:00 +2024-04-13 18:42:48,379: root: INFO: Current backtesting datetime 2022-08-16 08:30:00-05:00 +2024-04-13 18:42:48,379: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:48 +2024-04-13 18:42:48,379: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:48,380: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:48,380: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:48,381: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:48,381: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:49,011: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:49,012: root: INFO: Current backtesting datetime 2022-08-16 15:00:00-05:00 +2024-04-13 18:42:49,012: root: INFO: Current backtesting datetime 2022-08-17 08:30:00-05:00 +2024-04-13 18:42:49,012: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:49 +2024-04-13 18:42:49,012: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:49,013: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:49,013: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:49,014: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:49,014: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:49,802: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:49,804: root: INFO: Current backtesting datetime 2022-08-17 15:00:00-05:00 +2024-04-13 18:42:49,804: root: INFO: Current backtesting datetime 2022-08-18 08:30:00-05:00 +2024-04-13 18:42:49,804: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:49 +2024-04-13 18:42:49,804: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:49,805: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:49,805: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:49,806: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:49,806: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:50,442: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:50,443: root: INFO: Current backtesting datetime 2022-08-18 15:00:00-05:00 +2024-04-13 18:42:50,443: root: INFO: Current backtesting datetime 2022-08-19 08:30:00-05:00 +2024-04-13 18:42:50,444: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:50 +2024-04-13 18:42:50,444: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:50,445: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:50,445: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:50,445: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:50,445: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:51,088: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:51,089: root: INFO: Current backtesting datetime 2022-08-19 15:00:00-05:00 +2024-04-13 18:42:51,089: root: INFO: Current backtesting datetime 2022-08-20 08:30:00-05:00 +2024-04-13 18:42:51,089: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:51,091: root: INFO: Current backtesting datetime 2022-08-20 08:29:00-05:00 +2024-04-13 18:42:51,093: root: INFO: Current backtesting datetime 2022-08-20 08:29:00-05:00 +2024-04-13 18:42:51,093: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:51,094: root: INFO: Current backtesting datetime 2022-08-22 07:30:00-05:00 +2024-04-13 18:42:51,094: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:51,095: root: INFO: Current backtesting datetime 2022-08-22 08:30:00-05:00 +2024-04-13 18:42:51,095: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:51,096: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:51 +2024-04-13 18:42:51,096: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:51,097: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:51,097: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:51,098: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:51,098: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:51,945: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:51,946: root: INFO: Current backtesting datetime 2022-08-22 15:00:00-05:00 +2024-04-13 18:42:51,946: root: INFO: Current backtesting datetime 2022-08-23 08:30:00-05:00 +2024-04-13 18:42:51,947: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:51 +2024-04-13 18:42:51,947: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:51,948: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:51,948: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:51,948: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:51,948: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:52,652: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:52,653: root: INFO: Current backtesting datetime 2022-08-23 15:00:00-05:00 +2024-04-13 18:42:52,653: root: INFO: Current backtesting datetime 2022-08-24 08:30:00-05:00 +2024-04-13 18:42:52,653: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:52 +2024-04-13 18:42:52,654: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:52,654: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:52,655: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:52,655: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:52,655: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:53,643: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:53,644: root: INFO: Current backtesting datetime 2022-08-24 15:00:00-05:00 +2024-04-13 18:42:53,644: root: INFO: Current backtesting datetime 2022-08-25 08:30:00-05:00 +2024-04-13 18:42:53,644: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:53 +2024-04-13 18:42:53,645: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:53,645: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:53,646: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:53,646: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:53,646: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:54,526: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:54,527: root: INFO: Current backtesting datetime 2022-08-25 15:00:00-05:00 +2024-04-13 18:42:54,527: root: INFO: Current backtesting datetime 2022-08-26 08:30:00-05:00 +2024-04-13 18:42:54,527: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:54 +2024-04-13 18:42:54,528: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:54,528: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:54,528: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:54,529: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:54,529: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:55,197: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:55,198: root: INFO: Current backtesting datetime 2022-08-26 15:00:00-05:00 +2024-04-13 18:42:55,198: root: INFO: Current backtesting datetime 2022-08-27 08:30:00-05:00 +2024-04-13 18:42:55,198: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:55,200: root: INFO: Current backtesting datetime 2022-08-27 08:29:00-05:00 +2024-04-13 18:42:55,201: root: INFO: Current backtesting datetime 2022-08-27 08:29:00-05:00 +2024-04-13 18:42:55,201: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:55,202: root: INFO: Current backtesting datetime 2022-08-29 07:30:00-05:00 +2024-04-13 18:42:55,203: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:55,203: root: INFO: Current backtesting datetime 2022-08-29 08:30:00-05:00 +2024-04-13 18:42:55,204: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:55,205: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:55 +2024-04-13 18:42:55,205: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:55,205: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:55,206: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:55,206: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:55,206: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:56,009: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:56,010: root: INFO: Current backtesting datetime 2022-08-29 15:00:00-05:00 +2024-04-13 18:42:56,010: root: INFO: Current backtesting datetime 2022-08-30 08:30:00-05:00 +2024-04-13 18:42:56,011: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:56 +2024-04-13 18:42:56,011: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:56,011: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:56,012: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:56,012: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:56,012: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:56,773: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:56,774: root: INFO: Current backtesting datetime 2022-08-30 15:00:00-05:00 +2024-04-13 18:42:56,774: root: INFO: Current backtesting datetime 2022-08-31 08:30:00-05:00 +2024-04-13 18:42:56,775: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:56 +2024-04-13 18:42:56,775: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:56,776: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:56,776: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:56,776: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:56,777: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:57,397: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:57,398: root: INFO: Current backtesting datetime 2022-08-31 15:00:00-05:00 +2024-04-13 18:42:57,398: root: INFO: Current backtesting datetime 2022-09-01 08:30:00-05:00 +2024-04-13 18:42:57,398: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:57 +2024-04-13 18:42:57,398: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:57,398: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:57,400: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:57,400: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:57,400: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:58,047: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:58,048: root: INFO: Current backtesting datetime 2022-09-01 15:00:00-05:00 +2024-04-13 18:42:58,048: root: INFO: Current backtesting datetime 2022-09-02 08:30:00-05:00 +2024-04-13 18:42:58,049: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:58 +2024-04-13 18:42:58,049: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:58,050: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:58,050: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:58,050: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:58,050: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:58,817: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:58,818: root: INFO: Current backtesting datetime 2022-09-02 15:00:00-05:00 +2024-04-13 18:42:58,818: root: INFO: Current backtesting datetime 2022-09-03 08:30:00-05:00 +2024-04-13 18:42:58,819: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:42:58,820: root: INFO: Current backtesting datetime 2022-09-03 08:29:00-05:00 +2024-04-13 18:42:58,822: root: INFO: Current backtesting datetime 2022-09-03 08:29:00-05:00 +2024-04-13 18:42:58,822: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:42:58,822: root: INFO: Current backtesting datetime 2022-09-06 07:30:00-05:00 +2024-04-13 18:42:58,823: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:42:58,824: root: INFO: Current backtesting datetime 2022-09-06 08:30:00-05:00 +2024-04-13 18:42:58,824: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:42:58,825: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:58 +2024-04-13 18:42:58,825: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:58,826: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:58,826: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:58,826: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:58,826: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:59,307: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:59,308: root: INFO: Current backtesting datetime 2022-09-06 15:00:00-05:00 +2024-04-13 18:42:59,308: root: INFO: Current backtesting datetime 2022-09-07 08:30:00-05:00 +2024-04-13 18:42:59,309: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:59 +2024-04-13 18:42:59,309: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:59,310: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:59,310: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:59,310: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:59,311: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:42:59,839: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:42:59,840: root: INFO: Current backtesting datetime 2022-09-07 15:00:00-05:00 +2024-04-13 18:42:59,841: root: INFO: Current backtesting datetime 2022-09-08 08:30:00-05:00 +2024-04-13 18:42:59,841: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:42:59 +2024-04-13 18:42:59,841: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:59,842: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:42:59,842: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:42:59,843: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:42:59,843: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:01,047: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:01,048: root: INFO: Current backtesting datetime 2022-09-08 15:00:00-05:00 +2024-04-13 18:43:01,049: root: INFO: Current backtesting datetime 2022-09-09 08:30:00-05:00 +2024-04-13 18:43:01,049: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:01 +2024-04-13 18:43:01,049: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:01,050: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:01,050: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:01,051: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:01,051: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:01,948: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:01,949: root: INFO: Current backtesting datetime 2022-09-09 15:00:00-05:00 +2024-04-13 18:43:01,949: root: INFO: Current backtesting datetime 2022-09-10 08:30:00-05:00 +2024-04-13 18:43:01,950: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:01,952: root: INFO: Current backtesting datetime 2022-09-10 08:29:00-05:00 +2024-04-13 18:43:01,953: root: INFO: Current backtesting datetime 2022-09-10 08:29:00-05:00 +2024-04-13 18:43:01,953: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:01,954: root: INFO: Current backtesting datetime 2022-09-12 07:30:00-05:00 +2024-04-13 18:43:01,954: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:01,955: root: INFO: Current backtesting datetime 2022-09-12 08:30:00-05:00 +2024-04-13 18:43:01,955: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:01,956: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:01 +2024-04-13 18:43:01,957: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:01,957: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:01,958: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:01,958: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:01,958: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:02,526: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:02,527: root: INFO: Current backtesting datetime 2022-09-12 15:00:00-05:00 +2024-04-13 18:43:02,527: root: INFO: Current backtesting datetime 2022-09-13 08:30:00-05:00 +2024-04-13 18:43:02,528: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:02 +2024-04-13 18:43:02,528: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:02,529: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:02,529: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:02,529: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:02,529: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:03,054: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:03,054: root: INFO: Current backtesting datetime 2022-09-13 15:00:00-05:00 +2024-04-13 18:43:03,055: root: INFO: Current backtesting datetime 2022-09-14 08:30:00-05:00 +2024-04-13 18:43:03,055: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:03 +2024-04-13 18:43:03,055: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:03,056: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:03,056: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:03,057: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:03,057: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:03,777: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:03,778: root: INFO: Current backtesting datetime 2022-09-14 15:00:00-05:00 +2024-04-13 18:43:03,778: root: INFO: Current backtesting datetime 2022-09-15 08:30:00-05:00 +2024-04-13 18:43:03,779: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:03 +2024-04-13 18:43:03,779: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:03,779: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:03,780: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:03,780: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:03,780: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:04,704: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:04,705: root: INFO: Current backtesting datetime 2022-09-15 15:00:00-05:00 +2024-04-13 18:43:04,705: root: INFO: Current backtesting datetime 2022-09-16 08:30:00-05:00 +2024-04-13 18:43:04,706: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:04 +2024-04-13 18:43:04,706: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:04,706: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:04,707: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:04,707: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:04,707: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:05,579: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:05,580: root: INFO: Current backtesting datetime 2022-09-16 15:00:00-05:00 +2024-04-13 18:43:05,580: root: INFO: Current backtesting datetime 2022-09-17 08:30:00-05:00 +2024-04-13 18:43:05,581: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:05,582: root: INFO: Current backtesting datetime 2022-09-17 08:29:00-05:00 +2024-04-13 18:43:05,584: root: INFO: Current backtesting datetime 2022-09-17 08:29:00-05:00 +2024-04-13 18:43:05,584: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:05,584: root: INFO: Current backtesting datetime 2022-09-19 07:30:00-05:00 +2024-04-13 18:43:05,585: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:05,586: root: INFO: Current backtesting datetime 2022-09-19 08:30:00-05:00 +2024-04-13 18:43:05,586: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:05,587: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:05 +2024-04-13 18:43:05,587: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:05,588: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:05,588: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:05,588: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:05,588: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:06,196: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:06,197: root: INFO: Current backtesting datetime 2022-09-19 15:00:00-05:00 +2024-04-13 18:43:06,197: root: INFO: Current backtesting datetime 2022-09-20 08:30:00-05:00 +2024-04-13 18:43:06,198: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:06 +2024-04-13 18:43:06,198: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:06,199: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:06,199: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:06,199: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:06,199: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:07,055: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:07,056: root: INFO: Current backtesting datetime 2022-09-20 15:00:00-05:00 +2024-04-13 18:43:07,057: root: INFO: Current backtesting datetime 2022-09-21 08:30:00-05:00 +2024-04-13 18:43:07,057: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:07 +2024-04-13 18:43:07,057: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:07,058: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:07,058: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:07,058: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:07,058: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:07,868: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:07,869: root: INFO: Current backtesting datetime 2022-09-21 15:00:00-05:00 +2024-04-13 18:43:07,870: root: INFO: Current backtesting datetime 2022-09-22 08:30:00-05:00 +2024-04-13 18:43:07,870: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:07 +2024-04-13 18:43:07,870: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:07,871: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:07,871: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:07,872: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:07,872: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:08,648: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:08,649: root: INFO: Current backtesting datetime 2022-09-22 15:00:00-05:00 +2024-04-13 18:43:08,649: root: INFO: Current backtesting datetime 2022-09-23 08:30:00-05:00 +2024-04-13 18:43:08,650: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:08 +2024-04-13 18:43:08,650: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:08,650: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:08,651: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:08,651: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:08,651: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:09,515: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:09,516: root: INFO: Current backtesting datetime 2022-09-23 15:00:00-05:00 +2024-04-13 18:43:09,516: root: INFO: Current backtesting datetime 2022-09-24 08:30:00-05:00 +2024-04-13 18:43:09,516: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:09,518: root: INFO: Current backtesting datetime 2022-09-24 08:29:00-05:00 +2024-04-13 18:43:09,519: root: INFO: Current backtesting datetime 2022-09-24 08:29:00-05:00 +2024-04-13 18:43:09,519: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:09,520: root: INFO: Current backtesting datetime 2022-09-26 07:30:00-05:00 +2024-04-13 18:43:09,521: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:09,521: root: INFO: Current backtesting datetime 2022-09-26 08:30:00-05:00 +2024-04-13 18:43:09,521: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:09,522: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:09 +2024-04-13 18:43:09,522: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:09,523: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:09,523: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:09,524: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:09,524: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:10,372: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:10,373: root: INFO: Current backtesting datetime 2022-09-26 15:00:00-05:00 +2024-04-13 18:43:10,374: root: INFO: Current backtesting datetime 2022-09-27 08:30:00-05:00 +2024-04-13 18:43:10,374: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:10 +2024-04-13 18:43:10,374: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:10,375: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:10,375: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:10,376: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:10,376: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:11,844: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:11,844: root: INFO: Current backtesting datetime 2022-09-27 15:00:00-05:00 +2024-04-13 18:43:11,845: root: INFO: Current backtesting datetime 2022-09-28 08:30:00-05:00 +2024-04-13 18:43:11,845: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:11 +2024-04-13 18:43:11,845: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:11,846: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:11,846: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:11,847: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:11,847: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:13,086: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:13,086: root: INFO: Current backtesting datetime 2022-09-28 15:00:00-05:00 +2024-04-13 18:43:13,087: root: INFO: Current backtesting datetime 2022-09-29 08:30:00-05:00 +2024-04-13 18:43:13,087: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:13 +2024-04-13 18:43:13,087: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:13,088: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:13,088: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:13,089: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:13,089: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:13,917: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:13,918: root: INFO: Current backtesting datetime 2022-09-29 15:00:00-05:00 +2024-04-13 18:43:13,918: root: INFO: Current backtesting datetime 2022-09-30 08:30:00-05:00 +2024-04-13 18:43:13,919: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:13 +2024-04-13 18:43:13,919: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:13,919: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:13,920: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:13,920: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:13,920: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:14,677: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:14,678: root: INFO: Current backtesting datetime 2022-09-30 15:00:00-05:00 +2024-04-13 18:43:14,679: root: INFO: Current backtesting datetime 2022-10-01 08:30:00-05:00 +2024-04-13 18:43:14,679: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:14,681: root: INFO: Current backtesting datetime 2022-10-01 08:29:00-05:00 +2024-04-13 18:43:14,682: root: INFO: Current backtesting datetime 2022-10-01 08:29:00-05:00 +2024-04-13 18:43:14,682: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:14,682: root: INFO: Current backtesting datetime 2022-10-03 07:30:00-05:00 +2024-04-13 18:43:14,683: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:14,684: root: INFO: Current backtesting datetime 2022-10-03 08:30:00-05:00 +2024-04-13 18:43:14,684: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:14,685: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:14 +2024-04-13 18:43:14,685: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:14,686: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:14,686: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:14,686: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:14,686: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:15,581: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:15,582: root: INFO: Current backtesting datetime 2022-10-03 15:00:00-05:00 +2024-04-13 18:43:15,583: root: INFO: Current backtesting datetime 2022-10-04 08:30:00-05:00 +2024-04-13 18:43:15,583: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:15 +2024-04-13 18:43:15,583: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:15,584: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:15,584: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:15,585: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:15,585: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:16,386: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:16,387: root: INFO: Current backtesting datetime 2022-10-04 15:00:00-05:00 +2024-04-13 18:43:16,387: root: INFO: Current backtesting datetime 2022-10-05 08:30:00-05:00 +2024-04-13 18:43:16,388: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:16 +2024-04-13 18:43:16,388: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:16,389: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:16,389: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:16,390: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:16,390: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:17,045: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:17,046: root: INFO: Current backtesting datetime 2022-10-05 15:00:00-05:00 +2024-04-13 18:43:17,047: root: INFO: Current backtesting datetime 2022-10-06 08:30:00-05:00 +2024-04-13 18:43:17,047: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:17 +2024-04-13 18:43:17,047: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:17,048: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:17,048: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:17,049: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:17,049: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:18,237: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:18,238: root: INFO: Current backtesting datetime 2022-10-06 15:00:00-05:00 +2024-04-13 18:43:18,239: root: INFO: Current backtesting datetime 2022-10-07 08:30:00-05:00 +2024-04-13 18:43:18,239: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:18 +2024-04-13 18:43:18,239: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:18,240: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:18,240: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:18,241: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:18,241: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:19,135: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:19,136: root: INFO: Current backtesting datetime 2022-10-07 15:00:00-05:00 +2024-04-13 18:43:19,137: root: INFO: Current backtesting datetime 2022-10-08 08:30:00-05:00 +2024-04-13 18:43:19,137: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:19,139: root: INFO: Current backtesting datetime 2022-10-08 08:29:00-05:00 +2024-04-13 18:43:19,140: root: INFO: Current backtesting datetime 2022-10-08 08:29:00-05:00 +2024-04-13 18:43:19,140: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:19,141: root: INFO: Current backtesting datetime 2022-10-10 07:30:00-05:00 +2024-04-13 18:43:19,141: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:19,142: root: INFO: Current backtesting datetime 2022-10-10 08:30:00-05:00 +2024-04-13 18:43:19,142: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:19,143: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:19 +2024-04-13 18:43:19,143: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:19,144: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:19,144: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:19,145: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:19,145: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:20,219: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:20,220: root: INFO: Current backtesting datetime 2022-10-10 15:00:00-05:00 +2024-04-13 18:43:20,220: root: INFO: Current backtesting datetime 2022-10-11 08:30:00-05:00 +2024-04-13 18:43:20,220: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:20 +2024-04-13 18:43:20,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:20,221: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:20,221: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:20,222: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:20,222: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:21,014: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:21,016: root: INFO: Current backtesting datetime 2022-10-11 15:00:00-05:00 +2024-04-13 18:43:21,016: root: INFO: Current backtesting datetime 2022-10-12 08:30:00-05:00 +2024-04-13 18:43:21,016: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:21 +2024-04-13 18:43:21,016: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:21,017: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:21,017: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:21,018: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:21,018: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:21,837: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:21,838: root: INFO: Current backtesting datetime 2022-10-12 15:00:00-05:00 +2024-04-13 18:43:21,838: root: INFO: Current backtesting datetime 2022-10-13 08:30:00-05:00 +2024-04-13 18:43:21,839: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:21 +2024-04-13 18:43:21,839: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:21,840: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:21,840: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:21,840: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:21,840: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:22,386: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:22,387: root: INFO: Current backtesting datetime 2022-10-13 15:00:00-05:00 +2024-04-13 18:43:22,387: root: INFO: Current backtesting datetime 2022-10-14 08:30:00-05:00 +2024-04-13 18:43:22,388: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:22 +2024-04-13 18:43:22,388: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:22,388: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:22,389: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:22,389: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:22,389: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:23,071: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:23,072: root: INFO: Current backtesting datetime 2022-10-14 15:00:00-05:00 +2024-04-13 18:43:23,072: root: INFO: Current backtesting datetime 2022-10-15 08:30:00-05:00 +2024-04-13 18:43:23,073: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:23,074: root: INFO: Current backtesting datetime 2022-10-15 08:29:00-05:00 +2024-04-13 18:43:23,076: root: INFO: Current backtesting datetime 2022-10-15 08:29:00-05:00 +2024-04-13 18:43:23,076: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:23,077: root: INFO: Current backtesting datetime 2022-10-17 07:30:00-05:00 +2024-04-13 18:43:23,077: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:23,078: root: INFO: Current backtesting datetime 2022-10-17 08:30:00-05:00 +2024-04-13 18:43:23,078: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:23,079: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:23 +2024-04-13 18:43:23,079: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:23,079: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:23,080: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:23,080: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:23,080: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:23,904: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:23,905: root: INFO: Current backtesting datetime 2022-10-17 15:00:00-05:00 +2024-04-13 18:43:23,905: root: INFO: Current backtesting datetime 2022-10-18 08:30:00-05:00 +2024-04-13 18:43:23,906: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:23 +2024-04-13 18:43:23,906: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:23,906: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:23,907: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:23,907: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:23,907: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:24,453: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:24,454: root: INFO: Current backtesting datetime 2022-10-18 15:00:00-05:00 +2024-04-13 18:43:24,454: root: INFO: Current backtesting datetime 2022-10-19 08:30:00-05:00 +2024-04-13 18:43:24,455: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:24 +2024-04-13 18:43:24,455: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:24,456: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:24,456: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:24,456: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:24,456: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:25,189: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:25,190: root: INFO: Current backtesting datetime 2022-10-19 15:00:00-05:00 +2024-04-13 18:43:25,190: root: INFO: Current backtesting datetime 2022-10-20 08:30:00-05:00 +2024-04-13 18:43:25,190: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:25 +2024-04-13 18:43:25,191: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:25,191: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:25,192: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:25,192: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:25,192: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:26,083: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:26,084: root: INFO: Current backtesting datetime 2022-10-20 15:00:00-05:00 +2024-04-13 18:43:26,084: root: INFO: Current backtesting datetime 2022-10-21 08:30:00-05:00 +2024-04-13 18:43:26,084: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:26 +2024-04-13 18:43:26,084: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:26,085: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:26,086: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:26,086: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:26,086: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:26,944: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:26,945: root: INFO: Current backtesting datetime 2022-10-21 15:00:00-05:00 +2024-04-13 18:43:26,945: root: INFO: Current backtesting datetime 2022-10-22 08:30:00-05:00 +2024-04-13 18:43:26,946: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:26,947: root: INFO: Current backtesting datetime 2022-10-22 08:29:00-05:00 +2024-04-13 18:43:26,948: root: INFO: Current backtesting datetime 2022-10-22 08:29:00-05:00 +2024-04-13 18:43:26,948: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:26,950: root: INFO: Current backtesting datetime 2022-10-24 07:30:00-05:00 +2024-04-13 18:43:26,950: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:26,951: root: INFO: Current backtesting datetime 2022-10-24 08:30:00-05:00 +2024-04-13 18:43:26,951: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:26,952: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:26 +2024-04-13 18:43:26,952: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:26,953: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:26,953: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:26,954: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:26,954: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:27,778: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:27,779: root: INFO: Current backtesting datetime 2022-10-24 15:00:00-05:00 +2024-04-13 18:43:27,779: root: INFO: Current backtesting datetime 2022-10-25 08:30:00-05:00 +2024-04-13 18:43:27,780: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:27 +2024-04-13 18:43:27,780: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:27,781: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:27,781: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:27,781: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:27,782: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:28,609: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:28,610: root: INFO: Current backtesting datetime 2022-10-25 15:00:00-05:00 +2024-04-13 18:43:28,610: root: INFO: Current backtesting datetime 2022-10-26 08:30:00-05:00 +2024-04-13 18:43:28,611: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:28 +2024-04-13 18:43:28,611: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:28,612: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:28,612: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:28,613: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:28,613: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:29,065: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:29,066: root: INFO: Current backtesting datetime 2022-10-26 15:00:00-05:00 +2024-04-13 18:43:29,066: root: INFO: Current backtesting datetime 2022-10-27 08:30:00-05:00 +2024-04-13 18:43:29,067: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:29 +2024-04-13 18:43:29,067: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:29,068: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:29,068: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:29,068: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:29,068: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:29,798: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:29,799: root: INFO: Current backtesting datetime 2022-10-27 15:00:00-05:00 +2024-04-13 18:43:29,799: root: INFO: Current backtesting datetime 2022-10-28 08:30:00-05:00 +2024-04-13 18:43:29,800: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:29 +2024-04-13 18:43:29,800: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:29,801: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:29,801: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:29,801: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:29,801: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:30,537: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:30,538: root: INFO: Current backtesting datetime 2022-10-28 15:00:00-05:00 +2024-04-13 18:43:30,538: root: INFO: Current backtesting datetime 2022-10-29 08:30:00-05:00 +2024-04-13 18:43:30,539: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:30,540: root: INFO: Current backtesting datetime 2022-10-29 08:29:00-05:00 +2024-04-13 18:43:30,542: root: INFO: Current backtesting datetime 2022-10-29 08:29:00-05:00 +2024-04-13 18:43:30,542: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:30,542: root: INFO: Current backtesting datetime 2022-10-31 07:30:00-05:00 +2024-04-13 18:43:30,543: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:30,544: root: INFO: Current backtesting datetime 2022-10-31 08:30:00-05:00 +2024-04-13 18:43:30,544: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:30,545: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:30 +2024-04-13 18:43:30,545: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:30,546: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:30,546: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:30,546: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:30,546: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:31,417: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:31,418: root: INFO: Current backtesting datetime 2022-10-31 15:00:00-05:00 +2024-04-13 18:43:31,419: root: INFO: Current backtesting datetime 2022-11-01 08:30:00-05:00 +2024-04-13 18:43:31,419: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:31 +2024-04-13 18:43:31,419: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:31,420: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:31,420: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:31,421: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:31,421: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:31,992: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:31,993: root: INFO: Current backtesting datetime 2022-11-01 15:00:00-05:00 +2024-04-13 18:43:31,993: root: INFO: Current backtesting datetime 2022-11-02 08:30:00-05:00 +2024-04-13 18:43:31,993: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:31 +2024-04-13 18:43:31,994: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:31,994: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:31,995: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:31,995: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:31,995: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:32,764: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:32,765: root: INFO: Current backtesting datetime 2022-11-02 15:00:00-05:00 +2024-04-13 18:43:32,766: root: INFO: Current backtesting datetime 2022-11-03 08:30:00-05:00 +2024-04-13 18:43:32,766: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:32 +2024-04-13 18:43:32,766: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:32,767: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:32,767: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:32,768: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:32,768: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:33,484: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:33,485: root: INFO: Current backtesting datetime 2022-11-03 15:00:00-05:00 +2024-04-13 18:43:33,486: root: INFO: Current backtesting datetime 2022-11-04 08:30:00-05:00 +2024-04-13 18:43:33,486: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:33 +2024-04-13 18:43:33,486: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:33,487: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:33,487: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:33,488: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:33,488: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:34,025: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:34,026: root: INFO: Current backtesting datetime 2022-11-04 15:00:00-05:00 +2024-04-13 18:43:34,026: root: INFO: Current backtesting datetime 2022-11-05 08:30:00-05:00 +2024-04-13 18:43:34,026: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:34,028: root: INFO: Current backtesting datetime 2022-11-05 08:29:00-05:00 +2024-04-13 18:43:34,029: root: INFO: Current backtesting datetime 2022-11-05 08:29:00-05:00 +2024-04-13 18:43:34,029: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:34,030: root: INFO: Current backtesting datetime 2022-11-07 08:30:00-05:00 +2024-04-13 18:43:34,031: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:34,032: root: INFO: Current backtesting datetime 2022-11-07 09:30:00-05:00 +2024-04-13 18:43:34,032: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:34,033: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:34 +2024-04-13 18:43:34,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:34,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:34,034: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:34,034: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:34,034: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:34,800: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:34,801: root: INFO: Current backtesting datetime 2022-11-07 16:00:00-05:00 +2024-04-13 18:43:34,801: root: INFO: Current backtesting datetime 2022-11-08 09:30:00-05:00 +2024-04-13 18:43:34,801: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:34 +2024-04-13 18:43:34,801: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:34,802: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:34,802: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:34,803: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:34,803: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:35,502: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:35,503: root: INFO: Current backtesting datetime 2022-11-08 16:00:00-05:00 +2024-04-13 18:43:35,503: root: INFO: Current backtesting datetime 2022-11-09 09:30:00-05:00 +2024-04-13 18:43:35,504: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:35 +2024-04-13 18:43:35,504: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:35,505: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:35,505: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:35,506: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:35,506: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:36,349: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:36,350: root: INFO: Current backtesting datetime 2022-11-09 16:00:00-05:00 +2024-04-13 18:43:36,350: root: INFO: Current backtesting datetime 2022-11-10 09:30:00-05:00 +2024-04-13 18:43:36,351: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:36 +2024-04-13 18:43:36,351: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:36,352: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:36,352: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:36,353: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:36,353: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:37,017: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:37,018: root: INFO: Current backtesting datetime 2022-11-10 16:00:00-05:00 +2024-04-13 18:43:37,019: root: INFO: Current backtesting datetime 2022-11-11 09:30:00-05:00 +2024-04-13 18:43:37,019: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:37 +2024-04-13 18:43:37,019: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:37,020: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:37,020: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:37,021: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:37,021: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:37,788: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:37,789: root: INFO: Current backtesting datetime 2022-11-11 16:00:00-05:00 +2024-04-13 18:43:37,790: root: INFO: Current backtesting datetime 2022-11-12 09:30:00-05:00 +2024-04-13 18:43:37,790: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:37,792: root: INFO: Current backtesting datetime 2022-11-12 09:29:00-05:00 +2024-04-13 18:43:37,793: root: INFO: Current backtesting datetime 2022-11-12 09:29:00-05:00 +2024-04-13 18:43:37,793: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:37,794: root: INFO: Current backtesting datetime 2022-11-14 08:30:00-05:00 +2024-04-13 18:43:37,794: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:37,795: root: INFO: Current backtesting datetime 2022-11-14 09:30:00-05:00 +2024-04-13 18:43:37,795: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:37,796: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:37 +2024-04-13 18:43:37,796: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:37,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:37,797: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:37,798: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:37,798: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:38,564: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:38,565: root: INFO: Current backtesting datetime 2022-11-14 16:00:00-05:00 +2024-04-13 18:43:38,565: root: INFO: Current backtesting datetime 2022-11-15 09:30:00-05:00 +2024-04-13 18:43:38,565: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:38 +2024-04-13 18:43:38,565: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:38,566: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:38,566: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:38,567: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:38,567: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:39,111: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:39,112: root: INFO: Current backtesting datetime 2022-11-15 16:00:00-05:00 +2024-04-13 18:43:39,113: root: INFO: Current backtesting datetime 2022-11-16 09:30:00-05:00 +2024-04-13 18:43:39,113: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:39 +2024-04-13 18:43:39,113: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:39,114: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:39,114: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:39,115: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:39,115: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:39,958: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:39,959: root: INFO: Current backtesting datetime 2022-11-16 16:00:00-05:00 +2024-04-13 18:43:39,959: root: INFO: Current backtesting datetime 2022-11-17 09:30:00-05:00 +2024-04-13 18:43:39,960: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:39 +2024-04-13 18:43:39,960: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:39,961: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:39,961: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:39,961: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:39,961: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:40,589: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:40,590: root: INFO: Current backtesting datetime 2022-11-17 16:00:00-05:00 +2024-04-13 18:43:40,590: root: INFO: Current backtesting datetime 2022-11-18 09:30:00-05:00 +2024-04-13 18:43:40,591: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:40 +2024-04-13 18:43:40,591: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:40,592: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:40,592: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:40,593: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:40,593: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:41,588: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:41,589: root: INFO: Current backtesting datetime 2022-11-18 16:00:00-05:00 +2024-04-13 18:43:41,589: root: INFO: Current backtesting datetime 2022-11-19 09:30:00-05:00 +2024-04-13 18:43:41,589: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:41,591: root: INFO: Current backtesting datetime 2022-11-19 09:29:00-05:00 +2024-04-13 18:43:41,592: root: INFO: Current backtesting datetime 2022-11-19 09:29:00-05:00 +2024-04-13 18:43:41,592: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:41,593: root: INFO: Current backtesting datetime 2022-11-21 08:30:00-05:00 +2024-04-13 18:43:41,593: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:41,595: root: INFO: Current backtesting datetime 2022-11-21 09:30:00-05:00 +2024-04-13 18:43:41,595: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:41,596: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:41 +2024-04-13 18:43:41,596: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:41,597: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:41,597: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:41,598: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:41,598: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:42,738: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:42,739: root: INFO: Current backtesting datetime 2022-11-21 16:00:00-05:00 +2024-04-13 18:43:42,739: root: INFO: Current backtesting datetime 2022-11-22 09:30:00-05:00 +2024-04-13 18:43:42,740: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:42 +2024-04-13 18:43:42,740: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:42,741: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:42,741: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:42,742: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:42,742: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:43,658: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:43,659: root: INFO: Current backtesting datetime 2022-11-22 16:00:00-05:00 +2024-04-13 18:43:43,659: root: INFO: Current backtesting datetime 2022-11-23 09:30:00-05:00 +2024-04-13 18:43:43,660: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:43 +2024-04-13 18:43:43,660: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:43,661: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:43,661: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:43,661: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:43,662: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:44,423: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:44,424: root: INFO: Current backtesting datetime 2022-11-23 16:00:00-05:00 +2024-04-13 18:43:44,424: root: INFO: Current backtesting datetime 2022-11-24 09:30:00-05:00 +2024-04-13 18:43:44,425: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:44,426: root: INFO: Current backtesting datetime 2022-11-24 09:29:00-05:00 +2024-04-13 18:43:44,427: root: INFO: Current backtesting datetime 2022-11-24 09:29:00-05:00 +2024-04-13 18:43:44,427: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:44,428: root: INFO: Current backtesting datetime 2022-11-25 08:30:00-05:00 +2024-04-13 18:43:44,428: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:44,429: root: INFO: Current backtesting datetime 2022-11-25 09:30:00-05:00 +2024-04-13 18:43:44,429: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:44,430: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:44 +2024-04-13 18:43:44,431: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:44,431: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:44,432: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:44,432: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:44,432: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:44,993: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:44,994: root: INFO: Current backtesting datetime 2022-11-25 13:00:00-05:00 +2024-04-13 18:43:44,995: root: INFO: Current backtesting datetime 2022-11-26 09:30:00-05:00 +2024-04-13 18:43:44,995: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:44,997: root: INFO: Current backtesting datetime 2022-11-26 09:29:00-05:00 +2024-04-13 18:43:44,998: root: INFO: Current backtesting datetime 2022-11-26 09:29:00-05:00 +2024-04-13 18:43:44,998: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:44,999: root: INFO: Current backtesting datetime 2022-11-28 08:30:00-05:00 +2024-04-13 18:43:44,999: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:45,000: root: INFO: Current backtesting datetime 2022-11-28 09:30:00-05:00 +2024-04-13 18:43:45,000: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:45,001: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:45 +2024-04-13 18:43:45,001: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:45,002: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:45,002: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:45,003: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:45,003: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:45,930: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:45,930: root: INFO: Current backtesting datetime 2022-11-28 16:00:00-05:00 +2024-04-13 18:43:45,931: root: INFO: Current backtesting datetime 2022-11-29 09:30:00-05:00 +2024-04-13 18:43:45,931: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:45 +2024-04-13 18:43:45,931: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:45,932: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:45,932: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:45,933: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:45,933: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:46,688: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:46,690: root: INFO: Current backtesting datetime 2022-11-29 16:00:00-05:00 +2024-04-13 18:43:46,690: root: INFO: Current backtesting datetime 2022-11-30 09:30:00-05:00 +2024-04-13 18:43:46,690: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:46 +2024-04-13 18:43:46,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:46,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:46,691: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:46,692: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:46,692: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:47,525: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:47,526: root: INFO: Current backtesting datetime 2022-11-30 16:00:00-05:00 +2024-04-13 18:43:47,526: root: INFO: Current backtesting datetime 2022-12-01 09:30:00-05:00 +2024-04-13 18:43:47,527: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:47 +2024-04-13 18:43:47,527: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:47,527: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:47,528: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:47,528: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:47,528: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:48,244: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:48,245: root: INFO: Current backtesting datetime 2022-12-01 16:00:00-05:00 +2024-04-13 18:43:48,245: root: INFO: Current backtesting datetime 2022-12-02 09:30:00-05:00 +2024-04-13 18:43:48,246: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:48 +2024-04-13 18:43:48,246: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:48,247: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:48,247: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:48,247: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:48,247: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:50,037: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:50,038: root: INFO: Current backtesting datetime 2022-12-02 16:00:00-05:00 +2024-04-13 18:43:50,038: root: INFO: Current backtesting datetime 2022-12-03 09:30:00-05:00 +2024-04-13 18:43:50,039: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:50,040: root: INFO: Current backtesting datetime 2022-12-03 09:29:00-05:00 +2024-04-13 18:43:50,041: root: INFO: Current backtesting datetime 2022-12-03 09:29:00-05:00 +2024-04-13 18:43:50,041: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:50,041: root: INFO: Current backtesting datetime 2022-12-05 08:30:00-05:00 +2024-04-13 18:43:50,043: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:50,044: root: INFO: Current backtesting datetime 2022-12-05 09:30:00-05:00 +2024-04-13 18:43:50,044: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:50,045: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:50 +2024-04-13 18:43:50,045: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:50,045: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:50,046: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:50,046: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:50,046: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:51,020: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:51,021: root: INFO: Current backtesting datetime 2022-12-05 16:00:00-05:00 +2024-04-13 18:43:51,021: root: INFO: Current backtesting datetime 2022-12-06 09:30:00-05:00 +2024-04-13 18:43:51,022: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:51 +2024-04-13 18:43:51,022: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:51,023: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:51,023: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:51,023: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:51,023: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:51,869: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:51,870: root: INFO: Current backtesting datetime 2022-12-06 16:00:00-05:00 +2024-04-13 18:43:51,871: root: INFO: Current backtesting datetime 2022-12-07 09:30:00-05:00 +2024-04-13 18:43:51,871: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:51 +2024-04-13 18:43:51,871: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:51,872: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:51,872: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:51,873: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:51,873: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:52,533: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:52,533: root: INFO: Current backtesting datetime 2022-12-07 16:00:00-05:00 +2024-04-13 18:43:52,533: root: INFO: Current backtesting datetime 2022-12-08 09:30:00-05:00 +2024-04-13 18:43:52,534: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:52 +2024-04-13 18:43:52,534: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:52,535: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:52,535: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:52,535: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:52,535: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:53,152: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:53,154: root: INFO: Current backtesting datetime 2022-12-08 16:00:00-05:00 +2024-04-13 18:43:53,154: root: INFO: Current backtesting datetime 2022-12-09 09:30:00-05:00 +2024-04-13 18:43:53,154: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:53 +2024-04-13 18:43:53,154: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:53,155: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:53,155: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:53,156: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:53,156: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:53,905: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:53,906: root: INFO: Current backtesting datetime 2022-12-09 16:00:00-05:00 +2024-04-13 18:43:53,906: root: INFO: Current backtesting datetime 2022-12-10 09:30:00-05:00 +2024-04-13 18:43:53,906: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:53,908: root: INFO: Current backtesting datetime 2022-12-10 09:29:00-05:00 +2024-04-13 18:43:53,909: root: INFO: Current backtesting datetime 2022-12-10 09:29:00-05:00 +2024-04-13 18:43:53,909: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:53,909: root: INFO: Current backtesting datetime 2022-12-12 08:30:00-05:00 +2024-04-13 18:43:53,909: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:53,911: root: INFO: Current backtesting datetime 2022-12-12 09:30:00-05:00 +2024-04-13 18:43:53,911: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:53,912: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:53 +2024-04-13 18:43:53,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:53,913: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:53,913: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:53,913: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:53,913: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:54,518: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:54,519: root: INFO: Current backtesting datetime 2022-12-12 16:00:00-05:00 +2024-04-13 18:43:54,519: root: INFO: Current backtesting datetime 2022-12-13 09:30:00-05:00 +2024-04-13 18:43:54,520: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:54 +2024-04-13 18:43:54,520: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:54,521: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:54,521: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:54,522: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:54,522: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:55,167: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:55,168: root: INFO: Current backtesting datetime 2022-12-13 16:00:00-05:00 +2024-04-13 18:43:55,169: root: INFO: Current backtesting datetime 2022-12-14 09:30:00-05:00 +2024-04-13 18:43:55,169: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:55 +2024-04-13 18:43:55,169: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:55,170: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:55,170: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:55,171: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:55,171: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:56,000: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:56,001: root: INFO: Current backtesting datetime 2022-12-14 16:00:00-05:00 +2024-04-13 18:43:56,001: root: INFO: Current backtesting datetime 2022-12-15 09:30:00-05:00 +2024-04-13 18:43:56,002: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:56 +2024-04-13 18:43:56,002: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:56,003: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:56,003: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:56,003: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:56,003: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:56,687: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:56,688: root: INFO: Current backtesting datetime 2022-12-15 16:00:00-05:00 +2024-04-13 18:43:56,689: root: INFO: Current backtesting datetime 2022-12-16 09:30:00-05:00 +2024-04-13 18:43:56,689: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:56 +2024-04-13 18:43:56,689: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:56,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:56,690: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:56,691: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:56,691: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:57,061: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:57,062: root: INFO: Current backtesting datetime 2022-12-16 16:00:00-05:00 +2024-04-13 18:43:57,062: root: INFO: Current backtesting datetime 2022-12-17 09:30:00-05:00 +2024-04-13 18:43:57,063: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:43:57,065: root: INFO: Current backtesting datetime 2022-12-17 09:29:00-05:00 +2024-04-13 18:43:57,066: root: INFO: Current backtesting datetime 2022-12-17 09:29:00-05:00 +2024-04-13 18:43:57,066: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:43:57,067: root: INFO: Current backtesting datetime 2022-12-19 08:30:00-05:00 +2024-04-13 18:43:57,067: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:43:57,068: root: INFO: Current backtesting datetime 2022-12-19 09:30:00-05:00 +2024-04-13 18:43:57,068: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:43:57,069: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:57 +2024-04-13 18:43:57,069: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:57,070: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:57,070: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:57,071: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:57,071: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:58,467: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:58,468: root: INFO: Current backtesting datetime 2022-12-19 16:00:00-05:00 +2024-04-13 18:43:58,468: root: INFO: Current backtesting datetime 2022-12-20 09:30:00-05:00 +2024-04-13 18:43:58,469: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:58 +2024-04-13 18:43:58,469: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:58,469: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:58,470: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:58,470: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:58,470: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:59,218: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:59,219: root: INFO: Current backtesting datetime 2022-12-20 16:00:00-05:00 +2024-04-13 18:43:59,219: root: INFO: Current backtesting datetime 2022-12-21 09:30:00-05:00 +2024-04-13 18:43:59,219: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:59 +2024-04-13 18:43:59,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:59,220: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:59,221: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:59,221: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:59,221: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:43:59,889: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:43:59,890: root: INFO: Current backtesting datetime 2022-12-21 16:00:00-05:00 +2024-04-13 18:43:59,891: root: INFO: Current backtesting datetime 2022-12-22 09:30:00-05:00 +2024-04-13 18:43:59,891: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:43:59 +2024-04-13 18:43:59,891: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:59,892: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:43:59,892: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:43:59,893: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:43:59,893: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:00,488: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:00,489: root: INFO: Current backtesting datetime 2022-12-22 16:00:00-05:00 +2024-04-13 18:44:00,489: root: INFO: Current backtesting datetime 2022-12-23 09:30:00-05:00 +2024-04-13 18:44:00,490: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:00 +2024-04-13 18:44:00,490: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:00,491: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:00,491: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:00,491: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:00,491: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:01,055: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:01,055: root: INFO: Current backtesting datetime 2022-12-23 16:00:00-05:00 +2024-04-13 18:44:01,056: root: INFO: Current backtesting datetime 2022-12-24 09:30:00-05:00 +2024-04-13 18:44:01,056: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:01,057: root: INFO: Current backtesting datetime 2022-12-24 09:29:00-05:00 +2024-04-13 18:44:01,058: root: INFO: Current backtesting datetime 2022-12-24 09:29:00-05:00 +2024-04-13 18:44:01,058: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:01,059: root: INFO: Current backtesting datetime 2022-12-27 08:30:00-05:00 +2024-04-13 18:44:01,059: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:01,061: root: INFO: Current backtesting datetime 2022-12-27 09:30:00-05:00 +2024-04-13 18:44:01,061: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:01,061: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:01 +2024-04-13 18:44:01,061: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:01,062: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:01,062: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:01,063: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:01,063: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:01,759: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:01,760: root: INFO: Current backtesting datetime 2022-12-27 16:00:00-05:00 +2024-04-13 18:44:01,761: root: INFO: Current backtesting datetime 2022-12-28 09:30:00-05:00 +2024-04-13 18:44:01,761: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:01 +2024-04-13 18:44:01,761: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:01,762: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:01,762: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:01,763: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:01,763: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:02,587: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:02,588: root: INFO: Current backtesting datetime 2022-12-28 16:00:00-05:00 +2024-04-13 18:44:02,588: root: INFO: Current backtesting datetime 2022-12-29 09:30:00-05:00 +2024-04-13 18:44:02,589: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:02 +2024-04-13 18:44:02,589: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:02,590: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:02,590: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:02,590: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:02,591: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:03,716: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:03,717: root: INFO: Current backtesting datetime 2022-12-29 16:00:00-05:00 +2024-04-13 18:44:03,717: root: INFO: Current backtesting datetime 2022-12-30 09:30:00-05:00 +2024-04-13 18:44:03,717: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:03 +2024-04-13 18:44:03,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:03,718: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:03,719: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:03,719: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:03,719: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:04,594: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:04,595: root: INFO: Current backtesting datetime 2022-12-30 16:00:00-05:00 +2024-04-13 18:44:04,596: root: INFO: Current backtesting datetime 2022-12-31 09:30:00-05:00 +2024-04-13 18:44:04,596: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:04,597: root: INFO: Current backtesting datetime 2022-12-31 09:29:00-05:00 +2024-04-13 18:44:04,599: root: INFO: Current backtesting datetime 2022-12-31 09:29:00-05:00 +2024-04-13 18:44:04,599: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:04,600: root: INFO: Current backtesting datetime 2023-01-03 08:30:00-05:00 +2024-04-13 18:44:04,600: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:04,601: root: INFO: Current backtesting datetime 2023-01-03 09:30:00-05:00 +2024-04-13 18:44:04,601: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:04,602: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:04 +2024-04-13 18:44:04,602: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:04,603: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:04,603: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:04,604: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:04,604: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:05,579: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:05,580: root: INFO: Current backtesting datetime 2023-01-03 16:00:00-05:00 +2024-04-13 18:44:05,580: root: INFO: Current backtesting datetime 2023-01-04 09:30:00-05:00 +2024-04-13 18:44:05,580: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:05 +2024-04-13 18:44:05,580: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:05,581: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:05,581: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:05,582: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:05,582: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:06,411: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:06,412: root: INFO: Current backtesting datetime 2023-01-04 16:00:00-05:00 +2024-04-13 18:44:06,413: root: INFO: Current backtesting datetime 2023-01-05 09:30:00-05:00 +2024-04-13 18:44:06,413: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:06 +2024-04-13 18:44:06,413: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:06,414: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:06,414: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:06,415: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:06,415: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:07,104: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:07,105: root: INFO: Current backtesting datetime 2023-01-05 16:00:00-05:00 +2024-04-13 18:44:07,105: root: INFO: Current backtesting datetime 2023-01-06 09:30:00-05:00 +2024-04-13 18:44:07,106: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:07 +2024-04-13 18:44:07,106: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:07,106: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:07,107: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:07,107: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:07,107: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:07,845: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:07,846: root: INFO: Current backtesting datetime 2023-01-06 16:00:00-05:00 +2024-04-13 18:44:07,846: root: INFO: Current backtesting datetime 2023-01-07 09:30:00-05:00 +2024-04-13 18:44:07,846: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:07,848: root: INFO: Current backtesting datetime 2023-01-07 09:29:00-05:00 +2024-04-13 18:44:07,849: root: INFO: Current backtesting datetime 2023-01-07 09:29:00-05:00 +2024-04-13 18:44:07,849: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:07,850: root: INFO: Current backtesting datetime 2023-01-09 08:30:00-05:00 +2024-04-13 18:44:07,850: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:07,851: root: INFO: Current backtesting datetime 2023-01-09 09:30:00-05:00 +2024-04-13 18:44:07,851: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:07,852: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:07 +2024-04-13 18:44:07,852: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:07,853: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:07,853: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:07,854: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:07,854: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:08,470: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:08,471: root: INFO: Current backtesting datetime 2023-01-09 16:00:00-05:00 +2024-04-13 18:44:08,472: root: INFO: Current backtesting datetime 2023-01-10 09:30:00-05:00 +2024-04-13 18:44:08,472: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:08 +2024-04-13 18:44:08,472: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:08,473: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:08,473: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:08,474: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:08,474: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:09,058: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:09,059: root: INFO: Current backtesting datetime 2023-01-10 16:00:00-05:00 +2024-04-13 18:44:09,059: root: INFO: Current backtesting datetime 2023-01-11 09:30:00-05:00 +2024-04-13 18:44:09,060: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:09 +2024-04-13 18:44:09,060: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:09,061: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:09,061: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:09,062: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:09,062: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:09,876: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:09,877: root: INFO: Current backtesting datetime 2023-01-11 16:00:00-05:00 +2024-04-13 18:44:09,877: root: INFO: Current backtesting datetime 2023-01-12 09:30:00-05:00 +2024-04-13 18:44:09,878: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:09 +2024-04-13 18:44:09,878: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:09,879: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:09,879: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:09,879: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:09,879: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:10,503: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:10,504: root: INFO: Current backtesting datetime 2023-01-12 16:00:00-05:00 +2024-04-13 18:44:10,504: root: INFO: Current backtesting datetime 2023-01-13 09:30:00-05:00 +2024-04-13 18:44:10,504: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:10 +2024-04-13 18:44:10,505: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:10,505: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:10,506: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:10,506: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:10,506: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:11,049: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:11,050: root: INFO: Current backtesting datetime 2023-01-13 16:00:00-05:00 +2024-04-13 18:44:11,050: root: INFO: Current backtesting datetime 2023-01-14 09:30:00-05:00 +2024-04-13 18:44:11,051: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:11,052: root: INFO: Current backtesting datetime 2023-01-14 09:29:00-05:00 +2024-04-13 18:44:11,053: root: INFO: Current backtesting datetime 2023-01-14 09:29:00-05:00 +2024-04-13 18:44:11,053: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:11,054: root: INFO: Current backtesting datetime 2023-01-17 08:30:00-05:00 +2024-04-13 18:44:11,055: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:11,056: root: INFO: Current backtesting datetime 2023-01-17 09:30:00-05:00 +2024-04-13 18:44:11,056: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:11,057: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:11 +2024-04-13 18:44:11,057: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:11,058: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:11,058: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:11,058: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:11,058: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:11,836: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:11,837: root: INFO: Current backtesting datetime 2023-01-17 16:00:00-05:00 +2024-04-13 18:44:11,837: root: INFO: Current backtesting datetime 2023-01-18 09:30:00-05:00 +2024-04-13 18:44:11,838: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:11 +2024-04-13 18:44:11,838: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:11,838: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:11,839: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:11,839: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:11,839: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:12,471: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:12,472: root: INFO: Current backtesting datetime 2023-01-18 16:00:00-05:00 +2024-04-13 18:44:12,472: root: INFO: Current backtesting datetime 2023-01-19 09:30:00-05:00 +2024-04-13 18:44:12,472: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:12 +2024-04-13 18:44:12,473: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:12,473: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:12,474: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:12,474: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:12,474: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:13,065: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:13,067: root: INFO: Current backtesting datetime 2023-01-19 16:00:00-05:00 +2024-04-13 18:44:13,067: root: INFO: Current backtesting datetime 2023-01-20 09:30:00-05:00 +2024-04-13 18:44:13,067: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:13 +2024-04-13 18:44:13,067: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:13,068: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:13,068: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:13,069: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:13,069: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:14,091: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:14,092: root: INFO: Current backtesting datetime 2023-01-20 16:00:00-05:00 +2024-04-13 18:44:14,092: root: INFO: Current backtesting datetime 2023-01-21 09:30:00-05:00 +2024-04-13 18:44:14,093: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:14,094: root: INFO: Current backtesting datetime 2023-01-21 09:29:00-05:00 +2024-04-13 18:44:14,095: root: INFO: Current backtesting datetime 2023-01-21 09:29:00-05:00 +2024-04-13 18:44:14,095: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:14,096: root: INFO: Current backtesting datetime 2023-01-23 08:30:00-05:00 +2024-04-13 18:44:14,096: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:14,097: root: INFO: Current backtesting datetime 2023-01-23 09:30:00-05:00 +2024-04-13 18:44:14,097: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:14,098: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:14 +2024-04-13 18:44:14,098: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:14,099: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:14,099: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:14,100: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:14,100: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:14,913: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:14,914: root: INFO: Current backtesting datetime 2023-01-23 16:00:00-05:00 +2024-04-13 18:44:14,914: root: INFO: Current backtesting datetime 2023-01-24 09:30:00-05:00 +2024-04-13 18:44:14,915: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:14 +2024-04-13 18:44:14,915: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:14,915: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:14,916: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:14,916: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:14,916: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:15,527: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:15,528: root: INFO: Current backtesting datetime 2023-01-24 16:00:00-05:00 +2024-04-13 18:44:15,528: root: INFO: Current backtesting datetime 2023-01-25 09:30:00-05:00 +2024-04-13 18:44:15,529: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:15 +2024-04-13 18:44:15,529: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:15,530: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:15,530: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:15,530: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:15,530: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:16,137: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:16,137: root: INFO: Current backtesting datetime 2023-01-25 16:00:00-05:00 +2024-04-13 18:44:16,138: root: INFO: Current backtesting datetime 2023-01-26 09:30:00-05:00 +2024-04-13 18:44:16,139: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:16 +2024-04-13 18:44:16,139: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:16,139: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:16,140: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:16,140: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:16,140: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:16,885: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:16,886: root: INFO: Current backtesting datetime 2023-01-26 16:00:00-05:00 +2024-04-13 18:44:16,886: root: INFO: Current backtesting datetime 2023-01-27 09:30:00-05:00 +2024-04-13 18:44:16,886: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:16 +2024-04-13 18:44:16,886: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:16,887: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:16,887: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:16,888: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:16,888: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:17,550: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:17,551: root: INFO: Current backtesting datetime 2023-01-27 16:00:00-05:00 +2024-04-13 18:44:17,551: root: INFO: Current backtesting datetime 2023-01-28 09:30:00-05:00 +2024-04-13 18:44:17,551: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:17,553: root: INFO: Current backtesting datetime 2023-01-28 09:29:00-05:00 +2024-04-13 18:44:17,554: root: INFO: Current backtesting datetime 2023-01-28 09:29:00-05:00 +2024-04-13 18:44:17,554: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:17,555: root: INFO: Current backtesting datetime 2023-01-30 08:30:00-05:00 +2024-04-13 18:44:17,555: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:17,556: root: INFO: Current backtesting datetime 2023-01-30 09:30:00-05:00 +2024-04-13 18:44:17,556: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:17,557: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:17 +2024-04-13 18:44:17,557: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:17,558: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:17,558: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:17,559: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:17,559: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:18,153: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:18,154: root: INFO: Current backtesting datetime 2023-01-30 16:00:00-05:00 +2024-04-13 18:44:18,155: root: INFO: Current backtesting datetime 2023-01-31 09:30:00-05:00 +2024-04-13 18:44:18,155: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:18 +2024-04-13 18:44:18,155: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:18,156: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:18,156: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:18,157: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:18,157: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:18,955: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:18,956: root: INFO: Current backtesting datetime 2023-01-31 16:00:00-05:00 +2024-04-13 18:44:18,957: root: INFO: Current backtesting datetime 2023-02-01 09:30:00-05:00 +2024-04-13 18:44:18,957: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:18 +2024-04-13 18:44:18,957: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:18,958: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:18,958: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:18,959: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:18,959: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:19,519: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:19,520: root: INFO: Current backtesting datetime 2023-02-01 16:00:00-05:00 +2024-04-13 18:44:19,521: root: INFO: Current backtesting datetime 2023-02-02 09:30:00-05:00 +2024-04-13 18:44:19,521: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:19 +2024-04-13 18:44:19,521: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:19,522: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:19,522: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:19,523: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:19,523: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:20,099: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:20,100: root: INFO: Current backtesting datetime 2023-02-02 16:00:00-05:00 +2024-04-13 18:44:20,101: root: INFO: Current backtesting datetime 2023-02-03 09:30:00-05:00 +2024-04-13 18:44:20,101: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:20 +2024-04-13 18:44:20,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:20,102: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:20,102: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:20,103: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:20,103: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:20,832: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:20,833: root: INFO: Current backtesting datetime 2023-02-03 16:00:00-05:00 +2024-04-13 18:44:20,833: root: INFO: Current backtesting datetime 2023-02-04 09:30:00-05:00 +2024-04-13 18:44:20,834: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:20,835: root: INFO: Current backtesting datetime 2023-02-04 09:29:00-05:00 +2024-04-13 18:44:20,837: root: INFO: Current backtesting datetime 2023-02-04 09:29:00-05:00 +2024-04-13 18:44:20,837: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:20,838: root: INFO: Current backtesting datetime 2023-02-06 08:30:00-05:00 +2024-04-13 18:44:20,838: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:20,839: root: INFO: Current backtesting datetime 2023-02-06 09:30:00-05:00 +2024-04-13 18:44:20,839: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:20,840: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:20 +2024-04-13 18:44:20,840: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:20,841: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:20,841: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:20,842: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:20,842: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:21,390: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:21,391: root: INFO: Current backtesting datetime 2023-02-06 16:00:00-05:00 +2024-04-13 18:44:21,391: root: INFO: Current backtesting datetime 2023-02-07 09:30:00-05:00 +2024-04-13 18:44:21,391: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:21 +2024-04-13 18:44:21,392: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:21,392: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:21,393: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:21,393: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:21,393: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:21,951: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:21,952: root: INFO: Current backtesting datetime 2023-02-07 16:00:00-05:00 +2024-04-13 18:44:21,953: root: INFO: Current backtesting datetime 2023-02-08 09:30:00-05:00 +2024-04-13 18:44:21,953: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:21 +2024-04-13 18:44:21,953: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:21,954: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:21,954: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:21,954: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:21,954: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:22,556: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:22,557: root: INFO: Current backtesting datetime 2023-02-08 16:00:00-05:00 +2024-04-13 18:44:22,557: root: INFO: Current backtesting datetime 2023-02-09 09:30:00-05:00 +2024-04-13 18:44:22,557: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:22 +2024-04-13 18:44:22,558: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:22,558: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:22,559: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:22,559: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:22,559: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:23,109: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:23,110: root: INFO: Current backtesting datetime 2023-02-09 16:00:00-05:00 +2024-04-13 18:44:23,111: root: INFO: Current backtesting datetime 2023-02-10 09:30:00-05:00 +2024-04-13 18:44:23,111: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:23 +2024-04-13 18:44:23,111: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:23,112: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:23,112: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:23,113: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:23,113: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:23,839: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:23,840: root: INFO: Current backtesting datetime 2023-02-10 16:00:00-05:00 +2024-04-13 18:44:23,840: root: INFO: Current backtesting datetime 2023-02-11 09:30:00-05:00 +2024-04-13 18:44:23,841: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:23,842: root: INFO: Current backtesting datetime 2023-02-11 09:29:00-05:00 +2024-04-13 18:44:23,844: root: INFO: Current backtesting datetime 2023-02-11 09:29:00-05:00 +2024-04-13 18:44:23,844: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:23,844: root: INFO: Current backtesting datetime 2023-02-13 08:30:00-05:00 +2024-04-13 18:44:23,845: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:23,846: root: INFO: Current backtesting datetime 2023-02-13 09:30:00-05:00 +2024-04-13 18:44:23,846: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:23,847: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:23 +2024-04-13 18:44:23,847: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:23,848: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:23,848: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:23,848: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:23,848: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:24,442: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:24,443: root: INFO: Current backtesting datetime 2023-02-13 16:00:00-05:00 +2024-04-13 18:44:24,443: root: INFO: Current backtesting datetime 2023-02-14 09:30:00-05:00 +2024-04-13 18:44:24,444: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:24 +2024-04-13 18:44:24,444: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:24,445: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:24,445: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:24,445: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:24,445: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:24,985: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:24,986: root: INFO: Current backtesting datetime 2023-02-14 16:00:00-05:00 +2024-04-13 18:44:24,987: root: INFO: Current backtesting datetime 2023-02-15 09:30:00-05:00 +2024-04-13 18:44:24,987: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:24 +2024-04-13 18:44:24,987: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:24,988: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:24,988: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:24,989: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:24,989: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:25,582: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:25,583: root: INFO: Current backtesting datetime 2023-02-15 16:00:00-05:00 +2024-04-13 18:44:25,584: root: INFO: Current backtesting datetime 2023-02-16 09:30:00-05:00 +2024-04-13 18:44:25,584: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:25 +2024-04-13 18:44:25,584: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:25,585: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:25,585: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:25,586: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:25,586: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:25,973: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:25,974: root: INFO: Current backtesting datetime 2023-02-16 16:00:00-05:00 +2024-04-13 18:44:25,974: root: INFO: Current backtesting datetime 2023-02-17 09:30:00-05:00 +2024-04-13 18:44:25,975: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:25 +2024-04-13 18:44:25,975: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:25,976: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:25,976: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:25,977: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:25,977: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:26,582: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:26,583: root: INFO: Current backtesting datetime 2023-02-17 16:00:00-05:00 +2024-04-13 18:44:26,584: root: INFO: Current backtesting datetime 2023-02-18 09:30:00-05:00 +2024-04-13 18:44:26,584: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:26,586: root: INFO: Current backtesting datetime 2023-02-18 09:29:00-05:00 +2024-04-13 18:44:26,587: root: INFO: Current backtesting datetime 2023-02-18 09:29:00-05:00 +2024-04-13 18:44:26,587: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:26,588: root: INFO: Current backtesting datetime 2023-02-21 08:30:00-05:00 +2024-04-13 18:44:26,588: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:26,589: root: INFO: Current backtesting datetime 2023-02-21 09:30:00-05:00 +2024-04-13 18:44:26,589: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:26,590: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:26 +2024-04-13 18:44:26,590: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:26,591: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:26,591: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:26,592: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:26,592: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:27,115: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:27,116: root: INFO: Current backtesting datetime 2023-02-21 16:00:00-05:00 +2024-04-13 18:44:27,117: root: INFO: Current backtesting datetime 2023-02-22 09:30:00-05:00 +2024-04-13 18:44:27,117: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:27 +2024-04-13 18:44:27,117: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:27,117: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:27,118: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:27,118: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:27,118: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:27,960: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:27,961: root: INFO: Current backtesting datetime 2023-02-22 16:00:00-05:00 +2024-04-13 18:44:27,961: root: INFO: Current backtesting datetime 2023-02-23 09:30:00-05:00 +2024-04-13 18:44:27,961: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:27 +2024-04-13 18:44:27,962: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:27,962: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:27,963: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:27,963: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:27,963: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:28,587: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:28,588: root: INFO: Current backtesting datetime 2023-02-23 16:00:00-05:00 +2024-04-13 18:44:28,588: root: INFO: Current backtesting datetime 2023-02-24 09:30:00-05:00 +2024-04-13 18:44:28,589: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:28 +2024-04-13 18:44:28,589: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:28,590: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:28,590: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:28,590: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:28,590: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:29,353: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:29,354: root: INFO: Current backtesting datetime 2023-02-24 16:00:00-05:00 +2024-04-13 18:44:29,354: root: INFO: Current backtesting datetime 2023-02-25 09:30:00-05:00 +2024-04-13 18:44:29,355: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:29,356: root: INFO: Current backtesting datetime 2023-02-25 09:29:00-05:00 +2024-04-13 18:44:29,357: root: INFO: Current backtesting datetime 2023-02-25 09:29:00-05:00 +2024-04-13 18:44:29,357: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:29,358: root: INFO: Current backtesting datetime 2023-02-27 08:30:00-05:00 +2024-04-13 18:44:29,358: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:29,359: root: INFO: Current backtesting datetime 2023-02-27 09:30:00-05:00 +2024-04-13 18:44:29,359: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:29,360: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:29 +2024-04-13 18:44:29,360: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:29,361: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:29,361: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:29,361: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:29,361: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:30,121: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:30,122: root: INFO: Current backtesting datetime 2023-02-27 16:00:00-05:00 +2024-04-13 18:44:30,123: root: INFO: Current backtesting datetime 2023-02-28 09:30:00-05:00 +2024-04-13 18:44:30,123: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:30 +2024-04-13 18:44:30,123: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:30,124: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:30,124: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:30,125: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:30,125: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:30,828: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:30,829: root: INFO: Current backtesting datetime 2023-02-28 16:00:00-05:00 +2024-04-13 18:44:30,830: root: INFO: Current backtesting datetime 2023-03-01 09:30:00-05:00 +2024-04-13 18:44:30,830: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:30 +2024-04-13 18:44:30,830: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:30,831: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:30,831: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:30,832: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:30,832: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:31,392: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:31,393: root: INFO: Current backtesting datetime 2023-03-01 16:00:00-05:00 +2024-04-13 18:44:31,394: root: INFO: Current backtesting datetime 2023-03-02 09:30:00-05:00 +2024-04-13 18:44:31,394: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:31 +2024-04-13 18:44:31,394: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:31,395: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:31,395: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:31,396: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:31,396: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:31,930: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:31,931: root: INFO: Current backtesting datetime 2023-03-02 16:00:00-05:00 +2024-04-13 18:44:31,932: root: INFO: Current backtesting datetime 2023-03-03 09:30:00-05:00 +2024-04-13 18:44:31,932: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:31 +2024-04-13 18:44:31,932: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:31,932: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:31,933: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:31,933: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:31,933: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:32,486: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:32,487: root: INFO: Current backtesting datetime 2023-03-03 16:00:00-05:00 +2024-04-13 18:44:32,488: root: INFO: Current backtesting datetime 2023-03-04 09:30:00-05:00 +2024-04-13 18:44:32,488: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:32,490: root: INFO: Current backtesting datetime 2023-03-04 09:29:00-05:00 +2024-04-13 18:44:32,491: root: INFO: Current backtesting datetime 2023-03-04 09:29:00-05:00 +2024-04-13 18:44:32,491: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:32,491: root: INFO: Current backtesting datetime 2023-03-06 08:30:00-05:00 +2024-04-13 18:44:32,492: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:32,493: root: INFO: Current backtesting datetime 2023-03-06 09:30:00-05:00 +2024-04-13 18:44:32,493: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:32,494: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:32 +2024-04-13 18:44:32,494: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:32,494: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:32,495: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:32,495: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:32,495: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:33,575: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:33,576: root: INFO: Current backtesting datetime 2023-03-06 16:00:00-05:00 +2024-04-13 18:44:33,576: root: INFO: Current backtesting datetime 2023-03-07 09:30:00-05:00 +2024-04-13 18:44:33,576: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:33 +2024-04-13 18:44:33,576: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:33,577: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:33,577: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:33,578: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:33,578: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:34,381: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:34,382: root: INFO: Current backtesting datetime 2023-03-07 16:00:00-05:00 +2024-04-13 18:44:34,382: root: INFO: Current backtesting datetime 2023-03-08 09:30:00-05:00 +2024-04-13 18:44:34,383: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:34 +2024-04-13 18:44:34,383: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:34,383: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:34,384: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:34,384: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:34,384: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:35,034: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:35,035: root: INFO: Current backtesting datetime 2023-03-08 16:00:00-05:00 +2024-04-13 18:44:35,035: root: INFO: Current backtesting datetime 2023-03-09 09:30:00-05:00 +2024-04-13 18:44:35,036: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:35 +2024-04-13 18:44:35,036: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:35,037: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:35,037: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:35,037: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:35,037: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:35,751: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:35,752: root: INFO: Current backtesting datetime 2023-03-09 16:00:00-05:00 +2024-04-13 18:44:35,753: root: INFO: Current backtesting datetime 2023-03-10 09:30:00-05:00 +2024-04-13 18:44:35,753: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:35 +2024-04-13 18:44:35,753: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:35,754: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:35,754: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:35,755: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:35,755: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:36,145: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:36,145: root: INFO: Current backtesting datetime 2023-03-10 16:00:00-05:00 +2024-04-13 18:44:36,146: root: INFO: Current backtesting datetime 2023-03-11 09:30:00-05:00 +2024-04-13 18:44:36,146: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:36,147: root: INFO: Current backtesting datetime 2023-03-11 09:29:00-05:00 +2024-04-13 18:44:36,149: root: INFO: Current backtesting datetime 2023-03-11 09:29:00-05:00 +2024-04-13 18:44:36,149: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:36,150: root: INFO: Current backtesting datetime 2023-03-13 07:30:00-05:00 +2024-04-13 18:44:36,150: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:36,152: root: INFO: Current backtesting datetime 2023-03-13 08:30:00-05:00 +2024-04-13 18:44:36,152: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:36,153: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:36 +2024-04-13 18:44:36,153: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:36,154: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:36,154: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:36,154: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:36,154: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:36,831: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:36,832: root: INFO: Current backtesting datetime 2023-03-13 15:00:00-05:00 +2024-04-13 18:44:36,832: root: INFO: Current backtesting datetime 2023-03-14 08:30:00-05:00 +2024-04-13 18:44:36,833: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:36 +2024-04-13 18:44:36,833: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:36,834: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:36,834: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:36,834: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:36,834: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:37,435: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:37,436: root: INFO: Current backtesting datetime 2023-03-14 15:00:00-05:00 +2024-04-13 18:44:37,436: root: INFO: Current backtesting datetime 2023-03-15 08:30:00-05:00 +2024-04-13 18:44:37,436: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:37 +2024-04-13 18:44:37,437: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:37,437: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:37,438: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:37,438: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:37,438: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:37,991: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:37,992: root: INFO: Current backtesting datetime 2023-03-15 15:00:00-05:00 +2024-04-13 18:44:37,992: root: INFO: Current backtesting datetime 2023-03-16 08:30:00-05:00 +2024-04-13 18:44:37,993: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:37 +2024-04-13 18:44:37,993: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:37,994: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:37,994: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:37,995: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:37,995: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:38,644: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:38,645: root: INFO: Current backtesting datetime 2023-03-16 15:00:00-05:00 +2024-04-13 18:44:38,645: root: INFO: Current backtesting datetime 2023-03-17 08:30:00-05:00 +2024-04-13 18:44:38,646: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:38 +2024-04-13 18:44:38,646: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:38,647: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:38,647: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:38,648: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:38,648: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:38,956: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:38,957: root: INFO: Current backtesting datetime 2023-03-17 15:00:00-05:00 +2024-04-13 18:44:38,957: root: INFO: Current backtesting datetime 2023-03-18 08:30:00-05:00 +2024-04-13 18:44:38,958: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:38,959: root: INFO: Current backtesting datetime 2023-03-18 08:29:00-05:00 +2024-04-13 18:44:38,960: root: INFO: Current backtesting datetime 2023-03-18 08:29:00-05:00 +2024-04-13 18:44:38,960: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:38,961: root: INFO: Current backtesting datetime 2023-03-20 07:30:00-05:00 +2024-04-13 18:44:38,962: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:38,963: root: INFO: Current backtesting datetime 2023-03-20 08:30:00-05:00 +2024-04-13 18:44:38,963: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:38,964: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:38 +2024-04-13 18:44:38,964: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:38,965: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:38,965: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:38,966: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:38,966: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:39,529: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:39,530: root: INFO: Current backtesting datetime 2023-03-20 15:00:00-05:00 +2024-04-13 18:44:39,530: root: INFO: Current backtesting datetime 2023-03-21 08:30:00-05:00 +2024-04-13 18:44:39,531: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:39 +2024-04-13 18:44:39,531: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:39,531: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:39,532: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:39,532: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:39,532: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:40,128: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:40,129: root: INFO: Current backtesting datetime 2023-03-21 15:00:00-05:00 +2024-04-13 18:44:40,129: root: INFO: Current backtesting datetime 2023-03-22 08:30:00-05:00 +2024-04-13 18:44:40,129: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:40 +2024-04-13 18:44:40,130: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:40,130: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:40,131: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:40,131: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:40,131: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:41,291: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:41,292: root: INFO: Current backtesting datetime 2023-03-22 15:00:00-05:00 +2024-04-13 18:44:41,292: root: INFO: Current backtesting datetime 2023-03-23 08:30:00-05:00 +2024-04-13 18:44:41,292: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:41 +2024-04-13 18:44:41,293: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:41,293: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:41,294: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:41,294: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:41,294: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:42,267: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:42,268: root: INFO: Current backtesting datetime 2023-03-23 15:00:00-05:00 +2024-04-13 18:44:42,268: root: INFO: Current backtesting datetime 2023-03-24 08:30:00-05:00 +2024-04-13 18:44:42,269: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:42 +2024-04-13 18:44:42,269: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:42,270: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:42,270: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:42,270: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:42,270: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:43,214: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:43,215: root: INFO: Current backtesting datetime 2023-03-24 15:00:00-05:00 +2024-04-13 18:44:43,216: root: INFO: Current backtesting datetime 2023-03-25 08:30:00-05:00 +2024-04-13 18:44:43,216: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:43,218: root: INFO: Current backtesting datetime 2023-03-25 08:29:00-05:00 +2024-04-13 18:44:43,219: root: INFO: Current backtesting datetime 2023-03-25 08:29:00-05:00 +2024-04-13 18:44:43,219: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:43,220: root: INFO: Current backtesting datetime 2023-03-27 07:30:00-05:00 +2024-04-13 18:44:43,220: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:43,222: root: INFO: Current backtesting datetime 2023-03-27 08:30:00-05:00 +2024-04-13 18:44:43,222: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:43,222: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:43 +2024-04-13 18:44:43,222: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:43,223: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:43,223: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:43,224: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:43,224: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:44,899: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:44,900: root: INFO: Current backtesting datetime 2023-03-27 15:00:00-05:00 +2024-04-13 18:44:44,900: root: INFO: Current backtesting datetime 2023-03-28 08:30:00-05:00 +2024-04-13 18:44:44,901: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:44 +2024-04-13 18:44:44,901: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:44,902: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:44,902: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:44,902: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:44,902: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:45,805: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:45,806: root: INFO: Current backtesting datetime 2023-03-28 15:00:00-05:00 +2024-04-13 18:44:45,806: root: INFO: Current backtesting datetime 2023-03-29 08:30:00-05:00 +2024-04-13 18:44:45,807: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:45 +2024-04-13 18:44:45,807: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:45,807: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:45,808: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:45,808: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:45,808: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:46,752: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:46,753: root: INFO: Current backtesting datetime 2023-03-29 15:00:00-05:00 +2024-04-13 18:44:46,753: root: INFO: Current backtesting datetime 2023-03-30 08:30:00-05:00 +2024-04-13 18:44:46,753: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:46 +2024-04-13 18:44:46,754: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:46,754: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:46,755: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:46,755: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:46,755: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:47,599: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:47,600: root: INFO: Current backtesting datetime 2023-03-30 15:00:00-05:00 +2024-04-13 18:44:47,601: root: INFO: Current backtesting datetime 2023-03-31 08:30:00-05:00 +2024-04-13 18:44:47,601: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:47 +2024-04-13 18:44:47,601: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:47,602: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:47,602: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:47,603: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:47,603: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:48,157: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:48,158: root: INFO: Current backtesting datetime 2023-03-31 15:00:00-05:00 +2024-04-13 18:44:48,158: root: INFO: Current backtesting datetime 2023-04-01 08:30:00-05:00 +2024-04-13 18:44:48,159: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:48,160: root: INFO: Current backtesting datetime 2023-04-01 08:29:00-05:00 +2024-04-13 18:44:48,160: root: INFO: Current backtesting datetime 2023-04-01 08:29:00-05:00 +2024-04-13 18:44:48,160: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:48,161: root: INFO: Current backtesting datetime 2023-04-03 07:30:00-05:00 +2024-04-13 18:44:48,162: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:48,162: root: INFO: Current backtesting datetime 2023-04-03 08:30:00-05:00 +2024-04-13 18:44:48,162: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:48,163: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:48 +2024-04-13 18:44:48,163: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:48,164: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:48,164: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:48,165: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:48,165: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:48,767: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:48,768: root: INFO: Current backtesting datetime 2023-04-03 15:00:00-05:00 +2024-04-13 18:44:48,768: root: INFO: Current backtesting datetime 2023-04-04 08:30:00-05:00 +2024-04-13 18:44:48,769: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:48 +2024-04-13 18:44:48,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:48,769: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:48,770: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:48,770: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:48,770: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:49,271: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:49,272: root: INFO: Current backtesting datetime 2023-04-04 15:00:00-05:00 +2024-04-13 18:44:49,273: root: INFO: Current backtesting datetime 2023-04-05 08:30:00-05:00 +2024-04-13 18:44:49,273: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:49 +2024-04-13 18:44:49,273: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:49,274: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:49,274: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:49,275: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:49,275: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:50,335: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:50,336: root: INFO: Current backtesting datetime 2023-04-05 15:00:00-05:00 +2024-04-13 18:44:50,337: root: INFO: Current backtesting datetime 2023-04-06 08:30:00-05:00 +2024-04-13 18:44:50,337: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:50 +2024-04-13 18:44:50,337: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:50,338: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:50,338: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:50,339: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:50,339: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:51,263: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:51,265: root: INFO: Current backtesting datetime 2023-04-06 15:00:00-05:00 +2024-04-13 18:44:51,265: root: INFO: Current backtesting datetime 2023-04-07 08:30:00-05:00 +2024-04-13 18:44:51,265: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:51,266: root: INFO: Current backtesting datetime 2023-04-07 08:29:00-05:00 +2024-04-13 18:44:51,267: root: INFO: Current backtesting datetime 2023-04-07 08:29:00-05:00 +2024-04-13 18:44:51,268: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:51,268: root: INFO: Current backtesting datetime 2023-04-10 07:30:00-05:00 +2024-04-13 18:44:51,269: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:51,270: root: INFO: Current backtesting datetime 2023-04-10 08:30:00-05:00 +2024-04-13 18:44:51,270: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:51,271: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:51 +2024-04-13 18:44:51,271: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:51,272: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:51,272: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:51,273: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:51,273: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:52,098: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:52,099: root: INFO: Current backtesting datetime 2023-04-10 15:00:00-05:00 +2024-04-13 18:44:52,099: root: INFO: Current backtesting datetime 2023-04-11 08:30:00-05:00 +2024-04-13 18:44:52,100: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:52 +2024-04-13 18:44:52,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:52,101: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:52,101: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:52,101: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:52,101: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:52,835: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:52,836: root: INFO: Current backtesting datetime 2023-04-11 15:00:00-05:00 +2024-04-13 18:44:52,836: root: INFO: Current backtesting datetime 2023-04-12 08:30:00-05:00 +2024-04-13 18:44:52,836: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:52 +2024-04-13 18:44:52,837: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:52,837: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:52,838: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:52,838: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:52,838: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:53,351: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:53,352: root: INFO: Current backtesting datetime 2023-04-12 15:00:00-05:00 +2024-04-13 18:44:53,353: root: INFO: Current backtesting datetime 2023-04-13 08:30:00-05:00 +2024-04-13 18:44:53,353: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:53 +2024-04-13 18:44:53,353: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:53,354: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:53,354: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:53,355: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:53,355: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:53,926: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:53,927: root: INFO: Current backtesting datetime 2023-04-13 15:00:00-05:00 +2024-04-13 18:44:53,927: root: INFO: Current backtesting datetime 2023-04-14 08:30:00-05:00 +2024-04-13 18:44:53,927: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:53 +2024-04-13 18:44:53,928: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:53,928: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:53,929: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:53,929: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:53,929: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:54,509: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:54,510: root: INFO: Current backtesting datetime 2023-04-14 15:00:00-05:00 +2024-04-13 18:44:54,510: root: INFO: Current backtesting datetime 2023-04-15 08:30:00-05:00 +2024-04-13 18:44:54,511: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:54,512: root: INFO: Current backtesting datetime 2023-04-15 08:29:00-05:00 +2024-04-13 18:44:54,513: root: INFO: Current backtesting datetime 2023-04-15 08:29:00-05:00 +2024-04-13 18:44:54,513: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:54,514: root: INFO: Current backtesting datetime 2023-04-17 07:30:00-05:00 +2024-04-13 18:44:54,515: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:54,516: root: INFO: Current backtesting datetime 2023-04-17 08:30:00-05:00 +2024-04-13 18:44:54,516: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:54,517: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:54 +2024-04-13 18:44:54,517: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:54,518: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:54,518: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:54,518: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:54,518: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:55,111: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:55,112: root: INFO: Current backtesting datetime 2023-04-17 15:00:00-05:00 +2024-04-13 18:44:55,113: root: INFO: Current backtesting datetime 2023-04-18 08:30:00-05:00 +2024-04-13 18:44:55,113: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:55 +2024-04-13 18:44:55,113: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:55,114: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:55,114: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:55,115: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:55,115: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:56,040: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:56,041: root: INFO: Current backtesting datetime 2023-04-18 15:00:00-05:00 +2024-04-13 18:44:56,041: root: INFO: Current backtesting datetime 2023-04-19 08:30:00-05:00 +2024-04-13 18:44:56,042: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:56 +2024-04-13 18:44:56,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:56,043: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:56,043: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:56,043: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:56,043: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:56,909: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:56,910: root: INFO: Current backtesting datetime 2023-04-19 15:00:00-05:00 +2024-04-13 18:44:56,910: root: INFO: Current backtesting datetime 2023-04-20 08:30:00-05:00 +2024-04-13 18:44:56,910: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:56 +2024-04-13 18:44:56,910: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:56,911: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:56,911: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:56,912: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:56,912: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:57,631: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:57,633: root: INFO: Current backtesting datetime 2023-04-20 15:00:00-05:00 +2024-04-13 18:44:57,633: root: INFO: Current backtesting datetime 2023-04-21 08:30:00-05:00 +2024-04-13 18:44:57,634: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:57 +2024-04-13 18:44:57,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:57,634: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:57,635: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:57,635: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:57,635: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:58,614: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:58,615: root: INFO: Current backtesting datetime 2023-04-21 15:00:00-05:00 +2024-04-13 18:44:58,615: root: INFO: Current backtesting datetime 2023-04-22 08:30:00-05:00 +2024-04-13 18:44:58,615: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:44:58,616: root: INFO: Current backtesting datetime 2023-04-22 08:29:00-05:00 +2024-04-13 18:44:58,618: root: INFO: Current backtesting datetime 2023-04-22 08:29:00-05:00 +2024-04-13 18:44:58,618: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:44:58,619: root: INFO: Current backtesting datetime 2023-04-24 07:30:00-05:00 +2024-04-13 18:44:58,619: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:44:58,620: root: INFO: Current backtesting datetime 2023-04-24 08:30:00-05:00 +2024-04-13 18:44:58,620: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:44:58,621: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:58 +2024-04-13 18:44:58,621: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:58,622: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:58,622: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:58,623: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:58,623: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:44:59,341: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:44:59,342: root: INFO: Current backtesting datetime 2023-04-24 15:00:00-05:00 +2024-04-13 18:44:59,342: root: INFO: Current backtesting datetime 2023-04-25 08:30:00-05:00 +2024-04-13 18:44:59,342: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:44:59 +2024-04-13 18:44:59,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:59,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:44:59,344: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:44:59,344: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:44:59,344: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:00,146: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:00,147: root: INFO: Current backtesting datetime 2023-04-25 15:00:00-05:00 +2024-04-13 18:45:00,147: root: INFO: Current backtesting datetime 2023-04-26 08:30:00-05:00 +2024-04-13 18:45:00,148: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:00 +2024-04-13 18:45:00,148: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:00,148: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:00,149: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:00,149: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:00,149: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:01,075: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:01,076: root: INFO: Current backtesting datetime 2023-04-26 15:00:00-05:00 +2024-04-13 18:45:01,076: root: INFO: Current backtesting datetime 2023-04-27 08:30:00-05:00 +2024-04-13 18:45:01,077: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:01 +2024-04-13 18:45:01,077: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:01,077: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:01,078: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:01,078: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:01,078: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:01,861: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:01,862: root: INFO: Current backtesting datetime 2023-04-27 15:00:00-05:00 +2024-04-13 18:45:01,862: root: INFO: Current backtesting datetime 2023-04-28 08:30:00-05:00 +2024-04-13 18:45:01,863: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:01 +2024-04-13 18:45:01,863: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:01,864: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:01,864: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:01,864: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:01,864: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:02,568: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:02,569: root: INFO: Current backtesting datetime 2023-04-28 15:00:00-05:00 +2024-04-13 18:45:02,569: root: INFO: Current backtesting datetime 2023-04-29 08:30:00-05:00 +2024-04-13 18:45:02,570: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:02,571: root: INFO: Current backtesting datetime 2023-04-29 08:29:00-05:00 +2024-04-13 18:45:02,572: root: INFO: Current backtesting datetime 2023-04-29 08:29:00-05:00 +2024-04-13 18:45:02,572: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:02,573: root: INFO: Current backtesting datetime 2023-05-01 07:30:00-05:00 +2024-04-13 18:45:02,574: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:02,575: root: INFO: Current backtesting datetime 2023-05-01 08:30:00-05:00 +2024-04-13 18:45:02,575: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:02,576: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:02 +2024-04-13 18:45:02,576: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:02,576: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:02,577: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:02,577: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:02,577: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:03,237: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:03,238: root: INFO: Current backtesting datetime 2023-05-01 15:00:00-05:00 +2024-04-13 18:45:03,238: root: INFO: Current backtesting datetime 2023-05-02 08:30:00-05:00 +2024-04-13 18:45:03,239: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:03 +2024-04-13 18:45:03,239: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:03,240: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:03,240: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:03,240: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:03,241: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:04,055: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:04,056: root: INFO: Current backtesting datetime 2023-05-02 15:00:00-05:00 +2024-04-13 18:45:04,057: root: INFO: Current backtesting datetime 2023-05-03 08:30:00-05:00 +2024-04-13 18:45:04,057: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:04 +2024-04-13 18:45:04,057: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:04,058: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:04,058: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:04,058: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:04,058: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:04,839: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:04,840: root: INFO: Current backtesting datetime 2023-05-03 15:00:00-05:00 +2024-04-13 18:45:04,840: root: INFO: Current backtesting datetime 2023-05-04 08:30:00-05:00 +2024-04-13 18:45:04,841: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:04 +2024-04-13 18:45:04,841: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:04,841: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:04,842: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:04,842: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:04,842: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:05,657: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:05,658: root: INFO: Current backtesting datetime 2023-05-04 15:00:00-05:00 +2024-04-13 18:45:05,658: root: INFO: Current backtesting datetime 2023-05-05 08:30:00-05:00 +2024-04-13 18:45:05,658: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:05 +2024-04-13 18:45:05,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:05,659: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:05,660: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:05,660: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:05,660: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:06,653: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:06,654: root: INFO: Current backtesting datetime 2023-05-05 15:00:00-05:00 +2024-04-13 18:45:06,654: root: INFO: Current backtesting datetime 2023-05-06 08:30:00-05:00 +2024-04-13 18:45:06,655: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:06,656: root: INFO: Current backtesting datetime 2023-05-06 08:29:00-05:00 +2024-04-13 18:45:06,657: root: INFO: Current backtesting datetime 2023-05-06 08:29:00-05:00 +2024-04-13 18:45:06,657: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:06,658: root: INFO: Current backtesting datetime 2023-05-08 07:30:00-05:00 +2024-04-13 18:45:06,659: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:06,660: root: INFO: Current backtesting datetime 2023-05-08 08:30:00-05:00 +2024-04-13 18:45:06,660: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:06,661: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:06 +2024-04-13 18:45:06,661: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:06,662: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:06,662: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:06,662: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:06,662: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:07,490: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:07,491: root: INFO: Current backtesting datetime 2023-05-08 15:00:00-05:00 +2024-04-13 18:45:07,491: root: INFO: Current backtesting datetime 2023-05-09 08:30:00-05:00 +2024-04-13 18:45:07,492: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:07 +2024-04-13 18:45:07,492: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:07,492: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:07,493: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:07,493: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:07,493: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:08,081: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:08,082: root: INFO: Current backtesting datetime 2023-05-09 15:00:00-05:00 +2024-04-13 18:45:08,083: root: INFO: Current backtesting datetime 2023-05-10 08:30:00-05:00 +2024-04-13 18:45:08,083: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:08 +2024-04-13 18:45:08,083: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:08,084: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:08,084: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:08,085: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:08,085: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:08,872: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:08,873: root: INFO: Current backtesting datetime 2023-05-10 15:00:00-05:00 +2024-04-13 18:45:08,874: root: INFO: Current backtesting datetime 2023-05-11 08:30:00-05:00 +2024-04-13 18:45:08,874: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:08 +2024-04-13 18:45:08,874: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:08,875: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:08,875: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:08,876: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:08,876: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:09,415: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:09,416: root: INFO: Current backtesting datetime 2023-05-11 15:00:00-05:00 +2024-04-13 18:45:09,416: root: INFO: Current backtesting datetime 2023-05-12 08:30:00-05:00 +2024-04-13 18:45:09,417: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:09 +2024-04-13 18:45:09,417: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:09,418: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:09,418: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:09,418: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:09,418: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:09,954: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:09,955: root: INFO: Current backtesting datetime 2023-05-12 15:00:00-05:00 +2024-04-13 18:45:09,955: root: INFO: Current backtesting datetime 2023-05-13 08:30:00-05:00 +2024-04-13 18:45:09,955: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:09,957: root: INFO: Current backtesting datetime 2023-05-13 08:29:00-05:00 +2024-04-13 18:45:09,958: root: INFO: Current backtesting datetime 2023-05-13 08:29:00-05:00 +2024-04-13 18:45:09,958: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:09,959: root: INFO: Current backtesting datetime 2023-05-15 07:30:00-05:00 +2024-04-13 18:45:09,960: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:09,961: root: INFO: Current backtesting datetime 2023-05-15 08:30:00-05:00 +2024-04-13 18:45:09,961: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:09,962: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:09 +2024-04-13 18:45:09,962: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:09,963: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:09,963: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:09,963: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:09,963: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:10,530: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:10,531: root: INFO: Current backtesting datetime 2023-05-15 15:00:00-05:00 +2024-04-13 18:45:10,531: root: INFO: Current backtesting datetime 2023-05-16 08:30:00-05:00 +2024-04-13 18:45:10,532: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:10 +2024-04-13 18:45:10,532: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:10,533: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:10,533: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:10,533: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:10,533: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:11,057: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:11,057: root: INFO: Current backtesting datetime 2023-05-16 15:00:00-05:00 +2024-04-13 18:45:11,058: root: INFO: Current backtesting datetime 2023-05-17 08:30:00-05:00 +2024-04-13 18:45:11,058: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:11 +2024-04-13 18:45:11,058: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:11,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:11,059: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:11,060: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:11,060: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:11,823: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:11,824: root: INFO: Current backtesting datetime 2023-05-17 15:00:00-05:00 +2024-04-13 18:45:11,825: root: INFO: Current backtesting datetime 2023-05-18 08:30:00-05:00 +2024-04-13 18:45:11,825: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:11 +2024-04-13 18:45:11,825: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:11,826: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:11,826: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:11,827: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:11,827: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:12,368: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:12,369: root: INFO: Current backtesting datetime 2023-05-18 15:00:00-05:00 +2024-04-13 18:45:12,369: root: INFO: Current backtesting datetime 2023-05-19 08:30:00-05:00 +2024-04-13 18:45:12,369: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:12 +2024-04-13 18:45:12,369: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:12,370: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:12,370: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:12,371: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:12,371: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:12,926: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:12,927: root: INFO: Current backtesting datetime 2023-05-19 15:00:00-05:00 +2024-04-13 18:45:12,928: root: INFO: Current backtesting datetime 2023-05-20 08:30:00-05:00 +2024-04-13 18:45:12,928: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:12,929: root: INFO: Current backtesting datetime 2023-05-20 08:29:00-05:00 +2024-04-13 18:45:12,931: root: INFO: Current backtesting datetime 2023-05-20 08:29:00-05:00 +2024-04-13 18:45:12,931: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:12,932: root: INFO: Current backtesting datetime 2023-05-22 07:30:00-05:00 +2024-04-13 18:45:12,932: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:12,933: root: INFO: Current backtesting datetime 2023-05-22 08:30:00-05:00 +2024-04-13 18:45:12,933: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:12,934: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:12 +2024-04-13 18:45:12,934: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:12,935: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:12,935: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:12,936: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:12,936: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:13,585: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:13,586: root: INFO: Current backtesting datetime 2023-05-22 15:00:00-05:00 +2024-04-13 18:45:13,586: root: INFO: Current backtesting datetime 2023-05-23 08:30:00-05:00 +2024-04-13 18:45:13,586: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:13 +2024-04-13 18:45:13,586: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:13,587: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:13,587: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:13,588: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:13,588: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:14,132: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:14,133: root: INFO: Current backtesting datetime 2023-05-23 15:00:00-05:00 +2024-04-13 18:45:14,133: root: INFO: Current backtesting datetime 2023-05-24 08:30:00-05:00 +2024-04-13 18:45:14,134: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:14 +2024-04-13 18:45:14,134: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:14,134: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:14,135: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:14,135: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:14,135: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:14,889: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:14,890: root: INFO: Current backtesting datetime 2023-05-24 15:00:00-05:00 +2024-04-13 18:45:14,890: root: INFO: Current backtesting datetime 2023-05-25 08:30:00-05:00 +2024-04-13 18:45:14,890: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:14 +2024-04-13 18:45:14,891: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:14,891: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:14,892: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:14,892: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:14,892: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:15,486: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:15,487: root: INFO: Current backtesting datetime 2023-05-25 15:00:00-05:00 +2024-04-13 18:45:15,487: root: INFO: Current backtesting datetime 2023-05-26 08:30:00-05:00 +2024-04-13 18:45:15,488: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:15 +2024-04-13 18:45:15,488: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:15,489: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:15,489: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:15,490: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:15,490: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:16,294: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:16,295: root: INFO: Current backtesting datetime 2023-05-26 15:00:00-05:00 +2024-04-13 18:45:16,295: root: INFO: Current backtesting datetime 2023-05-27 08:30:00-05:00 +2024-04-13 18:45:16,296: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:16,297: root: INFO: Current backtesting datetime 2023-05-27 08:29:00-05:00 +2024-04-13 18:45:16,299: root: INFO: Current backtesting datetime 2023-05-27 08:29:00-05:00 +2024-04-13 18:45:16,299: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:16,299: root: INFO: Current backtesting datetime 2023-05-30 07:30:00-05:00 +2024-04-13 18:45:16,300: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:16,301: root: INFO: Current backtesting datetime 2023-05-30 08:30:00-05:00 +2024-04-13 18:45:16,301: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:16,301: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:16 +2024-04-13 18:45:16,302: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:16,302: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:16,303: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:16,303: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:16,303: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:18,220: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:18,221: root: INFO: Current backtesting datetime 2023-05-30 15:00:00-05:00 +2024-04-13 18:45:18,221: root: INFO: Current backtesting datetime 2023-05-31 08:30:00-05:00 +2024-04-13 18:45:18,222: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:18 +2024-04-13 18:45:18,222: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:18,222: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:18,223: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:18,223: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:18,223: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:19,105: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:19,106: root: INFO: Current backtesting datetime 2023-05-31 15:00:00-05:00 +2024-04-13 18:45:19,106: root: INFO: Current backtesting datetime 2023-06-01 08:30:00-05:00 +2024-04-13 18:45:19,106: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:19 +2024-04-13 18:45:19,107: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:19,107: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:19,108: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:19,108: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:19,108: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:19,887: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:19,888: root: INFO: Current backtesting datetime 2023-06-01 15:00:00-05:00 +2024-04-13 18:45:19,888: root: INFO: Current backtesting datetime 2023-06-02 08:30:00-05:00 +2024-04-13 18:45:19,889: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:19 +2024-04-13 18:45:19,889: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:19,890: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:19,890: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:19,891: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:19,891: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:20,506: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:20,507: root: INFO: Current backtesting datetime 2023-06-02 15:00:00-05:00 +2024-04-13 18:45:20,507: root: INFO: Current backtesting datetime 2023-06-03 08:30:00-05:00 +2024-04-13 18:45:20,508: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:20,509: root: INFO: Current backtesting datetime 2023-06-03 08:29:00-05:00 +2024-04-13 18:45:20,510: root: INFO: Current backtesting datetime 2023-06-03 08:29:00-05:00 +2024-04-13 18:45:20,510: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:20,511: root: INFO: Current backtesting datetime 2023-06-05 07:30:00-05:00 +2024-04-13 18:45:20,512: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:20,513: root: INFO: Current backtesting datetime 2023-06-05 08:30:00-05:00 +2024-04-13 18:45:20,513: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:20,514: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:20 +2024-04-13 18:45:20,514: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:20,515: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:20,515: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:20,515: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:20,515: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:21,123: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:21,124: root: INFO: Current backtesting datetime 2023-06-05 15:00:00-05:00 +2024-04-13 18:45:21,124: root: INFO: Current backtesting datetime 2023-06-06 08:30:00-05:00 +2024-04-13 18:45:21,125: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:21 +2024-04-13 18:45:21,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:21,126: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:21,126: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:21,126: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:21,126: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:21,924: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:21,925: root: INFO: Current backtesting datetime 2023-06-06 15:00:00-05:00 +2024-04-13 18:45:21,925: root: INFO: Current backtesting datetime 2023-06-07 08:30:00-05:00 +2024-04-13 18:45:21,926: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:21 +2024-04-13 18:45:21,926: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:21,927: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:21,927: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:21,927: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:21,927: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:22,602: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:22,603: root: INFO: Current backtesting datetime 2023-06-07 15:00:00-05:00 +2024-04-13 18:45:22,604: root: INFO: Current backtesting datetime 2023-06-08 08:30:00-05:00 +2024-04-13 18:45:22,604: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:22 +2024-04-13 18:45:22,604: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:22,605: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:22,605: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:22,605: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:22,605: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:23,373: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:23,374: root: INFO: Current backtesting datetime 2023-06-08 15:00:00-05:00 +2024-04-13 18:45:23,374: root: INFO: Current backtesting datetime 2023-06-09 08:30:00-05:00 +2024-04-13 18:45:23,375: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:23 +2024-04-13 18:45:23,375: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:23,375: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:23,376: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:23,376: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:23,376: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:23,906: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:23,907: root: INFO: Current backtesting datetime 2023-06-09 15:00:00-05:00 +2024-04-13 18:45:23,907: root: INFO: Current backtesting datetime 2023-06-10 08:30:00-05:00 +2024-04-13 18:45:23,907: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:23,909: root: INFO: Current backtesting datetime 2023-06-10 08:29:00-05:00 +2024-04-13 18:45:23,910: root: INFO: Current backtesting datetime 2023-06-10 08:29:00-05:00 +2024-04-13 18:45:23,910: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:23,911: root: INFO: Current backtesting datetime 2023-06-12 07:30:00-05:00 +2024-04-13 18:45:23,911: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:23,912: root: INFO: Current backtesting datetime 2023-06-12 08:30:00-05:00 +2024-04-13 18:45:23,912: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:23,913: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:23 +2024-04-13 18:45:23,914: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:23,914: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:23,915: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:23,915: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:23,915: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:24,440: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:24,441: root: INFO: Current backtesting datetime 2023-06-12 15:00:00-05:00 +2024-04-13 18:45:24,441: root: INFO: Current backtesting datetime 2023-06-13 08:30:00-05:00 +2024-04-13 18:45:24,442: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:24 +2024-04-13 18:45:24,442: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:24,443: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:24,443: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:24,444: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:24,444: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:25,108: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:25,109: root: INFO: Current backtesting datetime 2023-06-13 15:00:00-05:00 +2024-04-13 18:45:25,109: root: INFO: Current backtesting datetime 2023-06-14 08:30:00-05:00 +2024-04-13 18:45:25,109: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:25 +2024-04-13 18:45:25,110: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:25,110: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:25,111: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:25,111: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:25,111: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:25,928: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:25,929: root: INFO: Current backtesting datetime 2023-06-14 15:00:00-05:00 +2024-04-13 18:45:25,929: root: INFO: Current backtesting datetime 2023-06-15 08:30:00-05:00 +2024-04-13 18:45:25,929: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:25 +2024-04-13 18:45:25,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:25,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:25,930: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:25,931: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:25,931: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:26,824: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:26,825: root: INFO: Current backtesting datetime 2023-06-15 15:00:00-05:00 +2024-04-13 18:45:26,825: root: INFO: Current backtesting datetime 2023-06-16 08:30:00-05:00 +2024-04-13 18:45:26,825: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:26 +2024-04-13 18:45:26,825: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:26,826: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:26,826: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:26,828: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:26,828: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:27,837: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:27,838: root: INFO: Current backtesting datetime 2023-06-16 15:00:00-05:00 +2024-04-13 18:45:27,838: root: INFO: Current backtesting datetime 2023-06-17 08:30:00-05:00 +2024-04-13 18:45:27,839: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:27,840: root: INFO: Current backtesting datetime 2023-06-17 08:29:00-05:00 +2024-04-13 18:45:27,842: root: INFO: Current backtesting datetime 2023-06-17 08:29:00-05:00 +2024-04-13 18:45:27,842: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:27,842: root: INFO: Current backtesting datetime 2023-06-20 07:30:00-05:00 +2024-04-13 18:45:27,843: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:27,844: root: INFO: Current backtesting datetime 2023-06-20 08:30:00-05:00 +2024-04-13 18:45:27,844: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:27,845: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:27 +2024-04-13 18:45:27,845: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:27,846: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:27,846: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:27,847: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:27,847: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:28,645: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:28,646: root: INFO: Current backtesting datetime 2023-06-20 15:00:00-05:00 +2024-04-13 18:45:28,647: root: INFO: Current backtesting datetime 2023-06-21 08:30:00-05:00 +2024-04-13 18:45:28,647: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:28 +2024-04-13 18:45:28,647: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:28,648: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:28,648: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:28,649: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:28,649: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:29,404: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:29,405: root: INFO: Current backtesting datetime 2023-06-21 15:00:00-05:00 +2024-04-13 18:45:29,405: root: INFO: Current backtesting datetime 2023-06-22 08:30:00-05:00 +2024-04-13 18:45:29,405: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:29 +2024-04-13 18:45:29,405: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:29,406: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:29,406: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:29,407: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:29,407: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:30,025: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:30,026: root: INFO: Current backtesting datetime 2023-06-22 15:00:00-05:00 +2024-04-13 18:45:30,026: root: INFO: Current backtesting datetime 2023-06-23 08:30:00-05:00 +2024-04-13 18:45:30,026: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:30 +2024-04-13 18:45:30,026: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:30,027: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:30,028: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:30,028: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:30,028: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:30,719: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:30,720: root: INFO: Current backtesting datetime 2023-06-23 15:00:00-05:00 +2024-04-13 18:45:30,720: root: INFO: Current backtesting datetime 2023-06-24 08:30:00-05:00 +2024-04-13 18:45:30,721: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:30,722: root: INFO: Current backtesting datetime 2023-06-24 08:29:00-05:00 +2024-04-13 18:45:30,723: root: INFO: Current backtesting datetime 2023-06-24 08:29:00-05:00 +2024-04-13 18:45:30,723: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:30,724: root: INFO: Current backtesting datetime 2023-06-26 07:30:00-05:00 +2024-04-13 18:45:30,725: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:30,726: root: INFO: Current backtesting datetime 2023-06-26 08:30:00-05:00 +2024-04-13 18:45:30,726: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:30,727: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:30 +2024-04-13 18:45:30,727: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:30,728: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:30,728: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:30,728: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:30,728: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:31,147: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:31,148: root: INFO: Current backtesting datetime 2023-06-26 15:00:00-05:00 +2024-04-13 18:45:31,149: root: INFO: Current backtesting datetime 2023-06-27 08:30:00-05:00 +2024-04-13 18:45:31,149: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:31 +2024-04-13 18:45:31,149: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:31,150: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:31,150: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:31,151: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:31,151: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:31,973: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:31,974: root: INFO: Current backtesting datetime 2023-06-27 15:00:00-05:00 +2024-04-13 18:45:31,974: root: INFO: Current backtesting datetime 2023-06-28 08:30:00-05:00 +2024-04-13 18:45:31,974: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:31 +2024-04-13 18:45:31,974: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:31,976: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:31,976: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:31,977: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:31,977: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:32,688: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:32,689: root: INFO: Current backtesting datetime 2023-06-28 15:00:00-05:00 +2024-04-13 18:45:32,690: root: INFO: Current backtesting datetime 2023-06-29 08:30:00-05:00 +2024-04-13 18:45:32,690: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:32 +2024-04-13 18:45:32,690: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:32,691: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:32,691: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:32,692: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:32,692: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:33,502: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:33,502: root: INFO: Current backtesting datetime 2023-06-29 15:00:00-05:00 +2024-04-13 18:45:33,503: root: INFO: Current backtesting datetime 2023-06-30 08:30:00-05:00 +2024-04-13 18:45:33,503: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:33 +2024-04-13 18:45:33,503: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:33,504: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:33,504: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:33,505: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:33,505: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:34,086: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:34,087: root: INFO: Current backtesting datetime 2023-06-30 15:00:00-05:00 +2024-04-13 18:45:34,087: root: INFO: Current backtesting datetime 2023-07-01 08:30:00-05:00 +2024-04-13 18:45:34,088: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:34,089: root: INFO: Current backtesting datetime 2023-07-01 08:29:00-05:00 +2024-04-13 18:45:34,090: root: INFO: Current backtesting datetime 2023-07-01 08:29:00-05:00 +2024-04-13 18:45:34,090: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:34,091: root: INFO: Current backtesting datetime 2023-07-03 07:30:00-05:00 +2024-04-13 18:45:34,092: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:34,093: root: INFO: Current backtesting datetime 2023-07-03 08:30:00-05:00 +2024-04-13 18:45:34,093: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:34,094: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:34 +2024-04-13 18:45:34,094: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:34,095: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:34,095: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:34,095: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:34,095: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:34,926: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:34,927: root: INFO: Current backtesting datetime 2023-07-03 12:00:00-05:00 +2024-04-13 18:45:34,928: root: INFO: Current backtesting datetime 2023-07-04 08:30:00-05:00 +2024-04-13 18:45:34,928: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:34,929: root: INFO: Current backtesting datetime 2023-07-04 08:29:00-05:00 +2024-04-13 18:45:34,931: root: INFO: Current backtesting datetime 2023-07-04 08:29:00-05:00 +2024-04-13 18:45:34,931: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:34,932: root: INFO: Current backtesting datetime 2023-07-05 07:30:00-05:00 +2024-04-13 18:45:34,932: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:34,933: root: INFO: Current backtesting datetime 2023-07-05 08:30:00-05:00 +2024-04-13 18:45:34,933: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:34,934: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:34 +2024-04-13 18:45:34,934: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:34,935: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:34,935: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:34,936: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:34,936: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:35,485: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:35,486: root: INFO: Current backtesting datetime 2023-07-05 15:00:00-05:00 +2024-04-13 18:45:35,486: root: INFO: Current backtesting datetime 2023-07-06 08:30:00-05:00 +2024-04-13 18:45:35,486: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:35 +2024-04-13 18:45:35,486: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:35,487: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:35,487: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:35,488: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:35,488: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:35,977: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:35,978: root: INFO: Current backtesting datetime 2023-07-06 15:00:00-05:00 +2024-04-13 18:45:35,978: root: INFO: Current backtesting datetime 2023-07-07 08:30:00-05:00 +2024-04-13 18:45:35,979: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:35 +2024-04-13 18:45:35,979: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:35,980: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:35,980: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:35,981: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:35,981: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:36,544: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:36,545: root: INFO: Current backtesting datetime 2023-07-07 15:00:00-05:00 +2024-04-13 18:45:36,545: root: INFO: Current backtesting datetime 2023-07-08 08:30:00-05:00 +2024-04-13 18:45:36,545: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:36,547: root: INFO: Current backtesting datetime 2023-07-08 08:29:00-05:00 +2024-04-13 18:45:36,548: root: INFO: Current backtesting datetime 2023-07-08 08:29:00-05:00 +2024-04-13 18:45:36,549: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:36,549: root: INFO: Current backtesting datetime 2023-07-10 07:30:00-05:00 +2024-04-13 18:45:36,550: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:36,551: root: INFO: Current backtesting datetime 2023-07-10 08:30:00-05:00 +2024-04-13 18:45:36,551: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:36,552: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:36 +2024-04-13 18:45:36,552: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:36,553: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:36,553: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:36,553: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:36,553: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:37,066: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:37,067: root: INFO: Current backtesting datetime 2023-07-10 15:00:00-05:00 +2024-04-13 18:45:37,067: root: INFO: Current backtesting datetime 2023-07-11 08:30:00-05:00 +2024-04-13 18:45:37,067: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:37 +2024-04-13 18:45:37,067: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:37,068: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:37,068: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:37,069: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:37,069: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:37,769: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:37,769: root: INFO: Current backtesting datetime 2023-07-11 15:00:00-05:00 +2024-04-13 18:45:37,770: root: INFO: Current backtesting datetime 2023-07-12 08:30:00-05:00 +2024-04-13 18:45:37,771: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:37 +2024-04-13 18:45:37,771: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:37,771: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:37,772: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:37,772: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:37,772: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:38,136: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:38,137: root: INFO: Current backtesting datetime 2023-07-12 15:00:00-05:00 +2024-04-13 18:45:38,137: root: INFO: Current backtesting datetime 2023-07-13 08:30:00-05:00 +2024-04-13 18:45:38,137: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:38 +2024-04-13 18:45:38,137: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:38,138: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:38,138: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:38,139: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:38,139: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:38,903: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:38,904: root: INFO: Current backtesting datetime 2023-07-13 15:00:00-05:00 +2024-04-13 18:45:38,905: root: INFO: Current backtesting datetime 2023-07-14 08:30:00-05:00 +2024-04-13 18:45:38,905: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:38 +2024-04-13 18:45:38,905: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:38,906: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:38,906: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:38,907: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:38,907: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:39,567: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:39,568: root: INFO: Current backtesting datetime 2023-07-14 15:00:00-05:00 +2024-04-13 18:45:39,568: root: INFO: Current backtesting datetime 2023-07-15 08:30:00-05:00 +2024-04-13 18:45:39,568: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:39,569: root: INFO: Current backtesting datetime 2023-07-15 08:29:00-05:00 +2024-04-13 18:45:39,571: root: INFO: Current backtesting datetime 2023-07-15 08:29:00-05:00 +2024-04-13 18:45:39,571: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:39,572: root: INFO: Current backtesting datetime 2023-07-17 07:30:00-05:00 +2024-04-13 18:45:39,572: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:39,574: root: INFO: Current backtesting datetime 2023-07-17 08:30:00-05:00 +2024-04-13 18:45:39,574: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:39,575: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:39 +2024-04-13 18:45:39,575: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:39,575: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:39,576: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:39,576: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:39,576: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:40,125: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:40,126: root: INFO: Current backtesting datetime 2023-07-17 15:00:00-05:00 +2024-04-13 18:45:40,127: root: INFO: Current backtesting datetime 2023-07-18 08:30:00-05:00 +2024-04-13 18:45:40,127: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:40 +2024-04-13 18:45:40,127: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:40,128: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:40,128: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:40,129: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:40,129: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:40,730: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:40,731: root: INFO: Current backtesting datetime 2023-07-18 15:00:00-05:00 +2024-04-13 18:45:40,731: root: INFO: Current backtesting datetime 2023-07-19 08:30:00-05:00 +2024-04-13 18:45:40,732: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:40 +2024-04-13 18:45:40,732: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:40,733: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:40,733: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:40,733: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:40,734: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:41,050: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:41,051: root: INFO: Current backtesting datetime 2023-07-19 15:00:00-05:00 +2024-04-13 18:45:41,052: root: INFO: Current backtesting datetime 2023-07-20 08:30:00-05:00 +2024-04-13 18:45:41,052: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:41 +2024-04-13 18:45:41,052: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:41,053: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:41,054: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:41,054: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:41,054: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:41,682: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:41,683: root: INFO: Current backtesting datetime 2023-07-20 15:00:00-05:00 +2024-04-13 18:45:41,684: root: INFO: Current backtesting datetime 2023-07-21 08:30:00-05:00 +2024-04-13 18:45:41,684: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:41 +2024-04-13 18:45:41,684: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:41,685: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:41,685: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:41,686: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:41,686: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:41,987: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:41,988: root: INFO: Current backtesting datetime 2023-07-21 15:00:00-05:00 +2024-04-13 18:45:41,989: root: INFO: Current backtesting datetime 2023-07-22 08:30:00-05:00 +2024-04-13 18:45:41,989: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:41,990: root: INFO: Current backtesting datetime 2023-07-22 08:29:00-05:00 +2024-04-13 18:45:41,991: root: INFO: Current backtesting datetime 2023-07-22 08:29:00-05:00 +2024-04-13 18:45:41,992: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:41,992: root: INFO: Current backtesting datetime 2023-07-24 07:30:00-05:00 +2024-04-13 18:45:41,993: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:41,994: root: INFO: Current backtesting datetime 2023-07-24 08:30:00-05:00 +2024-04-13 18:45:41,994: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:41,995: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:41 +2024-04-13 18:45:41,995: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:41,996: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:41,996: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:41,997: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:41,997: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:42,781: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:42,782: root: INFO: Current backtesting datetime 2023-07-24 15:00:00-05:00 +2024-04-13 18:45:42,782: root: INFO: Current backtesting datetime 2023-07-25 08:30:00-05:00 +2024-04-13 18:45:42,783: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:42 +2024-04-13 18:45:42,783: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:42,784: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:42,784: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:42,784: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:42,784: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:43,126: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:43,127: root: INFO: Current backtesting datetime 2023-07-25 15:00:00-05:00 +2024-04-13 18:45:43,127: root: INFO: Current backtesting datetime 2023-07-26 08:30:00-05:00 +2024-04-13 18:45:43,128: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:43 +2024-04-13 18:45:43,128: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:43,129: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:43,129: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:43,129: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:43,130: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:43,833: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:43,835: root: INFO: Current backtesting datetime 2023-07-26 15:00:00-05:00 +2024-04-13 18:45:43,835: root: INFO: Current backtesting datetime 2023-07-27 08:30:00-05:00 +2024-04-13 18:45:43,835: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:43 +2024-04-13 18:45:43,835: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:43,836: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:43,836: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:43,837: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:43,837: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:44,373: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:44,374: root: INFO: Current backtesting datetime 2023-07-27 15:00:00-05:00 +2024-04-13 18:45:44,374: root: INFO: Current backtesting datetime 2023-07-28 08:30:00-05:00 +2024-04-13 18:45:44,375: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:44 +2024-04-13 18:45:44,375: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:44,376: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:44,376: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:44,376: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:44,376: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:44,960: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:44,961: root: INFO: Current backtesting datetime 2023-07-28 15:00:00-05:00 +2024-04-13 18:45:44,962: root: INFO: Current backtesting datetime 2023-07-29 08:30:00-05:00 +2024-04-13 18:45:44,962: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:44,963: root: INFO: Current backtesting datetime 2023-07-29 08:29:00-05:00 +2024-04-13 18:45:44,965: root: INFO: Current backtesting datetime 2023-07-29 08:29:00-05:00 +2024-04-13 18:45:44,965: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:44,966: root: INFO: Current backtesting datetime 2023-07-31 07:30:00-05:00 +2024-04-13 18:45:44,966: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:44,967: root: INFO: Current backtesting datetime 2023-07-31 08:30:00-05:00 +2024-04-13 18:45:44,967: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:44,968: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:44 +2024-04-13 18:45:44,968: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:44,969: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:44,969: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:44,970: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:44,970: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:45,614: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:45,615: root: INFO: Current backtesting datetime 2023-07-31 15:00:00-05:00 +2024-04-13 18:45:45,615: root: INFO: Current backtesting datetime 2023-08-01 08:30:00-05:00 +2024-04-13 18:45:45,616: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:45 +2024-04-13 18:45:45,616: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:45,616: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:45,617: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:45,617: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:45,617: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:46,437: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:46,438: root: INFO: Current backtesting datetime 2023-08-01 15:00:00-05:00 +2024-04-13 18:45:46,438: root: INFO: Current backtesting datetime 2023-08-02 08:30:00-05:00 +2024-04-13 18:45:46,439: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:46 +2024-04-13 18:45:46,439: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:46,440: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:46,440: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:46,440: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:46,440: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:47,036: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:47,037: root: INFO: Current backtesting datetime 2023-08-02 15:00:00-05:00 +2024-04-13 18:45:47,037: root: INFO: Current backtesting datetime 2023-08-03 08:30:00-05:00 +2024-04-13 18:45:47,038: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:47 +2024-04-13 18:45:47,038: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:47,039: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:47,039: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:47,039: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:47,039: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:47,786: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:47,787: root: INFO: Current backtesting datetime 2023-08-03 15:00:00-05:00 +2024-04-13 18:45:47,787: root: INFO: Current backtesting datetime 2023-08-04 08:30:00-05:00 +2024-04-13 18:45:47,788: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:47 +2024-04-13 18:45:47,788: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:47,789: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:47,789: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:47,790: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:47,790: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:48,130: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:48,131: root: INFO: Current backtesting datetime 2023-08-04 15:00:00-05:00 +2024-04-13 18:45:48,132: root: INFO: Current backtesting datetime 2023-08-05 08:30:00-05:00 +2024-04-13 18:45:48,132: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:48,133: root: INFO: Current backtesting datetime 2023-08-05 08:29:00-05:00 +2024-04-13 18:45:48,134: root: INFO: Current backtesting datetime 2023-08-05 08:29:00-05:00 +2024-04-13 18:45:48,134: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:48,135: root: INFO: Current backtesting datetime 2023-08-07 07:30:00-05:00 +2024-04-13 18:45:48,135: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:48,136: root: INFO: Current backtesting datetime 2023-08-07 08:30:00-05:00 +2024-04-13 18:45:48,136: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:48,137: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:48 +2024-04-13 18:45:48,137: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:48,138: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:48,138: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:48,139: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:48,139: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:48,836: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:48,837: root: INFO: Current backtesting datetime 2023-08-07 15:00:00-05:00 +2024-04-13 18:45:48,838: root: INFO: Current backtesting datetime 2023-08-08 08:30:00-05:00 +2024-04-13 18:45:48,838: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:48 +2024-04-13 18:45:48,838: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:48,839: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:48,839: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:48,840: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:48,840: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:49,567: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:49,568: root: INFO: Current backtesting datetime 2023-08-08 15:00:00-05:00 +2024-04-13 18:45:49,568: root: INFO: Current backtesting datetime 2023-08-09 08:30:00-05:00 +2024-04-13 18:45:49,569: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:49 +2024-04-13 18:45:49,569: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:49,570: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:49,570: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:49,570: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:49,571: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:50,188: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:50,189: root: INFO: Current backtesting datetime 2023-08-09 15:00:00-05:00 +2024-04-13 18:45:50,189: root: INFO: Current backtesting datetime 2023-08-10 08:30:00-05:00 +2024-04-13 18:45:50,189: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:50 +2024-04-13 18:45:50,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:50,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:50,191: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:50,191: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:50,191: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:50,962: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:50,963: root: INFO: Current backtesting datetime 2023-08-10 15:00:00-05:00 +2024-04-13 18:45:50,963: root: INFO: Current backtesting datetime 2023-08-11 08:30:00-05:00 +2024-04-13 18:45:50,963: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:50 +2024-04-13 18:45:50,964: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:50,964: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:50,965: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:50,965: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:50,965: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:51,474: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:51,476: root: INFO: Current backtesting datetime 2023-08-11 15:00:00-05:00 +2024-04-13 18:45:51,477: root: INFO: Current backtesting datetime 2023-08-12 08:30:00-05:00 +2024-04-13 18:45:51,477: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:51,478: root: INFO: Current backtesting datetime 2023-08-12 08:29:00-05:00 +2024-04-13 18:45:51,480: root: INFO: Current backtesting datetime 2023-08-12 08:29:00-05:00 +2024-04-13 18:45:51,480: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:51,481: root: INFO: Current backtesting datetime 2023-08-14 07:30:00-05:00 +2024-04-13 18:45:51,481: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:51,482: root: INFO: Current backtesting datetime 2023-08-14 08:30:00-05:00 +2024-04-13 18:45:51,482: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:51,483: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:51 +2024-04-13 18:45:51,483: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:51,484: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:51,484: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:51,485: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:51,485: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:51,967: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:51,968: root: INFO: Current backtesting datetime 2023-08-14 15:00:00-05:00 +2024-04-13 18:45:51,968: root: INFO: Current backtesting datetime 2023-08-15 08:30:00-05:00 +2024-04-13 18:45:51,968: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:51 +2024-04-13 18:45:51,968: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:51,969: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:51,969: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:51,970: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:51,970: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:52,498: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:52,499: root: INFO: Current backtesting datetime 2023-08-15 15:00:00-05:00 +2024-04-13 18:45:52,499: root: INFO: Current backtesting datetime 2023-08-16 08:30:00-05:00 +2024-04-13 18:45:52,500: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:52 +2024-04-13 18:45:52,500: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:52,500: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:52,501: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:52,501: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:52,501: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:53,068: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:53,069: root: INFO: Current backtesting datetime 2023-08-16 15:00:00-05:00 +2024-04-13 18:45:53,069: root: INFO: Current backtesting datetime 2023-08-17 08:30:00-05:00 +2024-04-13 18:45:53,069: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:53 +2024-04-13 18:45:53,069: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:53,071: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:53,071: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:53,072: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:53,072: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:53,922: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:53,923: root: INFO: Current backtesting datetime 2023-08-17 15:00:00-05:00 +2024-04-13 18:45:53,923: root: INFO: Current backtesting datetime 2023-08-18 08:30:00-05:00 +2024-04-13 18:45:53,924: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:53 +2024-04-13 18:45:53,924: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:53,925: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:53,925: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:53,925: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:53,925: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:54,457: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:54,457: root: INFO: Current backtesting datetime 2023-08-18 15:00:00-05:00 +2024-04-13 18:45:54,458: root: INFO: Current backtesting datetime 2023-08-19 08:30:00-05:00 +2024-04-13 18:45:54,458: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:54,460: root: INFO: Current backtesting datetime 2023-08-19 08:29:00-05:00 +2024-04-13 18:45:54,461: root: INFO: Current backtesting datetime 2023-08-19 08:29:00-05:00 +2024-04-13 18:45:54,461: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:54,462: root: INFO: Current backtesting datetime 2023-08-21 07:30:00-05:00 +2024-04-13 18:45:54,462: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:54,463: root: INFO: Current backtesting datetime 2023-08-21 08:30:00-05:00 +2024-04-13 18:45:54,463: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:54,464: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:54 +2024-04-13 18:45:54,465: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:54,465: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:54,466: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:54,466: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:54,466: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:55,070: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:55,070: root: INFO: Current backtesting datetime 2023-08-21 15:00:00-05:00 +2024-04-13 18:45:55,071: root: INFO: Current backtesting datetime 2023-08-22 08:30:00-05:00 +2024-04-13 18:45:55,071: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:55 +2024-04-13 18:45:55,071: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:55,072: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:55,072: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:55,073: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:55,073: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:55,821: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:55,822: root: INFO: Current backtesting datetime 2023-08-22 15:00:00-05:00 +2024-04-13 18:45:55,823: root: INFO: Current backtesting datetime 2023-08-23 08:30:00-05:00 +2024-04-13 18:45:55,823: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:55 +2024-04-13 18:45:55,823: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:55,824: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:55,824: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:55,825: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:55,825: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:56,358: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:56,359: root: INFO: Current backtesting datetime 2023-08-23 15:00:00-05:00 +2024-04-13 18:45:56,360: root: INFO: Current backtesting datetime 2023-08-24 08:30:00-05:00 +2024-04-13 18:45:56,360: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:56 +2024-04-13 18:45:56,360: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:56,361: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:56,361: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:56,362: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:56,362: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:56,865: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:56,866: root: INFO: Current backtesting datetime 2023-08-24 15:00:00-05:00 +2024-04-13 18:45:56,867: root: INFO: Current backtesting datetime 2023-08-25 08:30:00-05:00 +2024-04-13 18:45:56,867: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:56 +2024-04-13 18:45:56,867: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:56,868: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:56,868: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:56,869: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:56,869: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:57,737: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:57,737: root: INFO: Current backtesting datetime 2023-08-25 15:00:00-05:00 +2024-04-13 18:45:57,738: root: INFO: Current backtesting datetime 2023-08-26 08:30:00-05:00 +2024-04-13 18:45:57,738: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:45:57,740: root: INFO: Current backtesting datetime 2023-08-26 08:29:00-05:00 +2024-04-13 18:45:57,741: root: INFO: Current backtesting datetime 2023-08-26 08:29:00-05:00 +2024-04-13 18:45:57,741: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:45:57,742: root: INFO: Current backtesting datetime 2023-08-28 07:30:00-05:00 +2024-04-13 18:45:57,742: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:45:57,743: root: INFO: Current backtesting datetime 2023-08-28 08:30:00-05:00 +2024-04-13 18:45:57,743: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:45:57,744: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:57 +2024-04-13 18:45:57,744: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:57,745: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:57,745: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:57,746: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:57,746: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:58,458: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:58,459: root: INFO: Current backtesting datetime 2023-08-28 15:00:00-05:00 +2024-04-13 18:45:58,459: root: INFO: Current backtesting datetime 2023-08-29 08:30:00-05:00 +2024-04-13 18:45:58,460: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:58 +2024-04-13 18:45:58,460: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:58,461: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:58,461: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:58,461: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:58,462: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:59,006: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:59,007: root: INFO: Current backtesting datetime 2023-08-29 15:00:00-05:00 +2024-04-13 18:45:59,007: root: INFO: Current backtesting datetime 2023-08-30 08:30:00-05:00 +2024-04-13 18:45:59,008: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:59 +2024-04-13 18:45:59,008: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:59,009: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:59,009: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:59,009: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:59,009: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:45:59,957: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:45:59,958: root: INFO: Current backtesting datetime 2023-08-30 15:00:00-05:00 +2024-04-13 18:45:59,959: root: INFO: Current backtesting datetime 2023-08-31 08:30:00-05:00 +2024-04-13 18:45:59,959: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:45:59 +2024-04-13 18:45:59,959: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:59,960: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:45:59,960: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:45:59,961: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:45:59,961: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:00,604: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:00,605: root: INFO: Current backtesting datetime 2023-08-31 15:00:00-05:00 +2024-04-13 18:46:00,606: root: INFO: Current backtesting datetime 2023-09-01 08:30:00-05:00 +2024-04-13 18:46:00,606: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:00 +2024-04-13 18:46:00,606: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:00,607: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:00,607: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:00,608: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:00,608: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:01,365: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:01,366: root: INFO: Current backtesting datetime 2023-09-01 15:00:00-05:00 +2024-04-13 18:46:01,366: root: INFO: Current backtesting datetime 2023-09-02 08:30:00-05:00 +2024-04-13 18:46:01,366: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:01,367: root: INFO: Current backtesting datetime 2023-09-02 08:29:00-05:00 +2024-04-13 18:46:01,369: root: INFO: Current backtesting datetime 2023-09-02 08:29:00-05:00 +2024-04-13 18:46:01,369: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:01,370: root: INFO: Current backtesting datetime 2023-09-05 07:30:00-05:00 +2024-04-13 18:46:01,370: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:01,371: root: INFO: Current backtesting datetime 2023-09-05 08:30:00-05:00 +2024-04-13 18:46:01,371: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:01,372: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:01 +2024-04-13 18:46:01,372: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:01,373: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:01,373: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:01,373: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:01,374: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:02,209: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:02,210: root: INFO: Current backtesting datetime 2023-09-05 15:00:00-05:00 +2024-04-13 18:46:02,210: root: INFO: Current backtesting datetime 2023-09-06 08:30:00-05:00 +2024-04-13 18:46:02,210: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:02 +2024-04-13 18:46:02,210: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:02,212: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:02,212: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:02,212: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:02,213: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:03,243: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:03,244: root: INFO: Current backtesting datetime 2023-09-06 15:00:00-05:00 +2024-04-13 18:46:03,244: root: INFO: Current backtesting datetime 2023-09-07 08:30:00-05:00 +2024-04-13 18:46:03,245: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:03 +2024-04-13 18:46:03,245: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:03,246: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:03,246: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:03,246: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:03,247: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:04,179: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:04,180: root: INFO: Current backtesting datetime 2023-09-07 15:00:00-05:00 +2024-04-13 18:46:04,180: root: INFO: Current backtesting datetime 2023-09-08 08:30:00-05:00 +2024-04-13 18:46:04,181: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:04 +2024-04-13 18:46:04,181: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:04,182: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:04,182: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:04,182: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:04,182: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:05,329: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:05,330: root: INFO: Current backtesting datetime 2023-09-08 15:00:00-05:00 +2024-04-13 18:46:05,330: root: INFO: Current backtesting datetime 2023-09-09 08:30:00-05:00 +2024-04-13 18:46:05,330: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:05,332: root: INFO: Current backtesting datetime 2023-09-09 08:29:00-05:00 +2024-04-13 18:46:05,333: root: INFO: Current backtesting datetime 2023-09-09 08:29:00-05:00 +2024-04-13 18:46:05,333: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:05,334: root: INFO: Current backtesting datetime 2023-09-11 07:30:00-05:00 +2024-04-13 18:46:05,334: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:05,335: root: INFO: Current backtesting datetime 2023-09-11 08:30:00-05:00 +2024-04-13 18:46:05,335: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:05,336: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:05 +2024-04-13 18:46:05,336: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:05,337: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:05,337: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:05,338: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:05,338: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:06,314: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:06,316: root: INFO: Current backtesting datetime 2023-09-11 15:00:00-05:00 +2024-04-13 18:46:06,316: root: INFO: Current backtesting datetime 2023-09-12 08:30:00-05:00 +2024-04-13 18:46:06,316: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:06 +2024-04-13 18:46:06,316: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:06,316: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:06,317: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:06,317: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:06,317: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:07,140: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:07,141: root: INFO: Current backtesting datetime 2023-09-12 15:00:00-05:00 +2024-04-13 18:46:07,141: root: INFO: Current backtesting datetime 2023-09-13 08:30:00-05:00 +2024-04-13 18:46:07,141: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:07 +2024-04-13 18:46:07,142: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:07,142: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:07,143: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:07,143: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:07,143: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:07,890: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:07,891: root: INFO: Current backtesting datetime 2023-09-13 15:00:00-05:00 +2024-04-13 18:46:07,891: root: INFO: Current backtesting datetime 2023-09-14 08:30:00-05:00 +2024-04-13 18:46:07,891: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:07 +2024-04-13 18:46:07,892: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:07,892: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:07,893: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:07,893: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:07,893: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:08,510: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:08,510: root: INFO: Current backtesting datetime 2023-09-14 15:00:00-05:00 +2024-04-13 18:46:08,511: root: INFO: Current backtesting datetime 2023-09-15 08:30:00-05:00 +2024-04-13 18:46:08,511: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:08 +2024-04-13 18:46:08,511: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:08,512: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:08,512: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:08,513: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:08,513: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:09,096: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:09,098: root: INFO: Current backtesting datetime 2023-09-15 15:00:00-05:00 +2024-04-13 18:46:09,099: root: INFO: Current backtesting datetime 2023-09-16 08:30:00-05:00 +2024-04-13 18:46:09,099: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:09,101: root: INFO: Current backtesting datetime 2023-09-16 08:29:00-05:00 +2024-04-13 18:46:09,102: root: INFO: Current backtesting datetime 2023-09-16 08:29:00-05:00 +2024-04-13 18:46:09,102: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:09,103: root: INFO: Current backtesting datetime 2023-09-18 07:30:00-05:00 +2024-04-13 18:46:09,103: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:09,104: root: INFO: Current backtesting datetime 2023-09-18 08:30:00-05:00 +2024-04-13 18:46:09,104: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:09,105: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:09 +2024-04-13 18:46:09,105: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:09,106: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:09,106: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:09,107: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:09,107: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:09,858: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:09,859: root: INFO: Current backtesting datetime 2023-09-18 15:00:00-05:00 +2024-04-13 18:46:09,859: root: INFO: Current backtesting datetime 2023-09-19 08:30:00-05:00 +2024-04-13 18:46:09,859: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:09 +2024-04-13 18:46:09,860: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:09,860: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:09,861: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:09,861: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:09,861: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:10,406: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:10,407: root: INFO: Current backtesting datetime 2023-09-19 15:00:00-05:00 +2024-04-13 18:46:10,408: root: INFO: Current backtesting datetime 2023-09-20 08:30:00-05:00 +2024-04-13 18:46:10,408: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:10 +2024-04-13 18:46:10,408: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:10,409: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:10,409: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:10,410: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:10,410: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:10,935: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:10,936: root: INFO: Current backtesting datetime 2023-09-20 15:00:00-05:00 +2024-04-13 18:46:10,936: root: INFO: Current backtesting datetime 2023-09-21 08:30:00-05:00 +2024-04-13 18:46:10,936: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:10 +2024-04-13 18:46:10,937: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:10,937: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:10,938: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:10,938: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:10,938: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:11,556: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:11,557: root: INFO: Current backtesting datetime 2023-09-21 15:00:00-05:00 +2024-04-13 18:46:11,558: root: INFO: Current backtesting datetime 2023-09-22 08:30:00-05:00 +2024-04-13 18:46:11,558: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:11 +2024-04-13 18:46:11,558: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:11,559: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:11,559: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:11,560: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:11,560: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:12,412: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:12,413: root: INFO: Current backtesting datetime 2023-09-22 15:00:00-05:00 +2024-04-13 18:46:12,413: root: INFO: Current backtesting datetime 2023-09-23 08:30:00-05:00 +2024-04-13 18:46:12,414: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:12,415: root: INFO: Current backtesting datetime 2023-09-23 08:29:00-05:00 +2024-04-13 18:46:12,417: root: INFO: Current backtesting datetime 2023-09-23 08:29:00-05:00 +2024-04-13 18:46:12,417: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:12,417: root: INFO: Current backtesting datetime 2023-09-25 07:30:00-05:00 +2024-04-13 18:46:12,418: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:12,419: root: INFO: Current backtesting datetime 2023-09-25 08:30:00-05:00 +2024-04-13 18:46:12,419: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:12,420: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:12 +2024-04-13 18:46:12,420: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:12,421: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:12,421: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:12,421: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:12,422: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:13,143: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:13,144: root: INFO: Current backtesting datetime 2023-09-25 15:00:00-05:00 +2024-04-13 18:46:13,145: root: INFO: Current backtesting datetime 2023-09-26 08:30:00-05:00 +2024-04-13 18:46:13,145: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:13 +2024-04-13 18:46:13,145: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:13,146: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:13,146: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:13,147: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:13,147: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:14,003: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:14,004: root: INFO: Current backtesting datetime 2023-09-26 15:00:00-05:00 +2024-04-13 18:46:14,004: root: INFO: Current backtesting datetime 2023-09-27 08:30:00-05:00 +2024-04-13 18:46:14,005: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:14 +2024-04-13 18:46:14,005: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:14,006: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:14,006: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:14,007: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:14,007: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:14,670: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:14,671: root: INFO: Current backtesting datetime 2023-09-27 15:00:00-05:00 +2024-04-13 18:46:14,672: root: INFO: Current backtesting datetime 2023-09-28 08:30:00-05:00 +2024-04-13 18:46:14,672: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:14 +2024-04-13 18:46:14,672: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:14,673: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:14,673: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:14,674: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:14,674: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:15,069: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:15,070: root: INFO: Current backtesting datetime 2023-09-28 15:00:00-05:00 +2024-04-13 18:46:15,070: root: INFO: Current backtesting datetime 2023-09-29 08:30:00-05:00 +2024-04-13 18:46:15,071: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:15 +2024-04-13 18:46:15,071: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:15,072: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:15,072: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:15,073: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:15,073: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:15,869: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:15,869: root: INFO: Current backtesting datetime 2023-09-29 15:00:00-05:00 +2024-04-13 18:46:15,869: root: INFO: Current backtesting datetime 2023-09-30 08:30:00-05:00 +2024-04-13 18:46:15,870: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:15,871: root: INFO: Current backtesting datetime 2023-09-30 08:29:00-05:00 +2024-04-13 18:46:15,872: root: INFO: Current backtesting datetime 2023-09-30 08:29:00-05:00 +2024-04-13 18:46:15,872: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:15,873: root: INFO: Current backtesting datetime 2023-10-02 07:30:00-05:00 +2024-04-13 18:46:15,875: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:15,875: root: INFO: Current backtesting datetime 2023-10-02 08:30:00-05:00 +2024-04-13 18:46:15,875: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:15,876: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:15 +2024-04-13 18:46:15,876: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:15,878: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:15,878: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:15,878: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:15,878: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:16,427: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:16,429: root: INFO: Current backtesting datetime 2023-10-02 15:00:00-05:00 +2024-04-13 18:46:16,429: root: INFO: Current backtesting datetime 2023-10-03 08:30:00-05:00 +2024-04-13 18:46:16,429: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:16 +2024-04-13 18:46:16,429: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:16,430: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:16,430: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:16,431: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:16,431: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:17,044: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:17,045: root: INFO: Current backtesting datetime 2023-10-03 15:00:00-05:00 +2024-04-13 18:46:17,045: root: INFO: Current backtesting datetime 2023-10-04 08:30:00-05:00 +2024-04-13 18:46:17,046: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:17 +2024-04-13 18:46:17,046: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:17,047: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:17,047: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:17,048: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:17,048: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:17,796: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:17,797: root: INFO: Current backtesting datetime 2023-10-04 15:00:00-05:00 +2024-04-13 18:46:17,797: root: INFO: Current backtesting datetime 2023-10-05 08:30:00-05:00 +2024-04-13 18:46:17,797: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:17 +2024-04-13 18:46:17,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:17,798: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:17,798: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:17,799: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:17,799: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:18,398: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:18,399: root: INFO: Current backtesting datetime 2023-10-05 15:00:00-05:00 +2024-04-13 18:46:18,399: root: INFO: Current backtesting datetime 2023-10-06 08:30:00-05:00 +2024-04-13 18:46:18,399: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:18 +2024-04-13 18:46:18,400: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:18,400: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:18,401: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:18,401: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:18,401: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:19,053: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:19,054: root: INFO: Current backtesting datetime 2023-10-06 15:00:00-05:00 +2024-04-13 18:46:19,055: root: INFO: Current backtesting datetime 2023-10-07 08:30:00-05:00 +2024-04-13 18:46:19,055: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:19,056: root: INFO: Current backtesting datetime 2023-10-07 08:29:00-05:00 +2024-04-13 18:46:19,057: root: INFO: Current backtesting datetime 2023-10-07 08:29:00-05:00 +2024-04-13 18:46:19,058: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:19,058: root: INFO: Current backtesting datetime 2023-10-09 07:30:00-05:00 +2024-04-13 18:46:19,059: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:19,060: root: INFO: Current backtesting datetime 2023-10-09 08:30:00-05:00 +2024-04-13 18:46:19,060: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:19,061: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:19 +2024-04-13 18:46:19,061: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:19,062: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:19,062: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:19,062: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:19,062: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:19,850: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:19,851: root: INFO: Current backtesting datetime 2023-10-09 15:00:00-05:00 +2024-04-13 18:46:19,852: root: INFO: Current backtesting datetime 2023-10-10 08:30:00-05:00 +2024-04-13 18:46:19,852: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:19 +2024-04-13 18:46:19,852: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:19,853: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:19,853: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:19,854: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:19,854: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:20,425: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:20,426: root: INFO: Current backtesting datetime 2023-10-10 15:00:00-05:00 +2024-04-13 18:46:20,427: root: INFO: Current backtesting datetime 2023-10-11 08:30:00-05:00 +2024-04-13 18:46:20,427: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:20 +2024-04-13 18:46:20,427: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:20,428: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:20,428: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:20,429: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:20,429: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:20,975: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:20,976: root: INFO: Current backtesting datetime 2023-10-11 15:00:00-05:00 +2024-04-13 18:46:20,976: root: INFO: Current backtesting datetime 2023-10-12 08:30:00-05:00 +2024-04-13 18:46:20,977: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:20 +2024-04-13 18:46:20,977: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:20,977: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:20,978: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:20,978: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:20,978: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:21,626: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:21,627: root: INFO: Current backtesting datetime 2023-10-12 15:00:00-05:00 +2024-04-13 18:46:21,627: root: INFO: Current backtesting datetime 2023-10-13 08:30:00-05:00 +2024-04-13 18:46:21,628: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:21 +2024-04-13 18:46:21,628: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:21,629: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:21,629: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:21,629: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:21,629: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:22,373: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:22,374: root: INFO: Current backtesting datetime 2023-10-13 15:00:00-05:00 +2024-04-13 18:46:22,374: root: INFO: Current backtesting datetime 2023-10-14 08:30:00-05:00 +2024-04-13 18:46:22,375: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:22,376: root: INFO: Current backtesting datetime 2023-10-14 08:29:00-05:00 +2024-04-13 18:46:22,378: root: INFO: Current backtesting datetime 2023-10-14 08:29:00-05:00 +2024-04-13 18:46:22,378: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:22,378: root: INFO: Current backtesting datetime 2023-10-16 07:30:00-05:00 +2024-04-13 18:46:22,379: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:22,380: root: INFO: Current backtesting datetime 2023-10-16 08:30:00-05:00 +2024-04-13 18:46:22,380: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:22,381: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:22 +2024-04-13 18:46:22,381: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:22,382: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:22,382: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:22,382: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:22,382: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:22,889: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:22,890: root: INFO: Current backtesting datetime 2023-10-16 15:00:00-05:00 +2024-04-13 18:46:22,891: root: INFO: Current backtesting datetime 2023-10-17 08:30:00-05:00 +2024-04-13 18:46:22,891: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:22 +2024-04-13 18:46:22,891: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:22,892: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:22,892: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:22,893: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:22,893: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:23,427: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:23,428: root: INFO: Current backtesting datetime 2023-10-17 15:00:00-05:00 +2024-04-13 18:46:23,428: root: INFO: Current backtesting datetime 2023-10-18 08:30:00-05:00 +2024-04-13 18:46:23,428: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:23 +2024-04-13 18:46:23,429: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:23,429: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:23,430: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:23,430: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:23,430: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:23,971: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:23,972: root: INFO: Current backtesting datetime 2023-10-18 15:00:00-05:00 +2024-04-13 18:46:23,973: root: INFO: Current backtesting datetime 2023-10-19 08:30:00-05:00 +2024-04-13 18:46:23,973: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:23 +2024-04-13 18:46:23,973: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:23,974: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:23,974: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:23,975: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:23,975: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:24,457: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:24,458: root: INFO: Current backtesting datetime 2023-10-19 15:00:00-05:00 +2024-04-13 18:46:24,458: root: INFO: Current backtesting datetime 2023-10-20 08:30:00-05:00 +2024-04-13 18:46:24,458: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:24 +2024-04-13 18:46:24,458: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:24,459: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:24,459: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:24,460: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:24,460: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:25,002: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:25,003: root: INFO: Current backtesting datetime 2023-10-20 15:00:00-05:00 +2024-04-13 18:46:25,003: root: INFO: Current backtesting datetime 2023-10-21 08:30:00-05:00 +2024-04-13 18:46:25,004: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:25,005: root: INFO: Current backtesting datetime 2023-10-21 08:29:00-05:00 +2024-04-13 18:46:25,006: root: INFO: Current backtesting datetime 2023-10-21 08:29:00-05:00 +2024-04-13 18:46:25,006: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:25,007: root: INFO: Current backtesting datetime 2023-10-23 07:30:00-05:00 +2024-04-13 18:46:25,007: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:25,008: root: INFO: Current backtesting datetime 2023-10-23 08:30:00-05:00 +2024-04-13 18:46:25,008: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:25,009: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:25 +2024-04-13 18:46:25,009: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:25,010: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:25,010: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:25,011: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:25,011: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:25,738: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:25,739: root: INFO: Current backtesting datetime 2023-10-23 15:00:00-05:00 +2024-04-13 18:46:25,739: root: INFO: Current backtesting datetime 2023-10-24 08:30:00-05:00 +2024-04-13 18:46:25,739: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:25 +2024-04-13 18:46:25,739: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:25,740: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:25,740: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:25,741: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:25,741: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:26,061: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:26,062: root: INFO: Current backtesting datetime 2023-10-24 15:00:00-05:00 +2024-04-13 18:46:26,062: root: INFO: Current backtesting datetime 2023-10-25 08:30:00-05:00 +2024-04-13 18:46:26,063: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:26 +2024-04-13 18:46:26,063: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:26,064: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:26,064: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:26,064: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:26,064: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:26,795: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:26,796: root: INFO: Current backtesting datetime 2023-10-25 15:00:00-05:00 +2024-04-13 18:46:26,797: root: INFO: Current backtesting datetime 2023-10-26 08:30:00-05:00 +2024-04-13 18:46:26,797: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:26 +2024-04-13 18:46:26,797: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:26,798: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:26,798: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:26,799: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:26,799: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:27,069: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:27,070: root: INFO: Current backtesting datetime 2023-10-26 15:00:00-05:00 +2024-04-13 18:46:27,070: root: INFO: Current backtesting datetime 2023-10-27 08:30:00-05:00 +2024-04-13 18:46:27,071: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:27 +2024-04-13 18:46:27,071: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:27,073: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:27,073: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:27,073: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:27,073: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:27,790: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:27,791: root: INFO: Current backtesting datetime 2023-10-27 15:00:00-05:00 +2024-04-13 18:46:27,792: root: INFO: Current backtesting datetime 2023-10-28 08:30:00-05:00 +2024-04-13 18:46:27,792: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:27,793: root: INFO: Current backtesting datetime 2023-10-28 08:29:00-05:00 +2024-04-13 18:46:27,795: root: INFO: Current backtesting datetime 2023-10-28 08:29:00-05:00 +2024-04-13 18:46:27,795: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:27,796: root: INFO: Current backtesting datetime 2023-10-30 07:30:00-05:00 +2024-04-13 18:46:27,796: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:27,797: root: INFO: Current backtesting datetime 2023-10-30 08:30:00-05:00 +2024-04-13 18:46:27,797: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:27,798: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:27 +2024-04-13 18:46:27,798: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:27,799: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:27,799: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:27,800: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:27,800: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:28,091: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:28,092: root: INFO: Current backtesting datetime 2023-10-30 15:00:00-05:00 +2024-04-13 18:46:28,092: root: INFO: Current backtesting datetime 2023-10-31 08:30:00-05:00 +2024-04-13 18:46:28,093: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:28 +2024-04-13 18:46:28,093: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:28,094: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:28,094: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:28,094: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:28,094: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:28,758: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:28,759: root: INFO: Current backtesting datetime 2023-10-31 15:00:00-05:00 +2024-04-13 18:46:28,760: root: INFO: Current backtesting datetime 2023-11-01 08:30:00-05:00 +2024-04-13 18:46:28,760: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:28 +2024-04-13 18:46:28,760: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:28,761: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:28,761: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:28,762: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:28,762: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:29,174: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:29,175: root: INFO: Current backtesting datetime 2023-11-01 15:00:00-05:00 +2024-04-13 18:46:29,176: root: INFO: Current backtesting datetime 2023-11-02 08:30:00-05:00 +2024-04-13 18:46:29,176: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:29 +2024-04-13 18:46:29,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:29,177: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:29,178: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:29,178: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:29,178: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:29,969: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:29,970: root: INFO: Current backtesting datetime 2023-11-02 15:00:00-05:00 +2024-04-13 18:46:29,970: root: INFO: Current backtesting datetime 2023-11-03 08:30:00-05:00 +2024-04-13 18:46:29,970: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:29 +2024-04-13 18:46:29,971: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:29,971: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:29,972: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:29,972: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:29,972: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:30,480: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:30,481: root: INFO: Current backtesting datetime 2023-11-03 15:00:00-05:00 +2024-04-13 18:46:30,481: root: INFO: Current backtesting datetime 2023-11-04 08:30:00-05:00 +2024-04-13 18:46:30,482: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:30,483: root: INFO: Current backtesting datetime 2023-11-04 08:29:00-05:00 +2024-04-13 18:46:30,484: root: INFO: Current backtesting datetime 2023-11-04 08:29:00-05:00 +2024-04-13 18:46:30,484: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:30,485: root: INFO: Current backtesting datetime 2023-11-06 08:30:00-05:00 +2024-04-13 18:46:30,486: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:30,487: root: INFO: Current backtesting datetime 2023-11-06 09:30:00-05:00 +2024-04-13 18:46:30,487: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:30,488: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:30 +2024-04-13 18:46:30,488: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:30,489: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:30,489: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:30,489: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:30,489: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:30,996: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:30,997: root: INFO: Current backtesting datetime 2023-11-06 16:00:00-05:00 +2024-04-13 18:46:30,997: root: INFO: Current backtesting datetime 2023-11-07 09:30:00-05:00 +2024-04-13 18:46:30,997: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:30 +2024-04-13 18:46:30,997: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:30,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:30,998: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:30,999: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:30,999: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:31,602: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:31,603: root: INFO: Current backtesting datetime 2023-11-07 16:00:00-05:00 +2024-04-13 18:46:31,604: root: INFO: Current backtesting datetime 2023-11-08 09:30:00-05:00 +2024-04-13 18:46:31,604: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:31 +2024-04-13 18:46:31,604: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:31,605: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:31,605: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:31,606: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:31,606: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:31,911: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:31,913: root: INFO: Current backtesting datetime 2023-11-08 16:00:00-05:00 +2024-04-13 18:46:31,913: root: INFO: Current backtesting datetime 2023-11-09 09:30:00-05:00 +2024-04-13 18:46:31,913: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:31 +2024-04-13 18:46:31,913: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:31,914: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:31,914: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:31,915: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:31,915: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:32,425: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:32,425: root: INFO: Current backtesting datetime 2023-11-09 16:00:00-05:00 +2024-04-13 18:46:32,425: root: INFO: Current backtesting datetime 2023-11-10 09:30:00-05:00 +2024-04-13 18:46:32,426: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:32 +2024-04-13 18:46:32,426: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:32,427: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:32,427: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:32,428: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:32,428: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:33,117: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:33,118: root: INFO: Current backtesting datetime 2023-11-10 16:00:00-05:00 +2024-04-13 18:46:33,118: root: INFO: Current backtesting datetime 2023-11-11 09:30:00-05:00 +2024-04-13 18:46:33,118: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:33,120: root: INFO: Current backtesting datetime 2023-11-11 09:29:00-05:00 +2024-04-13 18:46:33,121: root: INFO: Current backtesting datetime 2023-11-11 09:29:00-05:00 +2024-04-13 18:46:33,121: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:33,122: root: INFO: Current backtesting datetime 2023-11-13 08:30:00-05:00 +2024-04-13 18:46:33,123: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:33,124: root: INFO: Current backtesting datetime 2023-11-13 09:30:00-05:00 +2024-04-13 18:46:33,124: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:33,125: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:33 +2024-04-13 18:46:33,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:33,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:33,126: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:33,126: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:33,126: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:33,802: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:33,803: root: INFO: Current backtesting datetime 2023-11-13 16:00:00-05:00 +2024-04-13 18:46:33,804: root: INFO: Current backtesting datetime 2023-11-14 09:30:00-05:00 +2024-04-13 18:46:33,804: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:33 +2024-04-13 18:46:33,804: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:33,805: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:33,805: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:33,806: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:33,806: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:34,077: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:34,077: root: INFO: Current backtesting datetime 2023-11-14 16:00:00-05:00 +2024-04-13 18:46:34,078: root: INFO: Current backtesting datetime 2023-11-15 09:30:00-05:00 +2024-04-13 18:46:34,078: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:34 +2024-04-13 18:46:34,078: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:34,079: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:34,079: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:34,080: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:34,080: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:34,745: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:34,746: root: INFO: Current backtesting datetime 2023-11-15 16:00:00-05:00 +2024-04-13 18:46:34,747: root: INFO: Current backtesting datetime 2023-11-16 09:30:00-05:00 +2024-04-13 18:46:34,747: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:34 +2024-04-13 18:46:34,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:34,747: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:34,748: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:34,748: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:34,748: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:35,057: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:35,058: root: INFO: Current backtesting datetime 2023-11-16 16:00:00-05:00 +2024-04-13 18:46:35,058: root: INFO: Current backtesting datetime 2023-11-17 09:30:00-05:00 +2024-04-13 18:46:35,058: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:35 +2024-04-13 18:46:35,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:35,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:35,060: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:35,060: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:35,060: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:35,763: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:35,764: root: INFO: Current backtesting datetime 2023-11-17 16:00:00-05:00 +2024-04-13 18:46:35,764: root: INFO: Current backtesting datetime 2023-11-18 09:30:00-05:00 +2024-04-13 18:46:35,765: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:35,766: root: INFO: Current backtesting datetime 2023-11-18 09:29:00-05:00 +2024-04-13 18:46:35,768: root: INFO: Current backtesting datetime 2023-11-18 09:29:00-05:00 +2024-04-13 18:46:35,768: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:35,769: root: INFO: Current backtesting datetime 2023-11-20 08:30:00-05:00 +2024-04-13 18:46:35,769: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:35,770: root: INFO: Current backtesting datetime 2023-11-20 09:30:00-05:00 +2024-04-13 18:46:35,770: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:35,771: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:35 +2024-04-13 18:46:35,771: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:35,772: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:35,772: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:35,772: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:35,773: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:36,048: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:36,049: root: INFO: Current backtesting datetime 2023-11-20 16:00:00-05:00 +2024-04-13 18:46:36,050: root: INFO: Current backtesting datetime 2023-11-21 09:30:00-05:00 +2024-04-13 18:46:36,050: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:36 +2024-04-13 18:46:36,050: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:36,051: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:36,051: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:36,052: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:36,052: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:36,858: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:36,859: root: INFO: Current backtesting datetime 2023-11-21 16:00:00-05:00 +2024-04-13 18:46:36,859: root: INFO: Current backtesting datetime 2023-11-22 09:30:00-05:00 +2024-04-13 18:46:36,859: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:36 +2024-04-13 18:46:36,859: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:36,860: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:36,861: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:36,861: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:36,861: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:37,433: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:37,434: root: INFO: Current backtesting datetime 2023-11-22 16:00:00-05:00 +2024-04-13 18:46:37,434: root: INFO: Current backtesting datetime 2023-11-23 09:30:00-05:00 +2024-04-13 18:46:37,434: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:37,436: root: INFO: Current backtesting datetime 2023-11-23 09:29:00-05:00 +2024-04-13 18:46:37,437: root: INFO: Current backtesting datetime 2023-11-23 09:29:00-05:00 +2024-04-13 18:46:37,437: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:37,438: root: INFO: Current backtesting datetime 2023-11-24 08:30:00-05:00 +2024-04-13 18:46:37,438: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:37,439: root: INFO: Current backtesting datetime 2023-11-24 09:30:00-05:00 +2024-04-13 18:46:37,439: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:37,440: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:37 +2024-04-13 18:46:37,440: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:37,441: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:37,441: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:37,442: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:37,442: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:37,991: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:37,992: root: INFO: Current backtesting datetime 2023-11-24 13:00:00-05:00 +2024-04-13 18:46:37,992: root: INFO: Current backtesting datetime 2023-11-25 09:30:00-05:00 +2024-04-13 18:46:37,993: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:37,994: root: INFO: Current backtesting datetime 2023-11-25 09:29:00-05:00 +2024-04-13 18:46:37,996: root: INFO: Current backtesting datetime 2023-11-25 09:29:00-05:00 +2024-04-13 18:46:37,996: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:37,997: root: INFO: Current backtesting datetime 2023-11-27 08:30:00-05:00 +2024-04-13 18:46:37,997: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:37,998: root: INFO: Current backtesting datetime 2023-11-27 09:30:00-05:00 +2024-04-13 18:46:37,998: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:37,999: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:37 +2024-04-13 18:46:37,999: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:38,000: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:38,000: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:38,001: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:38,001: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:38,698: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:38,699: root: INFO: Current backtesting datetime 2023-11-27 16:00:00-05:00 +2024-04-13 18:46:38,699: root: INFO: Current backtesting datetime 2023-11-28 09:30:00-05:00 +2024-04-13 18:46:38,700: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:38 +2024-04-13 18:46:38,700: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:38,700: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:38,701: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:38,701: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:38,701: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:39,103: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:39,105: root: INFO: Current backtesting datetime 2023-11-28 16:00:00-05:00 +2024-04-13 18:46:39,105: root: INFO: Current backtesting datetime 2023-11-29 09:30:00-05:00 +2024-04-13 18:46:39,105: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:39 +2024-04-13 18:46:39,105: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:39,106: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:39,106: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:39,107: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:39,107: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:39,941: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:39,942: root: INFO: Current backtesting datetime 2023-11-29 16:00:00-05:00 +2024-04-13 18:46:39,943: root: INFO: Current backtesting datetime 2023-11-30 09:30:00-05:00 +2024-04-13 18:46:39,943: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:39 +2024-04-13 18:46:39,943: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:39,944: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:39,944: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:39,945: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:39,945: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:40,483: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:40,484: root: INFO: Current backtesting datetime 2023-11-30 16:00:00-05:00 +2024-04-13 18:46:40,484: root: INFO: Current backtesting datetime 2023-12-01 09:30:00-05:00 +2024-04-13 18:46:40,485: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:40 +2024-04-13 18:46:40,485: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:40,486: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:40,486: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:40,487: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:40,487: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:41,001: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:41,002: root: INFO: Current backtesting datetime 2023-12-01 16:00:00-05:00 +2024-04-13 18:46:41,003: root: INFO: Current backtesting datetime 2023-12-02 09:30:00-05:00 +2024-04-13 18:46:41,003: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:41,005: root: INFO: Current backtesting datetime 2023-12-02 09:29:00-05:00 +2024-04-13 18:46:41,006: root: INFO: Current backtesting datetime 2023-12-02 09:29:00-05:00 +2024-04-13 18:46:41,006: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:41,007: root: INFO: Current backtesting datetime 2023-12-04 08:30:00-05:00 +2024-04-13 18:46:41,007: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:41,008: root: INFO: Current backtesting datetime 2023-12-04 09:30:00-05:00 +2024-04-13 18:46:41,008: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:41,009: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:41 +2024-04-13 18:46:41,009: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:41,010: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:41,010: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:41,011: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:41,011: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:41,702: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:41,703: root: INFO: Current backtesting datetime 2023-12-04 16:00:00-05:00 +2024-04-13 18:46:41,703: root: INFO: Current backtesting datetime 2023-12-05 09:30:00-05:00 +2024-04-13 18:46:41,704: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:41 +2024-04-13 18:46:41,704: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:41,705: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:41,705: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:41,705: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:41,705: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:42,039: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:42,040: root: INFO: Current backtesting datetime 2023-12-05 16:00:00-05:00 +2024-04-13 18:46:42,040: root: INFO: Current backtesting datetime 2023-12-06 09:30:00-05:00 +2024-04-13 18:46:42,041: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:42 +2024-04-13 18:46:42,041: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:42,041: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:42,042: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:42,042: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:42,042: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:42,830: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:42,830: root: INFO: Current backtesting datetime 2023-12-06 16:00:00-05:00 +2024-04-13 18:46:42,831: root: INFO: Current backtesting datetime 2023-12-07 09:30:00-05:00 +2024-04-13 18:46:42,831: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:42 +2024-04-13 18:46:42,831: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:42,833: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:42,833: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:42,834: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:42,834: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:43,319: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:43,320: root: INFO: Current backtesting datetime 2023-12-07 16:00:00-05:00 +2024-04-13 18:46:43,320: root: INFO: Current backtesting datetime 2023-12-08 09:30:00-05:00 +2024-04-13 18:46:43,320: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:43 +2024-04-13 18:46:43,320: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:43,321: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:43,321: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:43,322: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:43,322: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:43,814: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:43,815: root: INFO: Current backtesting datetime 2023-12-08 16:00:00-05:00 +2024-04-13 18:46:43,816: root: INFO: Current backtesting datetime 2023-12-09 09:30:00-05:00 +2024-04-13 18:46:43,816: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:43,817: root: INFO: Current backtesting datetime 2023-12-09 09:29:00-05:00 +2024-04-13 18:46:43,819: root: INFO: Current backtesting datetime 2023-12-09 09:29:00-05:00 +2024-04-13 18:46:43,819: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:43,820: root: INFO: Current backtesting datetime 2023-12-11 08:30:00-05:00 +2024-04-13 18:46:43,820: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:43,821: root: INFO: Current backtesting datetime 2023-12-11 09:30:00-05:00 +2024-04-13 18:46:43,821: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:43,822: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:43 +2024-04-13 18:46:43,822: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:43,823: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:43,823: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:43,824: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:43,824: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:44,105: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:44,106: root: INFO: Current backtesting datetime 2023-12-11 16:00:00-05:00 +2024-04-13 18:46:44,107: root: INFO: Current backtesting datetime 2023-12-12 09:30:00-05:00 +2024-04-13 18:46:44,107: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:44 +2024-04-13 18:46:44,107: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:44,108: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:44,108: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:44,109: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:44,109: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:44,779: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:44,780: root: INFO: Current backtesting datetime 2023-12-12 16:00:00-05:00 +2024-04-13 18:46:44,781: root: INFO: Current backtesting datetime 2023-12-13 09:30:00-05:00 +2024-04-13 18:46:44,781: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:44 +2024-04-13 18:46:44,781: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:44,782: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:44,782: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:44,783: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:44,783: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:45,063: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:45,064: root: INFO: Current backtesting datetime 2023-12-13 16:00:00-05:00 +2024-04-13 18:46:45,064: root: INFO: Current backtesting datetime 2023-12-14 09:30:00-05:00 +2024-04-13 18:46:45,065: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:45 +2024-04-13 18:46:45,065: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:45,066: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:45,066: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:45,066: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:45,066: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:45,727: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:45,728: root: INFO: Current backtesting datetime 2023-12-14 16:00:00-05:00 +2024-04-13 18:46:45,729: root: INFO: Current backtesting datetime 2023-12-15 09:30:00-05:00 +2024-04-13 18:46:45,729: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:45 +2024-04-13 18:46:45,729: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:45,730: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:45,730: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:45,731: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:45,731: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:46,088: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:46,089: root: INFO: Current backtesting datetime 2023-12-15 16:00:00-05:00 +2024-04-13 18:46:46,089: root: INFO: Current backtesting datetime 2023-12-16 09:30:00-05:00 +2024-04-13 18:46:46,090: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:46,091: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00 +2024-04-13 18:46:46,092: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00 +2024-04-13 18:46:46,092: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:46,093: root: INFO: Current backtesting datetime 2023-12-18 08:30:00-05:00 +2024-04-13 18:46:46,094: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:46,095: root: INFO: Current backtesting datetime 2023-12-18 09:30:00-05:00 +2024-04-13 18:46:46,095: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:46,096: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:46 +2024-04-13 18:46:46,096: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:46,097: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:46,097: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:46,097: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:46,098: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:46,723: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:46,724: root: INFO: Current backtesting datetime 2023-12-18 16:00:00-05:00 +2024-04-13 18:46:46,724: root: INFO: Current backtesting datetime 2023-12-19 09:30:00-05:00 +2024-04-13 18:46:46,725: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:46 +2024-04-13 18:46:46,725: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:46,726: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:46,726: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:46,726: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:46,726: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:46,992: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:46,993: root: INFO: Current backtesting datetime 2023-12-19 16:00:00-05:00 +2024-04-13 18:46:46,993: root: INFO: Current backtesting datetime 2023-12-20 09:30:00-05:00 +2024-04-13 18:46:46,994: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:46 +2024-04-13 18:46:46,994: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:46,994: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:46,995: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:46,995: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:46,995: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:47,723: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:47,724: root: INFO: Current backtesting datetime 2023-12-20 16:00:00-05:00 +2024-04-13 18:46:47,725: root: INFO: Current backtesting datetime 2023-12-21 09:30:00-05:00 +2024-04-13 18:46:47,725: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:47 +2024-04-13 18:46:47,725: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:47,726: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:47,726: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:47,727: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:47,727: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:47,996: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:47,997: root: INFO: Current backtesting datetime 2023-12-21 16:00:00-05:00 +2024-04-13 18:46:47,997: root: INFO: Current backtesting datetime 2023-12-22 09:30:00-05:00 +2024-04-13 18:46:47,998: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:47 +2024-04-13 18:46:47,998: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:47,999: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:47,999: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:48,000: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:48,000: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:48,626: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:48,627: root: INFO: Current backtesting datetime 2023-12-22 16:00:00-05:00 +2024-04-13 18:46:48,627: root: INFO: Current backtesting datetime 2023-12-23 09:30:00-05:00 +2024-04-13 18:46:48,628: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:48,630: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00 +2024-04-13 18:46:48,632: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00 +2024-04-13 18:46:48,632: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:48,633: root: INFO: Current backtesting datetime 2023-12-26 08:30:00-05:00 +2024-04-13 18:46:48,633: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:48,634: root: INFO: Current backtesting datetime 2023-12-26 09:30:00-05:00 +2024-04-13 18:46:48,634: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:48,635: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:48 +2024-04-13 18:46:48,635: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:48,635: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:48,635: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:48,637: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:48,637: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:48,911: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:48,912: root: INFO: Current backtesting datetime 2023-12-26 16:00:00-05:00 +2024-04-13 18:46:48,912: root: INFO: Current backtesting datetime 2023-12-27 09:30:00-05:00 +2024-04-13 18:46:48,913: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:48 +2024-04-13 18:46:48,913: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:48,914: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:48,914: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:48,915: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:48,915: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:49,417: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:49,418: root: INFO: Current backtesting datetime 2023-12-27 16:00:00-05:00 +2024-04-13 18:46:49,419: root: INFO: Current backtesting datetime 2023-12-28 09:30:00-05:00 +2024-04-13 18:46:49,419: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:49 +2024-04-13 18:46:49,419: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:49,420: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:49,420: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:49,421: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:49,421: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:49,914: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:49,915: root: INFO: Current backtesting datetime 2023-12-28 16:00:00-05:00 +2024-04-13 18:46:49,915: root: INFO: Current backtesting datetime 2023-12-29 09:30:00-05:00 +2024-04-13 18:46:49,916: asyncio: INFO: [MLTrader] Executing the on_trading_iteration lifecycle method at 2024-04-13 18:46:49 +2024-04-13 18:46:49,916: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:49,917: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote +2024-04-13 18:46:49,917: asyncio: INFO: [MLTrader] An error occurred during the on_trading_iteration lifecycle method: unsupported operand type(s) for *: 'NoneType' and 'int' +2024-04-13 18:46:49,918: asyncio: INFO: [MLTrader] Traceback (most recent call last): + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\strategies\strategy_executor.py", line 369, in _on_trading_iteration + on_trading_iteration() + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output + frame, result = call_function_get_frame(func_input, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\AppData\Local\Programs\Python\Python311\Lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame + result = func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 60, in on_trading_iteration + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() + ^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 32, in position_sizing + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\owner\Desktop\NewMLTradingBot-main\MLTradingBot-main\tradingbot.py", line 41, in set_take_profit_stop_loss + take_profit = last_price + atr * multiplier + ~~~~^~~~~~~~~~~~ +TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' + +2024-04-13 18:46:49,918: asyncio: INFO: [MLTrader] Executing the on_bot_crash event method +2024-04-13 18:46:50,383: asyncio: INFO: [MLTrader] Sleeping for 86400 seconds +2024-04-13 18:46:50,384: root: INFO: Current backtesting datetime 2023-12-29 16:00:00-05:00 +2024-04-13 18:46:50,384: root: INFO: Current backtesting datetime 2023-12-30 09:30:00-05:00 +2024-04-13 18:46:50,385: asyncio: INFO: [MLTrader] The market is not currently open, skipping this trading iteration +2024-04-13 18:46:50,386: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00 +2024-04-13 18:46:50,387: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00 +2024-04-13 18:46:50,387: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:50,388: root: INFO: Current backtesting datetime 2024-01-02 08:30:00-05:00 +2024-04-13 18:46:50,389: asyncio: INFO: [MLTrader] Executing the before_market_opens lifecycle method +2024-04-13 18:46:50,390: root: INFO: Current backtesting datetime 2024-01-02 09:30:00-05:00 +2024-04-13 18:46:50,390: asyncio: INFO: [MLTrader] Executing the before_starting_trading lifecycle method +2024-04-13 18:46:50,391: root: INFO: Current backtesting datetime 2024-01-02 15:59:00-05:00 +2024-04-13 18:46:50,391: asyncio: INFO: [MLTrader] Executing the before_market_closes lifecycle method +2024-04-13 18:46:50,392: root: INFO: Current backtesting datetime 2024-01-02 16:00:00-05:00 +2024-04-13 18:46:50,392: asyncio: INFO: [MLTrader] Executing the after_market_closes lifecycle method +2024-04-13 18:46:50,392: asyncio: INFO: [MLTrader] Executing the on_strategy_end lifecycle method +2024-04-13 18:46:50,922: root: INFO: Backtesting finished +2024-04-13 18:46:51,052: root: INFO: There were no trades in this backtest. +2024-04-13 18:46:51,603: root: ERROR: Not enough data to create a tearsheet, at least 2 days of data are required. Skipping +2024-04-13 18:46:51,603: backtest_stats: INFO: Backtest took 0:18:43.994404 for a speed of 0.000 diff --git a/logs/MLTrader_2024-04-13_18-28-07_stats.csv b/logs/MLTrader_2024-04-13_18-28-07_stats.csv new file mode 100644 index 0000000..4b08ded --- /dev/null +++ b/logs/MLTrader_2024-04-13_18-28-07_stats.csv @@ -0,0 +1,1221 @@ +datetime,portfolio_value,cash,return +2020-01-02 09:30:00-05:00,100000.0,100000.0, +2020-01-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-08 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-09 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-15 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-16 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-17 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-22 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-23 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-29 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-30 09:30:00-05:00,100000.0,100000.0,0.0 +2020-01-31 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-12 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-13 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-15 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-19 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-20 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-26 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-27 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-02-29 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-03-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-04-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-05-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-06-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-07-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-08-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-04 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-11 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-18 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-25 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-09-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-01 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-02 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-03 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-05 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-06 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-07 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-08 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-09 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-10 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-12 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-13 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-14 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-15 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-16 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-17 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-19 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-20 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-21 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-22 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-23 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-24 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-26 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-27 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-28 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-29 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-30 09:30:00-04:00,100000.0,100000.0,0.0 +2020-10-31 09:30:00-04:00,100000.0,100000.0,0.0 +2020-11-02 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-06 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-09 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-12 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-13 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-16 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-17 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-19 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-20 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-23 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-26 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-27 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-11-30 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-01 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-02 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-03 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-04 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-05 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-07 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-08 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-09 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-10 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-11 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-12 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-14 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-15 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-16 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-17 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-18 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-19 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-21 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-22 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-23 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-24 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-25 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-28 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-29 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-30 09:30:00-05:00,100000.0,100000.0,0.0 +2020-12-31 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-05 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-15 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-19 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-26 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-29 09:30:00-05:00,100000.0,100000.0,0.0 +2021-01-30 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-02 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-05 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-17 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-19 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-26 09:30:00-05:00,100000.0,100000.0,0.0 +2021-02-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-05 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-03-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-04-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-05-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-06-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-07-31 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-08-31 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-10 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-17 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-24 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-09-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-07 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-08 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-09 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-11 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-12 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-13 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-14 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-15 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-16 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-18 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-19 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-20 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-21 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-22 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-23 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-25 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-26 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-27 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-28 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-29 09:30:00-04:00,100000.0,100000.0,0.0 +2021-10-30 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-01 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-02 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-03 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-04 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-05 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-06 09:30:00-04:00,100000.0,100000.0,0.0 +2021-11-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-12 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-15 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-17 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-18 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-19 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-24 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-25 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-26 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-29 09:30:00-05:00,100000.0,100000.0,0.0 +2021-11-30 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-01 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-02 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-03 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-04 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-06 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-07 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-08 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-09 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-10 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-11 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-13 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-14 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-15 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-16 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-17 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-18 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-20 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-21 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-22 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-23 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-24 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-27 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-28 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-29 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-30 09:30:00-05:00,100000.0,100000.0,0.0 +2021-12-31 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-15 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-18 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-19 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-20 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-22 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-24 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-26 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-29 09:30:00-05:00,100000.0,100000.0,0.0 +2022-01-31 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-02 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-09 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-14 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-15 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-16 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-17 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-19 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-23 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-26 09:30:00-05:00,100000.0,100000.0,0.0 +2022-02-28 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-09 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-03-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-04-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-05-31 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-06-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-07-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-08-31 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-09 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-16 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-23 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-09-30 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-06 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-07 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-08 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-10 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-11 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-12 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-13 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-14 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-15 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-17 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-18 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-19 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-20 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-21 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-22 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-24 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-25 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-26 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-27 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-28 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-29 09:30:00-04:00,100000.0,100000.0,0.0 +2022-10-31 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-01 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-02 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-03 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-04 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-05 09:30:00-04:00,100000.0,100000.0,0.0 +2022-11-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-09 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-11 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-14 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-15 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-16 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-17 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-18 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-19 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-21 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-22 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-23 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-24 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-25 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-26 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-28 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-29 09:30:00-05:00,100000.0,100000.0,0.0 +2022-11-30 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-01 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-02 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-03 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-05 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-06 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-07 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-08 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-09 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-10 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-12 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-13 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-14 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-15 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-16 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-17 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-19 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-20 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-21 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-22 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-23 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-24 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-27 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-28 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-29 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-30 09:30:00-05:00,100000.0,100000.0,0.0 +2022-12-31 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-03 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-04 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-05 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-06 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-07 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-09 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-10 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-11 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-12 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-13 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-14 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-17 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-18 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-19 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-20 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-21 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-23 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-24 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-25 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-26 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-27 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-28 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-30 09:30:00-05:00,100000.0,100000.0,0.0 +2023-01-31 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-01 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-02 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-03 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-04 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-06 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-07 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-08 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-09 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-10 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-11 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-13 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-14 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-15 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-16 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-17 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-18 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-21 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-22 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-23 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-24 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-25 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-27 09:30:00-05:00,100000.0,100000.0,0.0 +2023-02-28 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-01 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-02 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-03 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-04 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-06 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-07 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-08 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-09 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-10 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-11 09:30:00-05:00,100000.0,100000.0,0.0 +2023-03-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-03-31 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-04-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-08 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-09 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-05-31 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-08 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-09 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-06-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-08 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-07-31 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-08 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-09 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-08-31 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-08 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-09 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-15 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-22 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-29 09:30:00-04:00,100000.0,100000.0,0.0 +2023-09-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-05 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-06 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-07 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-09 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-10 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-11 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-12 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-13 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-14 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-16 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-17 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-18 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-19 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-20 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-21 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-23 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-24 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-25 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-26 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-27 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-28 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-30 09:30:00-04:00,100000.0,100000.0,0.0 +2023-10-31 09:30:00-04:00,100000.0,100000.0,0.0 +2023-11-01 09:30:00-04:00,100000.0,100000.0,0.0 +2023-11-02 09:30:00-04:00,100000.0,100000.0,0.0 +2023-11-03 09:30:00-04:00,100000.0,100000.0,0.0 +2023-11-04 09:30:00-04:00,100000.0,100000.0,0.0 +2023-11-06 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-07 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-08 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-09 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-10 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-11 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-13 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-14 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-15 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-16 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-17 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-18 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-20 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-21 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-22 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-23 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-24 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-25 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-27 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-28 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-29 09:30:00-05:00,100000.0,100000.0,0.0 +2023-11-30 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-01 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-02 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-04 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-05 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-06 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-07 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-08 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-09 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-11 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-12 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-13 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-14 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-15 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-16 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-18 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-19 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-20 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-21 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-22 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-23 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-26 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-27 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-28 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-29 09:30:00-05:00,100000.0,100000.0,0.0 +2023-12-30 09:30:00-05:00,100000.0,100000.0,0.0 diff --git a/logs/MLTrader_2024-04-13_18-46-50_settings.json b/logs/MLTrader_2024-04-13_18-46-50_settings.json new file mode 100644 index 0000000..2457a8b --- /dev/null +++ b/logs/MLTrader_2024-04-13_18-46-50_settings.json @@ -0,0 +1 @@ +{"name": "MLTrader", "backtesting_start": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+QBAQAAAAAAAA==", {"py/reduce": [{"py/function": "pytz._p"}, {"py/tuple": ["America/New_York", -18000, 0, "EST"]}]}]]}, "backtesting_end": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMHhc7AAAAAA==", {"py/id": 2}]]}, "budget": 100000, "risk_free_rate": {"py/reduce": [{"py/function": "numpy.core.multiarray.scalar"}, {"py/tuple": [{"py/reduce": [{"py/type": "numpy.dtype"}, {"py/tuple": ["f8", false, true]}, {"py/tuple": [3, "<", null, null, null, -1, -1, 0]}]}, {"py/b64": "9ihcj57Nqj8="}]}]}, "minutes_before_closing": 1, "minutes_before_opening": 60, "sleeptime": "24H", "auto_adjust": false, "quote_asset": {"py/object": "lumibot.entities.asset.Asset", "symbol": "USD", "asset_type": "forex", "strike": 0.0, "multiplier": 1, "precision": null, "expiration": null}, "benchmark_asset": "SPY", "starting_positions": null, "parameters": {"pandas_data": null, "symbol": "ASML", "cash_at_risk": 0.5}} \ No newline at end of file diff --git a/test_tradingbot.py b/test_tradingbot.py new file mode 100644 index 0000000..e66c6c9 --- /dev/null +++ b/test_tradingbot.py @@ -0,0 +1,64 @@ +import unittest +from unittest.mock import MagicMock + +class TestMLTrader(unittest.TestCase): + + def setUp(self): + self.trader = MLTrader() + + def test_position_sizing(self): + self.trader.get_cash = MagicMock(return_value=10000) + self.trader.get_last_price = MagicMock(return_value=200) + self.trader.calculate_atr = MagicMock(return_value=10) + + cash, last_price, quantity, take_profit, stop_loss = self.trader.position_sizing() + + self.assertEqual(cash, 10000) + self.assertEqual(last_price, 200) + self.assertEqual(quantity, 25) + self.assertEqual(take_profit, 220) + self.assertEqual(stop_loss, 180) + + def test_get_dates(self): + self.trader.get_datetime = MagicMock(return_value=pd.Timestamp('2022-01-01')) + today, three_days_prior = self.trader.get_dates() + + self.assertEqual(today, '2022-01-01') + self.assertEqual(three_days_prior, '2021-12-29') + + def test_get_sentiment(self): + self.trader.get_dates = MagicMock(return_value=('2022-01-01', '2021-12-29')) + self.trader.api.get_news = MagicMock(return_value=['News 1', 'News 2']) + estimate_sentiment = MagicMock(return_value=(0.8, 'positive')) + + with patch('__main__.estimate_sentiment', estimate_sentiment): + probability, sentiment = self.trader.get_sentiment() + + self.assertEqual(probability, 0.8) + self.assertEqual(sentiment, 'positive') + + def test_on_trading_iteration(self): + self.trader.get_cash = MagicMock(return_value=10000) + self.trader.get_last_price = MagicMock(return_value=200) + self.trader.position_sizing = MagicMock(return_value=(10000, 200, 25, 220, 180)) + self.trader.get_sentiment = MagicMock(return_value=(0.8, 'positive')) + self.trader.last_trade = "sell" + self.trader.sell_all = MagicMock() + self.trader.create_order = MagicMock() + self.trader.submit_order = MagicMock() + + self.trader.on_trading_iteration() + + self.trader.sell_all.assert_called_once() + self.trader.create_order.assert_called_once_with( + self.trader.symbol, + 25, + "buy", + type="bracket", + take_profit_price=220, + stop_loss_price=180 + ) + self.trader.submit_order.assert_called_once() + +if __name__ == '__main__': + unittest.main() \ No newline at end of file diff --git a/tradingbot.py b/tradingbot.py index 15573a9..6b7e80c 100644 --- a/tradingbot.py +++ b/tradingbot.py @@ -8,8 +8,8 @@ from finbert_utils import estimate_sentiment API_KEY = "YOUR API KEY" -API_SECRET = "YOUR API SECRET" -BASE_URL = "https://paper-api.alpaca.markets" +API_SECRET = "YOUR SECRET KEY" +BASE_URL = "https://paper-api.alpaca.markets/v2" ALPACA_CREDS = { "API_KEY":API_KEY, @@ -18,18 +18,29 @@ } class MLTrader(Strategy): - def initialize(self, symbol:str="SPY", cash_at_risk:float=.5): + def initialize(self, symbol:str="ASML", cash_at_risk:float=.5): self.symbol = symbol self.sleeptime = "24H" self.last_trade = None self.cash_at_risk = cash_at_risk self.api = REST(base_url=BASE_URL, key_id=API_KEY, secret_key=API_SECRET) - def position_sizing(self): - cash = self.get_cash() + def position_sizing(self): + cash = self.get_cash() last_price = self.get_last_price(self.symbol) - quantity = round(cash * self.cash_at_risk / last_price,0) - return cash, last_price, quantity + atr = self.calculate_atr(self.symbol) + take_profit, stop_loss = self.set_take_profit_stop_loss(last_price, atr) + quantity = round(cash * self.cash_at_risk / last_price, 0) + return cash, last_price, quantity, take_profit, stop_loss + + def calculate_atr(self, symbol, period=14): + # Fetch historical data for ATR calculation, implement accordingly + pass + + def set_take_profit_stop_loss(self, last_price, atr, multiplier=2): + take_profit = last_price + atr * multiplier + stop_loss = last_price - atr * multiplier + return take_profit, stop_loss def get_dates(self): today = self.get_datetime() @@ -41,53 +52,54 @@ def get_sentiment(self): news = self.api.get_news(symbol=self.symbol, start=three_days_prior, end=today) - news = [ev.__dict__["_raw"]["headline"] for ev in news] + news = [ai.__dict__["_raw"]["headline"] for ai in news] probability, sentiment = estimate_sentiment(news) return probability, sentiment def on_trading_iteration(self): - cash, last_price, quantity = self.position_sizing() + cash, last_price, quantity, take_profit, stop_loss = self.position_sizing() probability, sentiment = self.get_sentiment() - if cash > last_price: - if sentiment == "positive" and probability > .999: - if self.last_trade == "sell": - self.sell_all() + + if cash > last_price: + if sentiment == "positive" and probability > .999: + if self.last_trade == "sell": + self.sell_all() order = self.create_order( - self.symbol, - quantity, - "buy", - type="bracket", - take_profit_price=last_price*1.20, - stop_loss_price=last_price*.95 + self.symbol, + quantity, + "buy", + type="bracket", + take_profit_price=take_profit, + stop_loss_price=stop_loss ) - self.submit_order(order) + self.submit_order(order) self.last_trade = "buy" - elif sentiment == "negative" and probability > .999: - if self.last_trade == "buy": - self.sell_all() + elif sentiment == "negative" and probability > .999: + if self.last_trade == "buy": + self.sell_all() order = self.create_order( - self.symbol, - quantity, - "sell", - type="bracket", - take_profit_price=last_price*.8, - stop_loss_price=last_price*1.05 + self.symbol, + quantity, + "sell", + type="bracket", + take_profit_price=take_profit, + stop_loss_price=stop_loss ) - self.submit_order(order) + self.submit_order(order) self.last_trade = "sell" start_date = datetime(2020,1,1) end_date = datetime(2023,12,31) broker = Alpaca(ALPACA_CREDS) strategy = MLTrader(name='mlstrat', broker=broker, - parameters={"symbol":"SPY", + parameters={"symbol":"ASML", "cash_at_risk":.5}) strategy.backtest( YahooDataBacktesting, start_date, end_date, - parameters={"symbol":"SPY", "cash_at_risk":.5} + parameters={"symbol":"ASML", "cash_at_risk":.5} ) # trader = Trader() # trader.add_strategy(strategy)