Skip to content

Strategy position management DSL #9

Description

@lopatin

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"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions