Feat/strategy v2 refactor

Before submitting this PR, please make sure:

[ ] Your code builds clean without any errors or warnings
[ ] You are using approved title ("feat/", "fix/", "docs/", "refactor/")

A description of the changes proposed in the pull request:
In this PR we can find new objects to simplify the execution of strategies:

Market Data Provider: a single interface to get order book, candles and trades from the connectors.
Executor Orchestrator: a utility class for the strategy to create and orchestrate executors. (replaces the specific executor handler)
Base Controller class: this will replace the generic controllers
Market making | directional trading controller class: this new class manages the logic that before was divided between executor handler and controller and can create strategies in a very simple way.

Two scripts are provided to test this new way of using the framework:

v2_pmm_single_level.py: a simple implementation of a PMM with Position Executors
v2_generic_with_controllers.py: an implementation of a strategy that runs multiple controllers.

To use them you need to create a config. Now you can create a config for the script and the controllers. The second script receives a list of controller configs files to use.
Tests performed by the developer:
Tips for QA testing:

Ran initial tests on test_position_executor.py

Ran tests on cloud
Overview on the script 👀
When starting with default script getting OSError: Error executing request POST https://fapi.binance.com/fapi/v1/order. HTTP status is 400. Error: {"code":-4061,"msg":"Order's position side does not match user's setting."}2024-02-20 10:04:01,335 - 2349407 - hummingbot.client.hummingbot_application - INFO - start command initiated.
2024-02-20 10:04:01,515 - 2349407 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2024-02-20 10:04:01,636 - 2349407 - hummingbot.core.data_type.order_book_tracker - INFO - Initialized order book for LOOM-USDT. 1/1 completed.
2024-02-20 10:04:01,717 - 2349407 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_user_stream_data_source.BinancePerpetualUserStreamDataSource - INFO - Successfully obtained listen key i91FelZCsWLWsueapUwHgNuTuJnUprxRTgySWgduJFaIQPUrkHo0044EcxaO4tf4
2024-02-20 10:04:01,764 - 2349407 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_api_order_book_data_source.BinancePerpetualAPIOrderBookDataSource - INFO - Subscribed to public order book, trade and funding info channels...
2024-02-20 10:04:02,001 - 2349407 - hummingbot.strategy.script_strategy_base - WARNING - binance_perpetual is not ready. Please wait...
2024-02-20 10:04:04,007 - 2349407 - hummingbot.strategy.script_strategy_base - INFO - Creating LOOM-USDT buy order: price: 0.1017188500 amount:<PHONE_NUMBER>144586770298720444.
2024-02-20 10:04:04,007 - 2349407 - hummingbot.strategy.script_strategy_base - INFO - Creating LOOM-USDT sell order: price: 0.1027411500 amount:<PHONE_NUMBER>680461528803210787.
2024-02-20 10:04:04,016 - 2349407 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - INFO - Leverage for LOOM-USDT successfully set to 20.
2024-02-20 10:04:04,129 - 2349407 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - NETWORK - Error submitting buy LIMIT order to Binance_perpetual for 147 LOOM-USDT 0.1017100.
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 452, in _create_order
    await self._place_order_and_process_update(order=order, **kwargs,)
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 469, in _place_order_and_process_update
    exchange_order_id, update_timestamp = await self._place_order(
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/derivative/binance_perpetual/binance_perpetual_derivative.py", line 264, in _place_order
    order_result = await self._api_post(
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 867, in _api_post
    return await self._api_request(*args, **kwargs)
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 905, in _api_request
    request_result = await rest_assistant.execute_request(
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
    response = await self.execute_request_and_get_response(
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/web_assistant/rest_assistant.py", line 99, in execute_request_and_get_response
    raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. "
OSError: Error executing request POST https://fapi.binance.com/fapi/v1/order. HTTP status is 400. Error: {"code":-4061,"msg":"Order's position side does not match user's setting."}
2024-02-20 10:04:04,130 - 2349407 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - WARNING - Failed to submit BUY order to Binance_perpetual. Check API key and network connection.
2024-02-20 10:04:04,131 - 2349407 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - NETWORK - Error submitting sell LIMIT order to Binance_perpetual for 145 LOOM-USDT 0.1027400.
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 452, in _create_order
    await self._place_order_and_process_update(order=order, **kwargs,)
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 469, in _place_order_and_process_update
    exchange_order_id, update_timestamp = await self._place_order(
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/derivative/binance_perpetual/binance_perpetual_derivative.py", line 264, in _place_order
    order_result = await self._api_post(
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 867, in _api_post
    return await self._api_request(*args, **kwargs)
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 905, in _api_request
    request_result = await rest_assistant.execute_request(
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
    response = await self.execute_request_and_get_response(
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/web_assistant/rest_assistant.py", line 99, in execute_request_and_get_response
    raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. "
OSError: Error executing request POST https://fapi.binance.com/fapi/v1/order. HTTP status is 400. Error: {"code":-4061,"msg":"Order's position side does not match user's setting."}
2024-02-20 10:04:04,131 - 2349407 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - WARNING - Failed to submit SELL order to Binance_perpetual. Check API key and network connection.
2024-02-20 10:04:04,134 - 2349407 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - Open order failed. Retrying 1/5
2024-02-20 10:04:04,138 - 2349407 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-3QreWesyBLMUT611cd548189d70f17", "order_type": "OrderType.LIMIT", "event_name": "MarketOrderFailureEvent", "event_source": "binance_perpetual"}
2024-02-20 10:04:04,138 - 2349407 - hummingbot.connector.client_order_tracker - INFO - Order x-3QreWesyBLMUT611cd548189d70f17 has failed. Order Update: OrderUpdate(trading_pair='LOOM-USDT', update_timestamp=1708423444.0, new_state=<OrderState.FAILED: 6>, client_order_id='x-3QreWesyBLMUT611cd548189d70f17', exchange_order_id=None, misc_updates=None)
2024-02-20 10:04:04,139 - 2349407 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - Open order failed. Retrying 2/5
2024-02-20 10:04:04,141 - 2349407 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-3QreWesySLMUT611cd54818ccc0f17", "order_type": "OrderType.LIMIT", "event_name": "MarketOrderFailureEvent", "event_source": "binance_perpetual"}
2024-02-20 10:04:04,141 - 2349407 - hummingbot.connector.client_order_tracker - INFO - Order x-3QreWesySLMUT611cd54818ccc0f17 has failed. Order Update: OrderUpdate(trading_pair='LOOM-USDT', update_timestamp=1708423444.0, new_state=<OrderState.FAILED: 6>, client_order_id='x-3QreWesySLMUT611cd54818ccc0f17', exchange_order_id=None, misc_updates=None)
2024-02-20 10:04:04,339 - 2349407 - hummingbot.core.rate_oracle.rate_oracle - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...

Started with both script and exchange position mode set to Hedge ✅
This behavior causes issue resulting to the OsError..Orders position side does not match user’s setting
This also resulted to trigger retries resulting orders with no exchange_order_ids
When stop command initiated, getting failed to cancel orders on exchange:

These orders does not have exchange_order_ids resulting to ...orders not found

open_order_type set to Market, creates market orders to open position, recommended to start with limit orders

When stopped command, getting AttributeError2024-02-20 10:02:19,824 - 2348614 - hummingbot.client.hummingbot_application - INFO - stop command initiated.
2024-02-20 10:02:19,825 - 2348614 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: 'NoneType' object has no attribute 'executed_amount_base'
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/ralph/github/hummingbot/6844/hummingbot/client/command/stop_command.py", line 36, in stop_loop
    self.strategy.on_stop()
  File "/home/ralph/github/hummingbot/6844/scripts/test_pe_1.py", line 37, in on_stop
    position_executor.early_stop()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 470, in early_stop
    self.place_close_order_and_cancel_open_orders(close_type=CloseType.EARLY_STOP)
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 347, in place_close_order_and_cancel_open_orders
    amount=self.open_filled_amount - self._take_profit_limit_order.executed_amount_base,
AttributeError: 'NoneType' object has no attribute 'executed_amount_base'

Observe behavior for spreads

When testing, found opportunity to open short position
Observed that its getting profit therefore it displayed the spread we set for take_profit
stop_loss not yet tested
However we are stuck on this error:

Getting AttrbuteError even when stop command is initiated. Client must be exit in order to stop2024-02-20 10:30:59,522 - 2354185 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'executed_amount_base'
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 226, in control_task
    self.control_barriers()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 329, in control_barriers
    self.control_time_limit()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 408, in control_time_limit
    self.place_close_order_and_cancel_open_orders(close_type=CloseType.TIME_LIMIT)
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 347, in place_close_order_and_cancel_open_orders
    amount=self.open_filled_amount - self._take_profit_limit_order.executed_amount_base,
AttributeError: 'NoneType' object has no attribute 'executed_amount_base'

Steps to reproduce:

Used this script
Observe behavior

logs_test_pe_1.log

PR update:

Overview of the PR and ran tests using spot markets
Ran initial tests using v2_pmm_single_level.py

Run stop command, got failed to cancel..order not found2024-02-27 11:22:02,835 - 51145 - hummingbot.client.hummingbot_application - INFO - stop command initiated.
2024-02-27 11:22:02,886 - 51145 - hummingbot.strategy.script_strategy_base - INFO - (SOL-USDT) Canceling the limit order x-XEKWYICXBSLUT6125b3bfcb5dbdcd4. [clock=2024-02-27 11:22:02+00:00]
2024-02-27 11:22:03,112 - 51145 - hummingbot.connector.exchange.binance.binance_exchange.BinanceExchange - WARNING - Failed to cancel order x-XEKWYICXBSLUT6125b3bfcb5dbdcd4 (order not found)
2024-02-27 11:22:03,124 - 51145 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-XEKWYICXBSLUT6125b3bfcb5dbdcd4", "exchange_order_id": "5146385782", "event_name": "OrderCancelledEvent", "event_source": "binance"}
2024-02-27 11:22:03,124 - 51145 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order x-XEKWYICXBSLUT6125b3bfcb5dbdcd4.
2024-02-27 11:22:03,132 - 51145 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-XEKWYICXSSLUT6125b3bfcc52adcd4", "exchange_order_id": "5146385783", "event_name": "OrderCancelledEvent", "event_source": "binance"}
2024-02-27 11:22:03,132 - 51145 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order x-XEKWYICXSSLUT6125b3bfcc52adcd4.

This causes delay with the script when trying to start again
There are no stuck orders on exchange
There also instances of stuck on starting networking.. and have to relaunch client to use the script again

Observe behavior and found filled order still got cancellation event:

2024-02-27 11:41:27,494 - 66586 - hummingbot.client.hummingbot_application - INFO - start command initiated.
2024-02-27 11:41:27,884 - 66586 - hummingbot.connector.exchange.binance.binance_exchange.BinanceExchange - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2024-02-27 11:41:28,163 - 66586 - hummingbot.strategy.script_strategy_base - WARNING - binance is not ready. Please wait...
2024-02-27 11:41:28,247 - 66586 - hummingbot.core.data_type.order_book_tracker - INFO - Initialized order book for SOL-USDT. 1/1 completed.
2024-02-27 11:41:28,247 - 66586 - hummingbot.connector.exchange.binance.binance_api_user_stream_data_source.BinanceAPIUserStreamDataSource - INFO - Successfully obtained listen key 17PFnxCmsFuwQxVdyxzFZMnkiMVOdSEJJGc0TmrzigL7OVYWPSkxRZw8C86x
2024-02-27 11:41:28,643 - 66586 - hummingbot.connector.exchange.binance.binance_api_order_book_data_source.BinanceAPIOrderBookDataSource - INFO - Subscribed to public order book and trade channels...
2024-02-27 11:41:29,033 - 66586 - hummingbot.strategy.script_strategy_base - WARNING - binance is not ready. Please wait...
2024-02-27 11:41:30,710 - 66586 - hummingbot.core.rate_oracle.rate_oracle - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2024-02-27 11:41:31,003 - 66586 - hummingbot.strategy.script_strategy_base - INFO - Creating SOL-USDT buy order: price:<PHONE_NUMBER>00000 amount: 0.1352061396747476597112947806.
2024-02-27 11:41:31,004 - 66586 - hummingbot.strategy.script_strategy_base - INFO - Creating SOL-USDT sell order: price:<PHONE_NUMBER>00000 amount: 0.1351250403207490107101683417.
2024-02-27 11:41:31,097 - 66586 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT SELL order x-XEKWYICXSSLUT6125b81e7422bfafa for 0.13000000 SOL-USDT.
2024-02-27 11:41:31,121 - 66586 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.LIMIT", "trading_pair": "SOL-USDT", "amount": "0.13000000", "price": "111.00000000", "order_id": "x-XEKWYICXSSLUT6125b81e7422bfafa", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "5146448090", "leverage": 1, "position": "NIL", "event_name": "SellOrderCreatedEvent", "event_source": "binance"}
2024-02-27 11:41:31,122 - 66586 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT BUY order x-XEKWYICXBSLUT6125b81e73f23fafa for 0.13000000 SOL-USDT.
2024-02-27 11:41:31,140 - 66586 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.LIMIT", "trading_pair": "SOL-USDT", "amount": "0.13000000", "price": "110.94000000", "order_id": "x-XEKWYICXBSLUT6125b81e73f23fafa", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "5146448091", "leverage": 1, "position": "NIL", "event_name": "BuyOrderCreatedEvent", "event_source": "binance"}

# Filled buy order
2024-02-27 11:41:39,727 - 66586 - hummingbot.connector.client_order_tracker - INFO - The BUY order x-XEKWYICXBSLUT6125b81e73f23fafa amounting to 0.13000000/0.13000000 SOL has been filled.
2024-02-27 11:41:39,786 - 66586 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-XEKWYICXBSLUT6125b81e73f23fafa", "trading_pair": "SOL-USDT", "trade_type": "TradeType.BUY", "order_type": "OrderType.LIMIT", "price": "110.94000000", "amount": "0.13000000", "trade_fee": {"percent": "0", "percent_token": "BNB", "flat_fees": [{"token": "BNB", "amount": "0.00002712"}]}, "exchange_trade_id": "467714060", "exchange_order_id": "5146448091", "leverage": 1, "position": "NIL", "event_name": "OrderFilledEvent", "event_source": "binance"}
2024-02-27 11:41:39,796 - 66586 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-XEKWYICXBSLUT6125b81e73f23fafa", "base_asset": "SOL", "quote_asset": "USDT", "base_asset_amount": "0.13000000", "quote_asset_amount": "14.4222000000000000", "order_type": "OrderType.LIMIT", "exchange_order_id": "5146448091", "event_name": "BuyOrderCompletedEvent", "event_source": "binance"}
2024-02-27 11:41:39,796 - 66586 - hummingbot.connector.client_order_tracker - INFO - BUY order x-XEKWYICXBSLUT6125b81e73f23fafa completely filled.

# Executor refresh time 120s, refresh limit order
2024-02-27 11:43:32,049 - 66586 - hummingbot.strategy.script_strategy_base - INFO - (SOL-USDT) Canceling the limit order x-XEKWYICXSSLUT6125b81e7422bfafa. [clock=2024-02-27 11:43:32+00:00]
2024-02-27 11:43:32,543 - 66586 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-XEKWYICXSSLUT6125b81e7422bfafa", "exchange_order_id": "5146448090", "event_name": "OrderCancelledEvent", "event_source": "binance"}
2024-02-27 11:43:32,543 - 66586 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order x-XEKWYICXSSLUT6125b81e7422bfafa.
2024-02-27 11:43:33,006 - 66586 - hummingbot.strategy.script_strategy_base - INFO - Creating SOL-USDT sell order: price:<PHONE_NUMBER>00000 amount: 0.1352835161675774411435872770.
2024-02-27 11:43:33,145 - 66586 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT SELL order x-XEKWYICXSSLUT6125b892cdd48fafa for 0.13000000 SOL-USDT.

# Timelimit reached 180s, market sell order created
2024-02-27 11:43:33,199 - 66586 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.LIMIT", "trading_pair": "SOL-USDT", "amount": "0.13000000", "price": "110.87000000", "order_id": "x-XEKWYICXSSLUT6125b892cdd48fafa", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "5146456343", "leverage": 1, "position": "NIL", "event_name": "SellOrderCreatedEvent", "event_source": "binance"}
2024-02-27 11:44:32,213 - 66586 - hummingbot.strategy.script_strategy_base - INFO - Creating SOL-USDT sell order: price: NaN amount: 0.13000000.
2024-02-27 11:44:32,214 - 66586 - hummingbot.strategy.script_strategy_base - INFO - (SOL-USDT) Canceling the limit order x-XEKWYICXBSLUT6125b81e73f23fafa. [clock=2024-02-27 11:44:32+00:00]
2024-02-27 11:44:32,450 - 66586 - hummingbot.connector.client_order_tracker - INFO - The SELL order x-XEKWYICXSSLUT6125b8cb44d1bfafa amounting to 0.13000000/0.13000000 SOL has been filled.
2024-02-27 11:44:32,492 - 66586 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-XEKWYICXSSLUT6125b8cb44d1bfafa", "trading_pair": "SOL-USDT", "trade_type": "TradeType.SELL", "order_type": "OrderType.MARKET", "price": "110.68000000", "amount": "0.13000000", "trade_fee": {"percent": "0", "percent_token": "BNB", "flat_fees": [{"token": "BNB", "amount": "0.00002706"}]}, "exchange_trade_id": "467716527", "exchange_order_id": "5146462850", "leverage": 1, "position": "NIL", "event_name": "OrderFilledEvent", "event_source": "binance"}
2024-02-27 11:44:32,493 - 66586 - hummingbot.connector.client_order_tracker - INFO - Created MARKET SELL order x-XEKWYICXSSLUT6125b8cb44d1bfafa for 0.13000000 SOL-USDT.
2024-02-27 11:44:32,502 - 66586 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.MARKET", "trading_pair": "SOL-USDT", "amount": "0.13000000", "price": "NaN", "order_id": "x-XEKWYICXSSLUT6125b8cb44d1bfafa", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "5146462850", "leverage": 1, "position": "NIL", "event_name": "SellOrderCreatedEvent", "event_source": "binance"}
2024-02-27 11:44:32,684 - 66586 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-XEKWYICXSSLUT6125b8cb44d1bfafa", "base_asset": "SOL", "quote_asset": "USDT", "base_asset_amount": "0.13000000", "quote_asset_amount": "14.3884000000000000", "order_type": "OrderType.MARKET", "exchange_order_id": "5146462850", "event_name": "SellOrderCompletedEvent", "event_source": "binance"}
2024-02-27 11:44:32,685 - 66586 - hummingbot.connector.client_order_tracker - INFO - SELL order x-XEKWYICXSSLUT6125b8cb44d1bfafa completely filled.

When reviewing log file we found this behavior where order XEKWYICXBSLUT6125b81e73f23fafa has been successfully filled but after reaching set timelimit got a cancelling event
Confirmed this order has been filled on exchange as well

Steps to reproduce:

create --script-config v2_pmm_single_level
start --script v2_pmm_single_level --conf your.yml# your.yml
markets:
  binance:
  - SOL-USDT
candles_config: []
controllers_config: []
config_update_interval: 60
script_file_name: r_v2_pmm_single-level.py
order_amount_quote: 15
executor_refresh_time: 120
closed_executors_buffer: 10
spread: 0.0030t
leverage: 20
position_mode: HEDGE
stop_loss: 0.3
take_profit: 0.1
time_limit: 180
take_profit_order_type: 1

logs_conf_rv2pmm1.log

@rapcmia @nikspz @david-hummingbot I also removed an old docker folder. make sure that the build and deploy is working properly too.

commit d9e94b7e58add138ceb49b0ac442c1ecd8865465
Test:

created conf_v2_pmm_single_level_1 using default config
started v2_pmm_single_level.py using conf_v2_pmm_single_level_1.yml file
review after longrun:

0.3% spread ( between sell and buy confirmed = 0.6 spread)
1% take profit spread confirmed
3% stop loss spread not confirmed (?) (closed at 2.89%)

Note: Bot not showing positions there, and PNL not showing as well
after bot stopped, bot closed positions and PNL turned from +20 cents to -3 cents

PR update:

Still getting same failed to cancel order when stop command is executed

Same result after stop command, getting failed to cancel order..order not found
There instance that when you run stop command it goes with an error of Unhandled error in background task: (builtins.TypeError) Object of type PositionExecutorConfig is not JSON serializable2024-02-29 06:34:14,096 - 189145 - hummingbot.client.hummingbot_application - INFO - stop command initiated.
2024-02-29 06:34:14,101 - 189145 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: (builtins.TypeError) Object of type PositionExecutorConfig is not JSON serializable
[SQL: UPDATE "Executors" SET close_type=?, close_timestamp=?, config=? WHERE "Executors".id = ?]
[parameters: [{'config': PositionExecutorConfig(id='7iUoAL7wRJF3Tjh6Wt1zicxjoFBVTMvYQ1hbK5XZdQUp', type='position_executor', timestamp=1709188414.0, controller_id= ... (507 characters truncated) ... one, level_id=None), 'close_type': <CloseType.EARLY_STOP: 5>, 'close_timestamp': nan, 'Executors_id': '7iUoAL7wRJF3Tjh6Wt1zicxjoFBVTMvYQ1hbK5XZdQUp'}]]
Traceback (most recent call last):
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1810, in _execute_context
    context = constructor(
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1077, in _init_compiled
    param = [
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1078, in <listcomp>
    processors[key](compiled_params[key])
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/sql/sqltypes.py", line 2669, in process
    serialized = json_serializer(value)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type PositionExecutorConfig is not JSON serializable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/ralph/github/hummingbot/6844/hummingbot/client/command/stop_command.py", line 36, in stop_loop
    self.strategy.on_stop()
  File "/home/ralph/github/hummingbot/6844/hummingbot/strategy/strategy_v2_base.py", line 265, in on_stop
    self.executor_orchestrator.stop()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/executor_orchestrator.py", line 52, in stop
    MarketsRecorder.get_instance().store_or_update_executor(executor)
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/markets_recorder.py", line 206, in store_or_update_executor
    session.commit()
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1454, in commit
    self._transaction.commit(_to_root=self.future)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 832, in commit
    self._prepare_impl()
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 811, in _prepare_impl
    self.session.flush()
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 3449, in flush
    self._flush(objects)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 3588, in _flush
    with util.safe_reraise():
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 3549, in _flush
    flush_context.execute()
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/orm/unitofwork.py", line 456, in execute
    rec.execute(self)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/orm/unitofwork.py", line 630, in execute
    util.preloaded.orm_persistence.save_obj(
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/orm/persistence.py", line 237, in save_obj
    _emit_update_statements(
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/orm/persistence.py", line 1001, in _emit_update_statements
    c = connection._execute_20(
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1710, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
    return connection._execute_clauseelement(
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1577, in _execute_clauseelement
    ret = self._execute_context(
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1816, in _execute_context
    self._handle_dbapi_exception(
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2134, in _handle_dbapi_exception
    util.raise_(
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1810, in _execute_context
    context = constructor(
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1077, in _init_compiled
    param = [
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1078, in <listcomp>
    processors[key](compiled_params[key])
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/sqlalchemy/sql/sqltypes.py", line 2669, in process
    serialized = json_serializer(value)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
sqlalchemy.exc.StatementError: (builtins.TypeError) Object of type PositionExecutorConfig is not JSON serializable
[SQL: UPDATE "Executors" SET close_type=?, close_timestamp=?, config=? WHERE "Executors".id = ?]

Ran tests on v2_generic_with_controllers.py

Created a simple dmanv3 controller and saved to conf/controller

Start script but getting AttrbuteError

2024-02-29 21:56:38,001 - 35456 - hummingbot.core.clock - ERROR - Unexpected error running clock tick.
Traceback (most recent call last):
  File "hummingbot/core/clock.pyx", line 119, in hummingbot.core.clock.Clock.run_til
    child_iterator.c_tick(self._current_tick)
  File "hummingbot/strategy/strategy_py_base.pyx", line 44, in hummingbot.strategy.strategy_py_base.StrategyPyBase.c_tick
    self.tick(timestamp)
  File "/Users/rapcomia/github/hummingbot/6844/hummingbot/strategy/script_strategy_base.py", line 75, in tick
    self.on_tick()
  File "/Users/rapcomia/github/hummingbot/6844/scripts/v2_generic_with_controllers.py", line 41, in on_tick
    self.set_position_mode_and_leverage()
  File "/Users/rapcomia/github/hummingbot/6844/scripts/v2_generic_with_controllers.py", line 58, in set_position_mode_and_leverage
    self.connectors[config_dict["connector_name"]].set_position_mode(config_dict["position_mode"])
AttributeError: 'BinanceExchange' object has no attribute 'set_position_mode'

Can we confirm if the script must be tested only on perps and not with spot?
Tried to comment out set_position_mode_and_leverage on the script and observe behavior wip

logs_conf_generic_with_controllers2.log

v2_pmm_single_level.py

Kucoin_perpetual on single pair: reviewed bot place orders to OPEN on exchange
binance_perpetual and kucoin_perpetual

config (binance_perpetual: - RLC-USDT, kucoin_perpetual: - JASMY-USDT, take_profit_order_type: 2 (LIMIT))
start --script v2_pmm_single_level.py --conf conf_v2_pmm_single_level_1.yml ok
review orders to OPEN placed on both kucoin and binance
longrun on this setup

4 orders to OPEN filled ✅
Created LIMIT SELL order x-3QreWesySRCUT61294855d8b2bf3d9 for 3.7 to CLOSE a RLC-USDT position.
LIMIT SELL order x-3QreWesySRCUT61294855d8b2bf3d9 for 3.7 to CLOSE a RLC-USDT position. has been filled. ✅
Creating RLC-USDT buy order: price: NaN amount: 3.7. ✅
Created MARKET BUY order x-3QreWesyBRCUT612952803ccfaf3d9 for 3.7 to CLOSE a RLC-USDT position. ✅
Creating Kucoin_perpetual JASMY-USDT buy order: price: NaN amount: 730.0.
KucoinPerpetualDerivative - NETWORK - Error submitting buy MARKET order to Kucoin_perpetual for 730.0 JASMY-USDT NaN. - IOError(f"Error submitting order {order_id}: {formatted_ret_code} - {resp['msg']}")
OSError: Error submitting order HummingbotBJYUT6129544e93bd4f3d9daa64feb: ret_code <300009> - No open positions to close. ❌
Close order failed ❌
Bot stuck on ERROR - 'NoneType' object has no attribute 'order', not able to recover ❌

6844-v2refactor.zip
2024-03-01 08:36:12,138 - 246260 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT BUY order x-3QreWesyBRCUT6129544afec0af3d9 for 3.7 to OPEN a RLC-USDT position.
2024-03-01 08:36:12,199 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.LIMIT", "trading_pair": "RLC-USDT", "amount": "3.7", "price": "4.0320", "order_id": "x-3QreWesyBRCUT6129544afec0af3d9", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "6089664741", "leverage": 20, "position": "OPEN", "event_name": "BuyOrderCreatedEvent", "event_source": "binance_perpetual"}
2024-03-01 08:36:15,826 - 246260 - hummingbot.strategy.script_strategy_base - INFO - Creating JASMY-USDT buy order: price: NaN amount: 730.0.
2024-03-01 08:36:15,827 - 246260 - hummingbot.strategy.script_strategy_base - INFO - (JASMY-USDT) Canceling the limit order HummingbotSJYUT61294a3ee5b31f3d9daa64feb. [clock=2024-03-01 08:36:15+00:00]
2024-03-01 08:36:15,827 - 246260 - hummingbot.strategy.script_strategy_base - INFO - (JASMY-USDT) Canceling the limit order HummingbotBJYUT61294a4f261fbf3d9daa64feb. [clock=2024-03-01 08:36:15+00:00]
2024-03-01 08:36:15,923 - 246260 - hummingbot.connector.derivative.kucoin_perpetual.kucoin_perpetual_derivative.KucoinPerpetualDerivative - NETWORK - Error submitting buy MARKET order to Kucoin_perpetual for 730.0 JASMY-USDT NaN.
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/connector/exchange_py_base.py", line 452, in _create_order
    await self._place_order_and_process_update(order=order, **kwargs,)
  File "/home/nikita/v2ref6844/hummingbot/connector/exchange_py_base.py", line 469, in _place_order_and_process_update
    exchange_order_id, update_timestamp = await self._place_order(
  File "/home/nikita/v2ref6844/hummingbot/connector/derivative/kucoin_perpetual/kucoin_perpetual_derivative.py", line 225, in _place_order
    raise IOError(f"Error submitting order {order_id}: {formatted_ret_code} - {resp['msg']}")
OSError: Error submitting order HummingbotBJYUT6129544e93bd4f3d9daa64feb: ret_code <300009> - No open positions to close.
2024-03-01 08:36:15,970 - 246260 - hummingbot.connector.derivative.kucoin_perpetual.kucoin_perpetual_derivative.KucoinPerpetualDerivative - WARNING - Failed to submit BUY order to Kucoin_perpetual. Check API key and network connection.
2024-03-01 08:36:15,971 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - Close order failed. Retrying 1/10
2024-03-01 08:36:15,974 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "HummingbotBJYUT6129544e93bd4f3d9daa64feb", "order_type": "OrderType.MARKET", "event_name": "MarketOrderFailureEvent", "event_source": "kucoin_perpetual"}
2024-03-01 08:36:15,975 - 246260 - hummingbot.connector.client_order_tracker - INFO - Order HummingbotBJYUT6129544e93bd4f3d9daa64feb has failed. Order Update: OrderUpdate(trading_pair='JASMY-USDT', update_timestamp=1709282175.0, new_state=<OrderState.FAILED: 6>, client_order_id='HummingbotBJYUT6129544e93bd4f3d9daa64feb', exchange_order_id=None, misc_updates=None)
2024-03-01 08:36:16,089 - 246260 - hummingbot.strategy.script_strategy_base - INFO - Creating JASMY-USDT sell order: price: 0.020357891 amount:<PHONE_NUMBER>645989999651732097.
2024-03-01 08:36:16,144 - 246260 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT SELL order HummingbotSJYUT6129544ed3f02f3d9daa64feb for 730.0 to OPEN a JASMY-USDT position.
2024-03-01 08:36:16,177 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.LIMIT", "trading_pair": "JASMY-USDT", "amount": "730.0", "price": "0.020357", "order_id": "HummingbotSJYUT6129544ed3f02f3d9daa64feb", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "152961964048412672", "leverage": 20, "position": "OPEN", "event_name": "SellOrderCreatedEvent", "event_source": "kucoin_perpetual"}
2024-03-01 08:36:16,829 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:17,842 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:18,843 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:19,846 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:20,856 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:21,864 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:22,865 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:23,870 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:24,881 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:25,883 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:26,885 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:27,889 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:28,893 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:29,895 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:30,896 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:31,900 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:32,902 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:33,005 - 246260 - hummingbot.strategy.script_strategy_base - INFO - (RLC-USDT) Canceling the limit order x-3QreWesyBRCUT6129544afec0af3d9. [clock=2024-03-01 08:36:33+00:00]
2024-03-01 08:36:33,198 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-3QreWesyBRCUT6129544afec0af3d9", "exchange_order_id": "6089664741", "event_name": "OrderCancelledEvent", "event_source": "binance_perpetual"}
2024-03-01 08:36:33,198 - 246260 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order x-3QreWesyBRCUT6129544afec0af3d9.
2024-03-01 08:36:33,904 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:34,031 - 246260 - hummingbot.strategy.script_strategy_base - INFO - Creating RLC-USDT buy order: price: 4.0321671 amount: 3.720083922117215826695277584.
2024-03-01 08:36:34,341 - 246260 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT BUY order x-3QreWesyBRCUT6129545ff0522f3d9 for 3.7 to OPEN a RLC-USDT position.
2024-03-01 08:36:34,394 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.LIMIT", "trading_pair": "RLC-USDT", "amount": "3.7", "price": "4.0321", "order_id": "x-3QreWesyBRCUT6129545ff0522f3d9", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "6089666715", "leverage": 20, "position": "OPEN", "event_name": "BuyOrderCreatedEvent", "event_source": "binance_perpetual"}
2024-03-01 08:36:34,906 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:35,907 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:36,908 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:37,019 - 246260 - hummingbot.strategy.script_strategy_base - INFO - (JASMY-USDT) Canceling the limit order HummingbotSJYUT6129544ed3f02f3d9daa64feb. [clock=2024-03-01 08:36:37+00:00]
2024-03-01 08:36:37,082 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "HummingbotSJYUT6129544ed3f02f3d9daa64feb", "exchange_order_id": "152961964048412672", "event_name": "OrderCancelledEvent", "event_source": "kucoin_perpetual"}
2024-03-01 08:36:37,082 - 246260 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order HummingbotSJYUT6129544ed3f02f3d9daa64feb.
2024-03-01 08:36:37,912 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:38,014 - 246260 - hummingbot.strategy.script_strategy_base - INFO - Creating JASMY-USDT sell order: price: 0.0203212815 amount:<PHONE_NUMBER>284798451318141526.
2024-03-01 08:36:38,105 - 246260 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT SELL order HummingbotSJYUT61295463bcb80f3d9daa64feb for 730.0 to OPEN a JASMY-USDT position.
2024-03-01 08:36:38,114 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.LIMIT", "trading_pair": "JASMY-USDT", "amount": "730.0", "price": "0.020321", "order_id": "HummingbotSJYUT61295463bcb80f3d9daa64feb", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "152962056025337858", "leverage": 20, "position": "OPEN", "event_name": "SellOrderCreatedEvent", "event_source": "kucoin_perpetual"}
2024-03-01 08:36:38,914 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:39,921 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:40,923 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:41,934 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:42,937 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:43,939 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:44,941 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:45,946 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:46,960 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:47,972 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:48,978 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:49,984 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:50,986 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:51,988 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:53,013 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:54,014 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:55,004 - 246260 - hummingbot.strategy.script_strategy_base - INFO - (RLC-USDT) Canceling the limit order x-3QreWesyBRCUT6129545ff0522f3d9. [clock=2024-03-01 08:36:55+00:00]
2024-03-01 08:36:55,062 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:55,088 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-3QreWesyBRCUT6129545ff0522f3d9", "exchange_order_id": "6089666715", "event_name": "OrderCancelledEvent", "event_source": "binance_perpetual"}
2024-03-01 08:36:55,088 - 246260 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order x-3QreWesyBRCUT6129545ff0522f3d9.
2024-03-01 08:36:56,013 - 246260 - hummingbot.strategy.script_strategy_base - INFO - Creating RLC-USDT buy order: price: 4.03381215 amount: 3.718566815264315171443965233.
2024-03-01 08:36:56,088 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:56,089 - 246260 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT BUY order x-3QreWesyBRCUT61295474e7288f3d9 for 3.7 to OPEN a RLC-USDT position.
2024-03-01 08:36:56,097 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.LIMIT", "trading_pair": "RLC-USDT", "amount": "3.7", "price": "4.0338", "order_id": "x-3QreWesyBRCUT61295474e7288f3d9", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "6089668496", "leverage": 20, "position": "OPEN", "event_name": "BuyOrderCreatedEvent", "event_source": "binance_perpetual"}
2024-03-01 08:36:57,090 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:58,092 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:36:59,005 - 246260 - hummingbot.strategy.script_strategy_base - INFO - (JASMY-USDT) Canceling the limit order HummingbotSJYUT61295463bcb80f3d9daa64feb. [clock=2024-03-01 08:36:59+00:00]
2024-03-01 08:36:59,060 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "HummingbotSJYUT61295463bcb80f3d9daa64feb", "exchange_order_id": "152962056025337858", "event_name": "OrderCancelledEvent", "event_source": "kucoin_perpetual"}
2024-03-01 08:36:59,060 - 246260 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order HummingbotSJYUT61295463bcb80f3d9daa64feb.
2024-03-01 08:36:59,105 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:00,030 - 246260 - hummingbot.strategy.script_strategy_base - INFO - Creating JASMY-USDT sell order: price: 0.020290690 amount:<PHONE_NUMBER>303690510278359188.
2024-03-01 08:37:00,116 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:00,118 - 246260 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT SELL order HummingbotSJYUT61295478bbdb2f3d9daa64feb for 730.0 to OPEN a JASMY-USDT position.
2024-03-01 08:37:00,131 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.LIMIT", "trading_pair": "JASMY-USDT", "amount": "730.0", "price": "0.020290", "order_id": "HummingbotSJYUT61295478bbdb2f3d9daa64feb", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "152962148358688769", "leverage": 20, "position": "OPEN", "event_name": "SellOrderCreatedEvent", "event_source": "kucoin_perpetual"}
2024-03-01 08:37:01,117 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:02,125 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:03,131 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:04,143 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:05,144 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:06,148 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:07,162 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:08,162 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:09,165 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:10,187 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:11,189 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:12,192 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:13,193 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:14,199 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:15,202 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:16,206 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:17,004 - 246260 - hummingbot.strategy.script_strategy_base - INFO - (RLC-USDT) Canceling the limit order x-3QreWesyBRCUT61295474e7288f3d9. [clock=2024-03-01 08:37:17+00:00]
2024-03-01 08:37:17,091 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-3QreWesyBRCUT61295474e7288f3d9", "exchange_order_id": "6089668496", "event_name": "OrderCancelledEvent", "event_source": "binance_perpetual"}
2024-03-01 08:37:17,091 - 246260 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order x-3QreWesyBRCUT61295474e7288f3d9.
2024-03-01 08:37:17,207 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:18,044 - 246260 - hummingbot.strategy.script_strategy_base - INFO - Creating RLC-USDT buy order: price: 4.03411125 amount: 3.718291110588484638345062992.
2024-03-01 08:37:18,128 - 246260 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT BUY order x-3QreWesyBRCUT61295489e9d58f3d9 for 3.7 to OPEN a RLC-USDT position.
2024-03-01 08:37:18,138 - 246260 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.LIMIT", "trading_pair": "RLC-USDT", "amount": "3.7", "price": "4.0341", "order_id": "x-3QreWesyBRCUT61295489e9d58f3d9", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "6089670602", "leverage": 20, "position": "OPEN", "event_name": "BuyOrderCreatedEvent", "event_source": "binance_perpetual"}
2024-03-01 08:37:18,215 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:19,224 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-01 08:37:20,225 - 246260 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'

Succesfull start (OPEN orders on both exchanges)

bot stuck on Nonetype

stop command bot still stuck on Nonetype

PR update:

Setup sub-account on Binance to test perpetual markets
Ran tests on generic_with_controller

For market_making.pmm_dynamic

Created simple controller and script on binance perp2024-03-04 05:28:22,602 - 348651 - hummingbot.smart_components.smart_component_base - ERROR - unsupported operand type(s) for -: 'float' and 'NoneType'
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/controllers/controller_base.py", line 152, in control_task
    await self.update_processed_data()
  File "/home/ralph/github/hummingbot/6844/controllers/market_making/pmm_dynamic.py", line 72, in update_processed_data
    macd_output = ta.macd(candles["close"], fast=self.config.macd_fast, slow=self.config.macd_slow, signal=self.config.macd_signal)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/pandas_ta/momentum/macd.py", line 34, in macd
    histogram = macd - signalma
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/pandas/core/ops/common.py", line 72, in new_method
    return method(self, other)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/pandas/core/arraylike.py", line 110, in __sub__
    return self._arith_method(other, operator.sub)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/pandas/core/series.py", line 6259, in _arith_method
    return base.IndexOpsMixin._arith_method(self, other, op)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/pandas/core/base.py", line 1325, in _arith_method
    result = ops.arithmetic_op(lvalues, rvalues, op)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/pandas/core/ops/array_ops.py", line 226, in arithmetic_op
    res_values = _na_arithmetic_op(left, right, op)  # type: ignore[arg-type]
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/pandas/core/ops/array_ops.py", line 165, in _na_arithmetic_op
    result = func(left, right)
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/pandas/core/computation/expressions.py", line 241, in evaluate
    return _evaluate(op, op_str, a, b)  # type: ignore[misc]
  File "/home/ralph/miniconda3/envs/hummingbot/lib/python3.10/site-packages/pandas/core/computation/expressions.py", line 70, in _evaluate_standard
    return op(a, b)
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

Followed the prompts as requested and check .yml files still same error

Steps to reproduce:

Run create --controller-config market_making.pmm_dynamic
Run create --script-config v2_generic_with_controllers.py
Run start --script v2_generic_with_controllers.py --conf your.yml

For market_making.dman_maker

Getting error decimal.DivisionByZero: [<class 'decimal.DivisionByZero'>]

2024-03-04 06:04:32,367 - 357029 - hummingbot.client.hummingbot_application - INFO - start command initiated.
2024-03-04 06:04:32,911 - 357029 - hummingbot.data_feed.candles_feed.binance_perpetual_candles.binance_perpetual_candles - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2024-03-04 06:04:33,090 - 357029 - hummingbot.strategy.script_strategy_base - WARNING - binance_perpetual is not ready. Please wait...
2024-03-04 06:04:33,342 - 357029 - hummingbot.data_feed.candles_feed.binance_perpetual_candles.binance_perpetual_candles - INFO - Subscribed to public klines...
2024-03-04 06:04:33,579 - 357029 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2024-03-04 06:04:33,810 - 357029 - hummingbot.core.data_type.order_book_tracker - INFO - Initialized order book for LOOM-USDT. 1/1 completed.
2024-03-04 06:04:33,939 - 357029 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_user_stream_data_source.BinancePerpetualUserStreamDataSource - INFO - Successfully obtained listen key TSkbmRbYecW1gLQ9kNh6EnAfFfeK50o4vbllgxofPgtLgg4mIX3fBQna3RX5lqjH
2024-03-04 06:04:34,056 - 357029 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_api_order_book_data_source.BinancePerpetualAPIOrderBookDataSource - INFO - Subscribed to public order book, trade and funding info channels...
2024-03-04 06:04:34,059 - 357029 - hummingbot.strategy.script_strategy_base - WARNING - binance_perpetual is not ready. Please wait...
2024-03-04 06:04:36,110 - 357029 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - INFO - Leverage for LOOM-USDT successfully set to 20.
2024-03-04 06:04:36,733 - 357029 - hummingbot.core.rate_oracle.rate_oracle - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2024-03-04 06:04:37,512 - 357029 - hummingbot.smart_components.smart_component_base - ERROR - [<class 'decimal.DivisionByZero'>]
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/controllers/controller_base.py", line 153, in control_task
    executor_actions: List[ExecutorAction] = self.determine_executor_actions()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/controllers/market_making_controller_base.py", line 234, in determine_executor_actions
    actions.extend(self.create_actions_proposal())
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/controllers/market_making_controller_base.py", line 246, in create_actions_proposal
    price, amount = self.get_price_and_amount(level_id)
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/controllers/market_making_controller_base.py", line 328, in get_price_and_amount
    return order_price, Decimal(amounts_quote[int(level)]) / order_price
decimal.DivisionByZero: [<class 'decimal.DivisionByZero'>]

Followed the prompts as requested and check .yml files still same error

Steps to reproduce:

Run create --controller-config market_making.dman_maker
Run create --script-config v2_generic_with_controllers.py
Run start --script v2_generic_with_controllers.py --conf your.yml

For directional_trading.dman_v3

Create simple script and controller ✅

take_profit_order_type can be either 1 or 2. Default is 1 (market order)

Start script:

Successfully created 3 buy orders ok
Succesfully filled order:

Script cancelled the other two active buy orders
Script created SELL order to close position, does not indicate if this is a take profit or stop loss

Check sqlite → executor table:

Take-Profilt is null and stop loss has value, assuming the order was SL
Take-Profit order to complete position not yet tested

After successfully completed the filled order, got an error after related to the sell market order:

2024-03-04 06:15:16,633 - 362631 - hummingbot.connector.client_order_tracker - INFO - Created MARKET SELL order x-3QreWesySLMUT612cfa6342e7df95e for 225 to CLOSE a LOOM-USDT position.
2024-03-04 06:15:16,659 - 362631 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.MARKET", "trading_pair": "LOOM-USDT", "amount": "225", "price": "NaN", "order_id": "x-3QreWesySLMUT612cfa6342e7df95e", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "1665714052", "leverage": 20, "position": "CLOSE", "event_name": "SellOrderCreatedEvent", "event_source": "binance_perpetual"}
2024-03-04 06:15:16,660 - 362631 - hummingbot.connector.client_order_tracker - INFO - The SELL order x-3QreWesySLMUT612cfa6342e7df95e amounting to 90/225 LOOM has been filled.
2024-03-04 06:15:16,721 - 362631 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-3QreWesySLMUT612cfa6342e7df95e", "trading_pair": "LOOM-USDT", "trade_type": "TradeType.SELL", "order_type": "OrderType.MARKET", "price": "0.1109200", "amount": "90", "trade_fee": {"percent": "0", "percent_token": "USDT", "flat_fees": [{"token": "USDT", "amount": "0.00499140"}]}, "exchange_trade_id": "68496745", "exchange_order_id": "1665714052", "leverage": 20, "position": "CLOSE", "event_name": "OrderFilledEvent", "event_source": "binance_perpetual"}
2024-03-04 06:15:16,721 - 362631 - hummingbot.connector.client_order_tracker - INFO - The SELL order x-3QreWesySLMUT612cfa6342e7df95e amounting to 167/225 LOOM has been filled.
2024-03-04 06:15:16,758 - 362631 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-3QreWesySLMUT612cfa6342e7df95e", "trading_pair": "LOOM-USDT", "trade_type": "TradeType.SELL", "order_type": "OrderType.MARKET", "price": "0.1109100", "amount": "77", "trade_fee": {"percent": "0", "percent_token": "USDT", "flat_fees": [{"token": "USDT", "amount": "0.00427003"}]}, "exchange_trade_id": "68496746", "exchange_order_id": "1665714052", "leverage": 20, "position": "CLOSE", "event_name": "OrderFilledEvent", "event_source": "binance_perpetual"}
2024-03-04 06:15:16,760 - 362631 - hummingbot.connector.client_order_tracker - INFO - The SELL order x-3QreWesySLMUT612cfa6342e7df95e amounting to 225/225 LOOM has been filled.
2024-03-04 06:15:16,813 - 362631 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-3QreWesySLMUT612cfa6342e7df95e", "trading_pair": "LOOM-USDT", "trade_type": "TradeType.SELL", "order_type": "OrderType.MARKET", "price": "0.1109100", "amount": "58", "trade_fee": {"percent": "0", "percent_token": "USDT", "flat_fees": [{"token": "USDT", "amount": "0.00321639"}]}, "exchange_trade_id": "68496747", "exchange_order_id": "1665714052", "leverage": 20, "position": "CLOSE", "event_name": "OrderFilledEvent", "event_source": "binance_perpetual"}
2024-03-04 06:15:16,894 - 362631 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - NETWORK - Error submitting sell MARKET order to Binance_perpetual for 225 LOOM-USDT NaN.
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 452, in _create_order
    await self._place_order_and_process_update(order=order, **kwargs,)
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 469, in _place_order_and_process_update
    exchange_order_id, update_timestamp = await self._place_order(
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/derivative/binance_perpetual/binance_perpetual_derivative.py", line 264, in _place_order
    order_result = await self._api_post(
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 867, in _api_post
    return await self._api_request(*args, **kwargs)
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 906, in _api_request
    request_result = await rest_assistant.execute_request(
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
    response = await self.execute_request_and_get_response(
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/web_assistant/rest_assistant.py", line 100, in execute_request_and_get_response
    raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. "
OSError: Error executing request POST https://fapi.binance.com/fapi/v1/order. HTTP status is 400. Error: {"code":-2022,"msg":"ReduceOnly Order is rejected."}

After this event, position is already closed and script starts to create
Observed on logs Open Amount, back up filled amount and Close orders for DCA executor2024-03-04 06:20:27,646 - 362631 - hummingbot.smart_components.executors.dca_executor.dca_executor - INFO - Open amount: 225, Close amount: 450
2024-03-04 06:20:27,646 - 362631 - hummingbot.smart_components.executors.dca_executor.dca_executor - INFO - Back up filled amount 1125
2024-03-04 06:20:27,646 - 362631 - hummingbot.smart_components.executors.dca_executor.dca_executor - INFO - Close orders: [<hummingbot.smart_components.models.executors.TrackedOrder object at 0x7ff5bda804f0>, <hummingbot.smart_components.models.executors.TrackedOrder object at 0x7ff5bd9e5660>]

For Close orders is it by default it displays the memory address?

6644.zip

commit c6136de
Steps:

Clone PR6844
create --controller-config directional_trading.dman_v3
set up connector for the candles data, leave empty to use the same exchange as the connector:  >>> binance_perpetual
set up trading pair for the candles data, leave empty to use the same trading pair as the connector:  >>> DOGE-USDT
Review file has been created: conf_directional_trading.dman_v3_1-hyperl.yml

Actual:
connector and pair is not in the candles_config list

@nikspz that is expected, the list will remain empty and the controller will do the work to use that candles exchange

PR update:

Ran tests on v2_generic_with_controllers.py
Setup scripts with multiple controllers each with different markets ✅
Ran different controller setups on single scripts (3/3 controllers tested ok)
Ran tests on complex markets using Vega

Setup controller and script ok
On recording, see attach:

13:40 - Buy order filled
13:50 - Script tries to create orders again

Observed the dca_executor logs still showing as well with close_order showing memory address

15:33 - stop command executed

Observed the script still continues creating but failed  with Unhandled error

2024-03-05 14:13:30,492 - 556447 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: 'NoneType' object has no attribute 'is_open'
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/ralph/github/hummingbot/6844/hummingbot/client/command/stop_command.py", line 36, in stop_loop
    self.strategy.on_stop()
  File "/home/ralph/github/hummingbot/6844/hummingbot/strategy/strategy_v2_base.py", line 266, in on_stop
    self.executor_orchestrator.stop()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/executor_orchestrator.py", line 48, in stop
    executor.early_stop()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/dca_executor/dca_executor.py", line 367, in early_stop
    self.place_close_order_and_cancel_open_orders()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/dca_executor/dca_executor.py", line 373, in place_close_order_and_cancel_open_orders
    self.cancel_open_orders()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/dca_executor/dca_executor.py", line 399, in cancel_open_orders
    if tracked_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'is_open'

Script continues to creating orders
On the attach logs, observe that it successfully created market orders and filled as well

2024-03-05 14:17:55,412 - 556447 - hummingbot.client.hummingbot_application - INFO - stop command initiated.
2024-03-05 14:17:55,413 - 556447 - hummingbot.strategy.script_strategy_base - INFO - Creating ETHUSDT-USDT sell order: price: NaN amount: 0.012.
2024-03-05 14:17:55,414 - 556447 - hummingbot.strategy.script_strategy_base - INFO - Creating ETHUSDT-USDT sell order: price: NaN amount: 0.008.
2024-03-05 14:17:55,415 - 556447 - hummingbot.strategy.script_strategy_base - INFO - (ETHUSDT-USDT) Canceling the limit order VGHBBETUT612ea80532873bc100fcfde. [clock=2024-03-05 14:17:54+00:00]
2024-03-05 14:17:55,415 - 556447 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: 'NoneType' object has no attribute 'is_open'
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/ralph/github/hummingbot/6844/hummingbot/client/command/stop_command.py", line 36, in stop_loop
    self.strategy.on_stop()
  File "/home/ralph/github/hummingbot/6844/hummingbot/strategy/strategy_v2_base.py", line 266, in on_stop
    self.executor_orchestrator.stop()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/executor_orchestrator.py", line 48, in stop
    executor.early_stop()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/dca_executor/dca_executor.py", line 367, in early_stop
    self.place_close_order_and_cancel_open_orders()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/dca_executor/dca_executor.py", line 373, in place_close_order_and_cancel_open_orders
    self.cancel_open_orders()
  File "/home/ralph/github/hummingbot/6844/hummingbot/smart_components/executors/dca_executor/dca_executor.py", line 399, in cancel_open_orders
    if tracked_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'is_open'
2024-03-05 14:17:58,199 - 556447 - hummingbot.connector.client_order_tracker - INFO - The SELL order VGHBSETUT612ea81afd5cabc100fcfde amounting to 0.008/0.008 ETHUSDT has been filled.
2024-03-05 14:17:58,266 - 556447 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "VGHBSETUT612ea81afd5cabc100fcfde", "trading_pair": "ETHUSDT-USDT", "trade_type": "TradeType.SELL", "order_type": "OrderType.MARKET", "price": "3777.94", "amount": "0.008", "trade_fee": {"percent": "0", "percent_token": null, "flat_fees": [{"token": "USDT", "amount": "0.013603"}]}, "exchange_trade_id": "d442bcd7e4827c0ada1ec897c5727a5e68c5d2a1f21da3b1770dee047b37269f", "exchange_order_id": "7cea7542d818ac9412c16443948efa7beeedcca31e4ae6aa3a8e3fdfcc267412", "leverage": 91, "position": "CLOSE", "event_name": "OrderFilledEvent", "event_source": "vega_perpetual"}
2024-03-05 14:17:58,267 - 556447 - hummingbot.connector.client_order_tracker - INFO - The SELL order VGHBSETUT612ea81d02efcbc100fcfde amounting to 0.008/0.008 ETHUSDT has been filled.
2024-03-05 14:17:58,361 - 556447 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "VGHBSETUT612ea81d02efcbc100fcfde", "trading_pair": "ETHUSDT-USDT", "trade_type": "TradeType.SELL", "order_type": "OrderType.MARKET", "price": "3778.84", "amount": "0.008", "trade_fee": {"percent": "0", "percent_token": null, "flat_fees": [{"token": "USDT", "amount": "0.013606"}]}, "exchange_trade_id": "4cc7e8d9cf60d9b3c56bacf44a8c6d0101093606a698b4f54e8d83b3257c62da", "exchange_order_id": "843edad405264f97ffa373ff0415654f7cecb7c8b514c069a7dd3426f9d7956b", "leverage": 91, "position": "CLOSE", "event_name": "OrderFilledEvent", "event_source": "vega_perpetual"}
2024-03-05 14:17:58,362 - 556447 - hummingbot.connector.client_order_tracker - INFO - The SELL order VGHBSETUT612ea81ef4db8bc100fcfde amounting to 0.008/0.008 ETHUSDT has been filled.
2024-03-05 14:17:58,401 - 556447 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "VGHBSETUT612ea81ef4db8bc100fcfde", "trading_pair": "ETHUSDT-USDT", "trade_type": "TradeType.SELL", "order_type": "OrderType.MARKET", "price": "3777.56", "amount": "0.008", "trade_fee": {"percent": "0", "percent_token": null, "flat_fees": [{"token": "USDT", "amount": "0.013602"}]}, "exchange_trade_id": "e09e59a640e6222186108ea16aae6b9958d22b7a9cd9e9d9212aec0c43ba620f", "exchange_order_id": "e86d506c408417a4ce578bc65998a03c3d9158b7ae20d93c420e27807bfc0400", "leverage": 91, "position": "CLOSE", "event_name": "OrderFilledEvent", "event_source": "vega_perpetual"}
2024-03-05 14:17:58,807 - 556447 - hummingbot.connector.client_order_tracker - INFO - Created MARKET SELL order VGHBSETUT612ea81afd5cabc100fcfde for 0.008 to CLOSE a ETHUSDT-USDT position.
2024-03-05 14:17:58,858 - 556447 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "type": "OrderType.MARKET", "trading_pair": "ETHUSDT-USDT", "amount": "0.008", "price": "NaN", "order_id": "VGHBSETUT612ea81afd5cabc100fcfde", "creation_timestamp":<PHONE_NUMBER>.0, "exchange_order_id": "7cea7542d818ac9412c16443948efa7beeedcca31e4ae6aa3a8e3fdfcc267412", "leverage": 91, "position": "CLOSE", "event_name": "SellOrderCreatedEvent", "event_source": "vega_perpetual"}
2024-03-05 14:17:59,009 - 556447 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "VGHBSETUT612ea81afd5cabc100fcfde", "base_asset": "ETHUSDT", "quote_asset": "USDT", "base_asset_amount": "0.008", "quote_asset_amount": "30.22352", "order_type": "OrderType.MARKET", "exchange_order_id": "7cea7542d818ac9412c16443948efa7beeedcca31e4ae6aa3a8e3fdfcc267412", "event_name": "SellOrderCompletedEvent", "event_source": "vega_perpetual"}
2024-03-05 14:17:59,009 - 556447 - hummingbot.connector.client_order_tracker - INFO - SELL order VGHBSETUT612ea81afd5cabc100fcfde completely filled.

These orders are recorded on CSV file and exchange trade history
Got some filled trades

Steps to reproduce:

Setup controller for Vega perpetual
Create script for the controller
Start the script and observe behavior after successfully filled order
Execute stop command and observe script behavior

vega.zip

@rapcmia nice catch, just fixed

@cardosofede Could you please change this docker-compose.yml as well?
We need to update this docker-compose.yml file on Client with conf/scripts and hummingbot/certs
https://github.com/cardosofede/hummingbot/blob/feat/position_executor_refactor/docker-compose.yml

PR update:

Test commit 50149d6975..
Not seeing the open and close orders on logs ✅
Ran test on v2_generic_with_controllers.py

directional_trading.dman_v3

Single level

Previously reported issues found on the script related to connector’s stop-loss order https://github.com/hummingbot/hummingbot/issues/6609

# 2/3 orders filled, 3QreWesyBBEUT612fd9684a288e041  cancelled
2024-03-06 13:05:04,856 - 609446 - hummingbot.strategy.script_strategy_base - INFO - (BAKE-USDT) Canceling the limit order x-3QreWesyBBEUT612fd9684a288e041. [clock=2024-03-06 13:05:04+00:00]

# Observe on this line, the script tries to place two sets of stop-loss order to close position
# This resulted to the error of "ReduceOnly Order is rejected."
2024-03-06 13:05:04,857 - 609446 - hummingbot.strategy.script_strategy_base - INFO - Creating BAKE-USDT sell order: price: NaN amount: 118.
2024-03-06 13:05:05,018 - 609446 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp":<PHONE_NUMBER>.0, "order_id": "x-3QreWesyBBEUT612fd9684a288e041", "exchange_order_id": "6043496856", "event_name": "OrderCancelledEvent", "event_source": "binance_perpetual"}
2024-03-06 13:05:05,018 - 609446 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order x-3QreWesyBBEUT612fd9684a288e041.
2024-03-06 13:05:05,955 - 609446 - hummingbot.strategy.script_strategy_base - INFO - Creating BAKE-USDT sell order: price: NaN amount: 118.
2024-03-06 13:05:06,060 - 609446 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - NETWORK - Error submitting sell MARKET order to Binance_perpetual for 118 BAKE-USDT NaN.
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 452, in _create_order
    await self._place_order_and_process_update(order=order, **kwargs,)
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 469, in _place_order_and_process_update
    exchange_order_id, update_timestamp = await self._place_order(
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/derivative/binance_perpetual/binance_perpetual_derivative.py", line 264, in _place_order
    order_result = await self._api_post(
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 867, in _api_post
    return await self._api_request(*args, **kwargs)
  File "/home/ralph/github/hummingbot/6844/hummingbot/connector/exchange_py_base.py", line 906, in _api_request
    request_result = await rest_assistant.execute_request(
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
    response = await self.execute_request_and_get_response(
  File "/home/ralph/github/hummingbot/6844/hummingbot/core/web_assistant/rest_assistant.py", line 100, in execute_request_and_get_response
    raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. "
OSError: Error executing request POST https://fapi.binance.com/fapi/v1/order. HTTP status is 400. Error: {"code":-2022,"msg":"ReduceOnly Order is rejected."}

Trailing stop, Time limit and Stop Loss ✅
What happens for take profit after we successfully filled DCA orders?

Set tight spreads for take-proft
Filled amount in quote matched
Waited for couple of minutes after all DCA orders filled, nothing happened until it reached time_limit which closed the position executor
How can we complete a position executor CloseType.TAKE_PROFIT?

Multiple markets ✅
Complex markets ✅

Got same issue in binance_perpetual 50149d6 commit
Client stuck on AttributeError: 'NoneType' object has no attribute 'order'
conf_v2_generic_jasmyy-wld on 50149d6 .zip
2024-03-07 03:07:13,241 - 645845 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-07 03:07:13,241 - 645845 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'
2024-03-07 03:07:13,242 - 645845 - hummingbot.smart_components.executors.position_executor.position_executor - ERROR - 'NoneType' object has no attribute 'order'
Traceback (most recent call last):
  File "/home/nikita/v2ref6844/hummingbot/smart_components/smart_component_base.py", line 69, in control_loop
    await self.control_task()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 261, in control_task
    await self.control_shutdown_process()
  File "/home/nikita/v2ref6844/hummingbot/smart_components/executors/position_executor/position_executor.py", line 272, in control_shutdown_process
    elif self._close_order.order and self._close_order.order.is_open:
AttributeError: 'NoneType' object has no attribute 'order'

going to retest on 6f3aa3a

PR update:

Pulled latest commit 6f3aaa3a...
Ran tests on v2_generic_with_controllers.py with time_limit set to 900s

Single level orders

- Setup single level with tight take_profit spreads
- After 300s observed it created another DCA executor ✅
- Observe max_executor_per_side
- Add new dca executor at cooldown_time
- Change cooldown_time, creates new dca executor on set time ✅

When is_trading is False?

On status:

shows active orders to open position
When successfully filled, is_trading goes to True
Order will be added or create to open position ✅

- After 15mins:
  - Two opened DCA executors has been terminated due to Stop-loss
  - Still no `CloseType.TAKE_PROFIT` 👀

Multiple markets

Created two separate controllers with different markets
Create scritp and assign 2 controllers
Observed:

Ids which should be unique are now the same?

Observed that if you create two same controller, it creates same IDs
This is also the same if different controllers:

The only time Ids are unique is when client is relaunch and run create --controller-config again
Observe screenshot below that status shows only 1 id and this shares two controllers with different market
Attached screens recording https://drive.google.com/file/d/1rSFD6OiYD7OGnXw-Gdt-TKAL7TPHCjiE/view?usp=sharing

Observed that initially the bot created two separate orders for different controller

Tried to change the number of DCA on yml file

Observed that the number of active orders on exchange is 3 but on the controller tabs its only displaying 2 SEI-USDT order
Ran another test but this time we waited for the cooldown_time and created another executor but still not showing the other others:

Steps to reproduce:

Bug on same IDs:  Create same or different controllers and check the IDs on yml file
Bug on DCA orders: Create controllers with different IDs and markets on yml file

Start the script and observe active orders and new DCA executors

03072024a.zip

Crosschecked with Ralph, failed to start strategy on complex markets (Hyperliquid and binance candles)
Steps:

Create --controller-config conf_directional_trading.dman_v3_test1.yml (or two different conf_directional_trading.dman_v3)
Create script-config for v2_generic_with_controllers and add this controller (or controllers)
Start --script v2_generic_with_controllers.py --conf conf_v2_generic_with_controllers_dman_v3-retest_candles.yml

Actual: Failed to start script, status reported no executors found
logs_conf_v2_generic_with_controllers_dman_v3-retest_candles.log
conf_directional_trading.dman_v3_test1_oneway - Copy.yml.txt
6f3aa3a_dman_v3.zip

@nikspz I tried with that config and worked

Works. checking what is the issue now

dman-v3 on HPL + binance candles - ongoing longrun
Created default config for binance_perpetual on MM.dman_maker Bot stuck on  Please increase the amount of the order.
Steps:

Create --controller-config conf_market_making.dman_maker_1.yml with default values
Create script-config for v2_generic_with_controllers and add this controller (or controllers)
Start --script v2_generic_with_controllers.py --conf conf_v2_generic_with_controllers_dman-maker.yml

Actual:
Bot stuck on  Please increase the amount of the order.
Expected:
User able to run default configs
07mni.zip
logs_conf_v2_generic_with_controllers_dman-maker.log

Steps:

Create default conf_v2_simple_directional_rsi_1.yml (not changed any fields)
start --script v2_simple_directional_rsi.py --conf conf_v2_simple_directional_rsi_1.yml

Actual:
Flooded with ERROR - Unexpected error running clock tick.
conf_v2_simple_directional_rsi_1.yml.log
v2_simple_directional_rsi.py.log
2024-03-08 10:17:37,006 - 798367 - hummingbot.core.clock - ERROR - Unexpected error running clock tick.
Traceback (most recent call last):