Skip to content

Add "hidden" flag to TradingPosition records that should be hidden in the UI #1041

@kenkunz

Description

@kenkunz

Goal

As a strategy admin, I want to be able to hide specific positions from non-admin users on frontend, in order to prevent them from being confused by erroneous data.

Background

See tradingstrategy-ai/frontend#812

As a short-term work around, positions are bing hidden in frontend by adding hiddenPositions array to the frontend strategy configuration (found in strategies.json on prod). This is not a scalable solution and is problematic b/c the strategy configuration is not defined in a single, consistent location.

Note the question under How to flag position as hidden? in the ticket description. This ticket assumes we are going with the recommendation in that section. If there is a better approach, update the ticket accordingly.

Acceptance criteria

  1. Position records (found under state.portfolio.[status]_positions) include a new flags property.
  2. The flags property includes a list of values, taken from an enumeration of valid position flags
  3. One of the valid position flags is hidden
  4. This position includes the hidden flag.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestpriority: P2Default priority. An issue might not yet be fixed in the next release.size: SA small task that can be completed in less than a day

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions