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

Strategy position management DSL #9

Open
lopatin opened this issue Jan 14, 2019 · 0 comments
Open

Strategy position management DSL #9

lopatin opened this issue Jan 14, 2019 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@lopatin
Copy link
Contributor

lopatin commented Jan 14, 2019

There's a lot of room for improving how strategies are written. They currently have the low level primitive operations that we can use to build up a higher level syntax/dsl for position management. Here's a draft of what such a think can look like. Def requires more thought.

val btcPosition = position("my_pos", "btc")
val btcPositionBitmex = position("my_pos", "btc", "bitmex")

val ethPosition = btcPosition / 2

if (something)
  btcPosition("usd") = ethPosition("usd")

maximize(ethPosition.as("ltc") - btcPosition.as("ltc"))
@lopatin lopatin added enhancement New feature or request help wanted Extra attention is needed labels Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant