Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/simplify starter scripts #7011

Merged
merged 16 commits into from May 16, 2024
Merged

feat/simplify starter scripts #7011

merged 16 commits into from May 16, 2024

Conversation

fengtality
Copy link
Sponsor Contributor

@fengtality fengtality commented May 5, 2024

This PR cleans up the /scripts directory and basic script examples. Now, there are only 5 scripts that are in scripts:

  • simple PMM
  • simple VWAP
  • simple XEMM
  • V2 directional RSI
  • V2 XEMM
  • V2 TWAP
  • V2 Funding Rate Arbitrage
  • V2 Controller Loader

All the simple scripts accept config files.

Other scripts are located in sub-folders in the main scripts directory, no longer nested in /achived-scripts.

Instructions for QA

  • Test each simple script with different connectors
  • Test the V2 loader script with each of the V2 controllers

@fengtality fengtality changed the title (WIP) Simplify V2 Simple Directional RSI script Simplify starter scripts May 7, 2024
@fengtality fengtality changed the title Simplify starter scripts feat/simplify starter scripts May 7, 2024
@fengtality fengtality requested review from rapcmia and nikspz May 7, 2024 04:04
@fengtality fengtality marked this pull request as ready for review May 7, 2024 04:04
Copy link
Contributor

@rapcmia rapcmia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • simple_pmm
    • Setup with Kraken and spreads enough for trade event ok
  • simple_xemm
    • Setup with Kraken and Binance
    • Setup with two paper trade connectors ok
  • v2_generic_with_controllers
    • Setup with binance perp
      • directional_trading.bollinger_v1
      • market_making.dman_maker

Pending:

  • simple_rsi
  • simple_vwap

@nikspz
Copy link
Contributor

nikspz commented May 7, 2024

simple_vwap: ok

commit 8033e91
@fengtality
need to add leverage for simple_rsi on script config creation
Also candles exchange is not showing on config creation

Steps:

  1. Clone and install PR7011
  2. connect binance_perpetual
  3. create --script-config simple_rsi

Actual:
review script config not ask for leverage
default config created with leverage 1

image
image

image

@nikspz
Copy link
Contributor

nikspz commented May 8, 2024

@fengtality
commit 40d1c0f,

issue with config creation fixed ✔

simple_rsi

Client not created order to OPEN short position for upper bound, ❌
not created order to OPEN long position on lower bound ❌

Steps to reproduce:

  1. Clone PR7011 commit 40d1c0f
  2. connect binance_perpetual
  3. use config provided (

Actual:
Review no orders OPENed for bound upper than 70 and below 30

script_file_name: simple_rsi.py
exchange: binance_perpetual
trading_pair: DOGE-USDT
candles_exchange: binance_perpetual
candles_pair: DOGE-USDT
candles_interval: 1m
candles_length: 60
order_amount_usd: 20
leverage: 10
rsi_low: 30.0
rsi_high: 70.0

conf_simple_rsi_1.yml.txt
70118may.zip

Client should place OPEN order for simple_rsi
rsi should place buy order

image

@fengtality
Copy link
Sponsor Contributor Author

Thanks @nikspz. I think that simple_rsi script is outdated. I decided to use the V2 directional script instead, which should fix the issues you saw. I also moved the other V2 scripts into the base scripts folder but I don't think you need to re-test them.

@nikspz
Copy link
Contributor

nikspz commented May 14, 2024

  • Created / started script config
    • simple_pmm: successfully
    • simple_vwap: ok
  • Created —script-config v2_simple_directional_rsi
  • started v2_directional_rsi with —conf, got error
    • ModuleNotFoundError: No module named 'hummingbot.smart_components'

logs_conf_v2_simple_directional_rsi_1.log

7011.zip

2024-05-14 07:44:34,442 - 1900408 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: No module named 'hummingbot.smart_components'
Traceback (most recent call last):
  File "/home/nikita/simpled7011/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/nikita/simpled7011/hummingbot/client/command/start_command.py", line 125, in start_check
    self._initialize_strategy(self.strategy_name)
  File "/home/nikita/simpled7011/hummingbot/client/command/start_command.py", line 280, in _initialize_strategy
    self.start_script_strategy()
  File "/home/nikita/simpled7011/hummingbot/client/command/start_command.py", line 191, in start_script_strategy
    script_strategy, config = self.load_script_class()
  File "/home/nikita/simpled7011/hummingbot/client/command/start_command.py", line 213, in load_script_class
    script_module = importlib.import_module(f".{script_name}", package=settings.SCRIPT_STRATEGIES_MODULE)
  File "/home/nikita/miniconda3/envs/hummingbot/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/nikita/simpled7011/scripts/v2_directional_rsi.py", line 13, in <module>
    from hummingbot.smart_components.executors.position_executor.data_types import (
ModuleNotFoundError: No module named 'hummingbot.smart_components'

image

@fengtality
Copy link
Sponsor Contributor Author

@nikspz The library import issue should be fixed now

Copy link

@fengtality
Copy link
Sponsor Contributor Author

@nikspz I'd like to merge this in so we can wrap up the Vega video

Copy link
Contributor

@nikspz nikspz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • simple_pmm: ok
  • simple_xemm: ok
    • Setup with Kraken and Binance
    • Setup with two paper trade connectors ok
  • v2_with_controllers: ok
  • simple_vwap: ok
  • v2_directional_rsi: ok

@nikspz nikspz merged commit 15e4d05 into development May 16, 2024
2 checks passed
@nikspz nikspz deleted the feat/simple-v2-directional branch May 16, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Development 1.28.0
Development

Successfully merging this pull request may close these issues.

None yet

3 participants