fix share modal calculation for shorts

This commit is contained in:
tjs 2022-05-15 16:53:13 -04:00
parent bd3a8fcf47
commit ea8fbe4501
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ const calculatePositionPercentage = (position, maxLeverage) => {
return returnsPercentage * maxLeverage
} else {
const returnsPercentage =
(position.avgEntryPrice / position.indexPrice - 1) * 100
(position.indexPrice / position.avgEntryPrice - 1) * -100
return returnsPercentage * maxLeverage
}
}