From 9be527a0fa8404d9263178e86a7a26477893dac1 Mon Sep 17 00:00:00 2001 From: hilezir Date: Fri, 29 Jan 2021 19:08:11 +0800 Subject: [PATCH] feat(TradeDialog): add points of far to lost --- .../ExecutionDialog/ExecutionDialogPrices.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/ExecutionDialog/ExecutionDialogPrices.tsx b/src/components/ExecutionDialog/ExecutionDialogPrices.tsx index 0f4e07a..977952d 100644 --- a/src/components/ExecutionDialog/ExecutionDialogPrices.tsx +++ b/src/components/ExecutionDialog/ExecutionDialogPrices.tsx @@ -69,6 +69,10 @@ const ExecutionDialogPrices: React.FC = () => { .minus(openRate) .abs() + const loseOfSL = big(rate.model?.stopLoss.amount || 0) + .minus(openRate) + .abs() + return ( @@ -110,6 +114,16 @@ const ExecutionDialogPrices: React.FC = () => { `} > + far + + {' {to lose '} + + {'}'} + { `} > + far - {' {win '} + {' {to win '} {'}'}