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

Implement different triggers to reset orders #273

Merged
merged 15 commits into from
Aug 29, 2018

Commits on Aug 15, 2018

  1. Implement different triggers to reset orders

    - Always reset orders whether it was a filled, expired or manually
    cancelled order detected
    - Reset on partial fill (with % threshold, optional)
    - Allow to define custom order expiration time
    - Reset orders on market trade (optional)
    - Reset orders on center price change threshold (optional)
    
    - Also disable log message about correct orders to remove log noise
    - Writing of a trade log entry is disabled because we cannot properly
    distinguish an expired order from a filled one
    
    Closes: Codaone#226, Codaone#270
    bitphage committed Aug 15, 2018
    Configuration menu
    Copy the full SHA
    c9f139e View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2018

  1. Configuration menu
    Copy the full SHA
    fae970b View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2018

  1. Configuration menu
    Copy the full SHA
    3641cce View commit details
    Browse the repository at this point in the history
  2. More proper fix for spamming log with "Oreders correct ..."

    As described by @mikakoi:
    The point of logging "Orders correct on market" is that it's used as a
    status for the worker in the GUI.
    In a case where the strategy is initialized but no action is required to
    be done after it, a status message "Initializing Relative Orders" will
    get stuck on the GUI and that will just confuse the user.
    
    Code part is from 347eedf
    
    Closes: Codaone#270
    bitphage committed Aug 28, 2018
    Configuration menu
    Copy the full SHA
    2fe2588 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ba80c10 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    275ce1b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9f1da45 View commit details
    Browse the repository at this point in the history
  6. Call check_orders() on initialization instead of update_orders()

    There are maybe old orders from previous run, so give a chance to them.
    bitphage committed Aug 28, 2018
    Configuration menu
    Copy the full SHA
    d1abe0d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c43c0c2 View commit details
    Browse the repository at this point in the history
  8. Update the log message

    bitphage committed Aug 28, 2018
    Configuration menu
    Copy the full SHA
    7caf08b View commit details
    Browse the repository at this point in the history
  9. Reset orders on startup if is_reset_on_price_change active

    We still need to cancel old orders on startup when "Reset orders on
    center price change" is active. We don't know what the center price was
    before.
    bitphage committed Aug 28, 2018
    Configuration menu
    Copy the full SHA
    28e8dc8 View commit details
    Browse the repository at this point in the history
  10. Fix imports styling

    bitphage committed Aug 28, 2018
    Configuration menu
    Copy the full SHA
    767dd9d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b447161 View commit details
    Browse the repository at this point in the history
  12. Remove reset_on_market_trade option

    This is option is actually not needed because it's duplicating behavior
    of "Reset on center price change" with "threshold = 0"
    bitphage committed Aug 28, 2018
    Configuration menu
    Copy the full SHA
    db74ed7 View commit details
    Browse the repository at this point in the history
  13. Do not ignore market update events while initializing

    check_orders() are called from __init__(), so it will not work because
    initial "self.last_check = now"
    bitphage committed Aug 28, 2018
    Configuration menu
    Copy the full SHA
    901e880 View commit details
    Browse the repository at this point in the history