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

No longer being developed or maintained. Hello Rapacity #43

Open
RealJohnGalt opened this issue Feb 28, 2016 · 6 comments
Open

No longer being developed or maintained. Hello Rapacity #43

RealJohnGalt opened this issue Feb 28, 2016 · 6 comments
Assignees

Comments

@RealJohnGalt
Copy link
Contributor

A new piece of software (going by rapacity) is currently being developed from scratch in another language (golang).

As this project matured, project goals also shifted. A new project (with a saner code base) will ultimately benefit everyone.

Advantages:

  • Ability to upload binaries when releases are tagged, allowing users on windows, osx, or linux to run the packages without any additional software or compilation.
  • Native GUI on windows, osx, or linux -- without any additional code for support between platforms.
  • More sane code base for easier development/maintenance. Additionally hammering out bugs early through better design (solid websocket connections and handling, multiprocessing in shared memory space, better db design, etc).
  • Easier exchange support and futures support. Bitfinex support has already been added alongside OKCoin.
  • Having a maintained testing package, allowing for easy functionality testing.
  • Better optimizing indicators for concurrency as they're being added back, and fixing accuracy issues in indicators such as DEMA and FRAMA.

Disadvantages:

  • It will take a bit for the project to gain all features and functionality in Avarice. The first release will be a more barebones variant of what avarice has become. It will only be a GUI with a few indicators, and basic configuration.
  • ...Writing documentation :(
@RealJohnGalt
Copy link
Contributor Author

Software (package) structure:

  • main: really just gets the software moving -- similar functionality to avarice.py. Barebones gui currently resides in this package, but might be moved to it's own package (not using gui for getting software to a good spot).
    • exchange: Package has a global TickerData struct which contains Buy, Sell, Vol, High, Low, Last, and Timestamp. Exchange access is through functions in files such as "okcoinlayer.go". All exchange functions are run concurrently except for the initial connection.
      • NOTE: Reconnects are only triggered from a read on a failed or closed websocket connection (the lightest, most sane way of handling this).
    • storage: The storage package uses https://github.com/vaughan0/go-ini for config support, and boltdb (https://github.com/boltdb/bolt) for storing a TickerHistory struct (trimmed down to max indicator depends). TickerHistory is global, and contains Buy, Sell, Last, Vol, and Smooth float64 slices, and is set at candle interval. Smooth is for a new option, which simply uses the average of buy and sell instead of last. Indicators access TickerHistory slices for their operations.
      • TODO: Implement "restore" functions for populating indicator intermediates and TickerHistory if able (run within last candle interval).
      • TODO: Use batch writes for indicator intermediates outside of indicator coroutines for better performance.
      • NOTE: Config is only read once at start currently, and must be manually edited. This is because gui configuration support takes time that I could be using to get the project to avarice's feature level.
    • indicators: indicators are separate files, helper code is consolidated into a helper file. Indicator intermediates are float64 slices (due to easy manipulation). They're written with an append function that trims down to the indicator's max (using same CandleDepends arithmetic as in avarice). The boltdb key values and indicator intermediate slices are the same, however boltdb will only be read from (future) recovery functions (indicators use their intermediate slices for lower db hit).
    • signals: Package contains functions for returning signals off indicators. Signals will be able to mix/match and used as buy/sell triggers separately (so you could use EMA for buying, and DEMA for selling -- unlike in Avarice)
    • trader: Package with functions to use signals and offer batch order strategies with customization.
    • simulator: Basic paper trading with no batch order strategy support (due to being a pain to write with orderbook support, and skewed potential results.).
    • notifier: Package may arrive when most of this is handled.
    • api: Package using gorilla websocket to support daemon mode (again, later on).

Edit: Using https://github.com/andlabs/ui for the GUI, the (nearly complete) golang support for https://github.com/andlabs/ui.

@RealJohnGalt
Copy link
Contributor Author

Configuration excerpt from Rapacity to demonstrate how signals and strategies are handled. This is somewhat complex, however strategy and signal configuration will be the first configuration page to arrive in the GUI.

[Candles]
Size: 5
# An experimental (higher resource) option to calculate signals every 10 seconds.
# The goal is to get better entry points and more accurate results.
Turbo Aggregation: off

[Strategies]
Enabled: SMA Strategy Example

[SMABoth]
Indicator: SMA
Signal: Both
Strategy: CD

[SMA Strategy Example]
Signals: SMABoth
Trader: off
Simulator: on
Volume: 99

In this example, you can add as many signals or strategies as you like with commas separating (so long as they have different names). The only strategy enabled is "SMA Strategy Example," so it's read from that section. The only signal enabled is "SMABoth," so it's read from that section (however you can combine signals in a strategy with commas separating the signal names). SMABoth could have it's signal set to "Buy" or "Sell" as well. And the signal/strategy names can be whatever you choose.

So signals may be combined into strategies, and trade volume can be set separately. For instance to create a very strong strategy with high volume, with a weaker strategy (such as pure RSI) with small volume.

You may now also test a strategy in the same instance you're trading on other strategies. In other words, you're no longer limited to a single trader or simulator instance.

"Turbo Aggregation" is a new option that seems to be performing well with the new code base as well 👍

@RealJohnGalt
Copy link
Contributor Author

About 1/3rd of the indicators have been moved over, simulator works, backend to okcoin and futures works, GUI strategy editor works, recovery works, and "turbo aggregation" is no longer an option and now force enabled 👍

You now have more control per strategy as well:

  • Trade volume has been totally redone: you now set total trade volume (in bitcoin that's checked at first run), the percentage per-strategy is percentage of total trade volume.
  • Added Overrides strategy option, so for futures you can have one strategy trigger closing positions of other strategies.
  • Leverage is now a per-strategy option if trading futures.

@RealJohnGalt
Copy link
Contributor Author

@ghostnegotiator
Copy link

Good Morning John,

How is the development going? I am still following this & interested....

Yours Faithfully,
RDash

@jonaslund
Copy link

Same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants