Closed kenkunz closed 2 months ago
Per discussion at backlog dig-through – for short term, we will hide the one problematic position in frontend
by hard-coding this, and open a ticket to remove the "hack" code once we have agreement on the right way to flag positions as "hidden" (more scalable solution).
Goal
As a strategy admin, I want to be able to hide specific positions from
frontend
, in order to prevent users from being confused by erroneous data.Background
See discord thread.
The following position was identified as problematic: https://tradingstrategy.ai/strategies/enzyme-polygon-eth-btc-rsi/closed-positions/4
This position shows a
40.2%
loss. The actual trade impact was a slight gain, but the data is not reflected correctly due to some failed / repaired trades and some missing or incorrect data.Since the total value of this position is so low, the recommended solution is to just hide the position. This requires flagging the position as
hidden
on the backend.How to flag position as
hidden
?It is not clear how we can currently flag the position as
hidden
. Positions don't currently have flags (trades do).Recommendation: add
flags
property toTradingPosition
class intrade-executor
and includehidden
as one of the enumerated flag options.Alternative: a quick-and-dirty alternative would be to use the existing
notes
property. In order to denote a flag within the notes field, we may wish to use a standard convention, such as:Flags: foo, bar, hidden
on it's own line withinnotes
. This feels hack-y, though … much preferred to go with a realflags
field.Acceptance criteria
Given: a position that has been flagged as
hidden
on the backend (method tbd).404 Not found
hidden
badge shown and reduced opacity on the table row to indicate that this position would be hidden for non-admin usershidden
badge