@tradejs/app 3.1.28-beta.251 → 3.1.28-beta.253
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tradejs/app",
|
|
3
|
-
"version": "3.1.28-beta.
|
|
3
|
+
"version": "3.1.28-beta.253",
|
|
4
4
|
"description": "Installable Next.js UI for the TradeJS TypeScript framework: dashboards, backtests, charts, and runtime data.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tradejs",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"@chakra-ui/charts": "3.36.1",
|
|
57
57
|
"@chakra-ui/react": "3.36.1",
|
|
58
58
|
"@emotion/react": "^11.14.0",
|
|
59
|
-
"@tradejs/core": "^3.1.28-beta.
|
|
60
|
-
"@tradejs/indicators": "^3.1.28-beta.
|
|
61
|
-
"@tradejs/infra": "^3.1.28-beta.
|
|
62
|
-
"@tradejs/node": "^3.1.28-beta.
|
|
63
|
-
"@tradejs/types": "^3.1.28-beta.
|
|
59
|
+
"@tradejs/core": "^3.1.28-beta.253",
|
|
60
|
+
"@tradejs/indicators": "^3.1.28-beta.253",
|
|
61
|
+
"@tradejs/infra": "^3.1.28-beta.253",
|
|
62
|
+
"@tradejs/node": "^3.1.28-beta.253",
|
|
63
|
+
"@tradejs/types": "^3.1.28-beta.253",
|
|
64
64
|
"@types/bcryptjs": "2.4.6",
|
|
65
65
|
"@types/lodash": "4.17.24",
|
|
66
66
|
"@types/node": "24.13.3",
|
|
@@ -30,10 +30,10 @@ import {
|
|
|
30
30
|
import { toaster } from '#ui';
|
|
31
31
|
|
|
32
32
|
const DEPLOYMENT_PRESENTATIONS = [
|
|
33
|
-
{
|
|
34
|
-
{
|
|
35
|
-
{
|
|
36
|
-
{
|
|
33
|
+
{ colorPalette: 'blue' },
|
|
34
|
+
{ colorPalette: 'purple' },
|
|
35
|
+
{ colorPalette: 'pink' },
|
|
36
|
+
{ colorPalette: 'cyan' },
|
|
37
37
|
] as const;
|
|
38
38
|
|
|
39
39
|
const getDeploymentPresentation = (deploymentId: string) => {
|
|
@@ -92,7 +92,6 @@ export const RuntimeStrategyCard = ({
|
|
|
92
92
|
strategy.deploymentId,
|
|
93
93
|
);
|
|
94
94
|
const strategyInstanceLabel = `${strategy.strategyName}, ${strategy.deploymentLabel}`;
|
|
95
|
-
const maxLossValue = strategy.config.MAX_LOSS_VALUE;
|
|
96
95
|
const setControlState = async (controlState: 'active' | 'entries_paused') => {
|
|
97
96
|
setControlSaving(true);
|
|
98
97
|
try {
|
|
@@ -132,42 +131,19 @@ export const RuntimeStrategyCard = ({
|
|
|
132
131
|
shadow="sm"
|
|
133
132
|
borderWidth="1px"
|
|
134
133
|
borderColor={strategy.connected ? 'gray.800' : 'orange.900'}
|
|
135
|
-
borderLeftWidth="4px"
|
|
136
|
-
borderLeftColor={deploymentPresentation.accent}
|
|
137
134
|
overflowX="auto"
|
|
138
135
|
>
|
|
139
|
-
<Flex gap=
|
|
140
|
-
<Flex
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
</Badge>
|
|
151
|
-
</Flex>
|
|
152
|
-
<Flex gap={3} alignItems="center" wrap="wrap">
|
|
153
|
-
<Text fontSize="xs" color="gray.400">
|
|
154
|
-
account: {strategy.accountLabel ?? strategy.accountId ?? 'none'}
|
|
155
|
-
</Text>
|
|
156
|
-
<Text fontSize="xs" color="gray.400">
|
|
157
|
-
version: {strategy.strategyPackageVersion}
|
|
158
|
-
</Text>
|
|
159
|
-
{strategy.generation ? (
|
|
160
|
-
<Text fontSize="xs" color="gray.400">
|
|
161
|
-
generation: {strategy.generation}
|
|
162
|
-
</Text>
|
|
163
|
-
) : null}
|
|
164
|
-
{typeof maxLossValue === 'number' &&
|
|
165
|
-
Number.isFinite(maxLossValue) ? (
|
|
166
|
-
<Text fontSize="xs" color="gray.400">
|
|
167
|
-
max loss: {maxLossValue}
|
|
168
|
-
</Text>
|
|
169
|
-
) : null}
|
|
170
|
-
</Flex>
|
|
136
|
+
<Flex gap={2} p={4} mb={3} alignItems="baseline" whiteSpace="nowrap">
|
|
137
|
+
<Flex gap={2} alignItems="baseline" flexShrink={0}>
|
|
138
|
+
<Text fontSize="lg" fontWeight="bold" color="gray.200">
|
|
139
|
+
{strategy.strategyName}
|
|
140
|
+
</Text>
|
|
141
|
+
<Badge
|
|
142
|
+
colorPalette={deploymentPresentation.colorPalette}
|
|
143
|
+
variant="subtle"
|
|
144
|
+
>
|
|
145
|
+
{strategy.deploymentLabel}
|
|
146
|
+
</Badge>
|
|
171
147
|
</Flex>
|
|
172
148
|
<Badge
|
|
173
149
|
colorPalette={strategy.enabled ? 'teal' : 'gray'}
|
|
@@ -187,8 +163,8 @@ export const RuntimeStrategyCard = ({
|
|
|
187
163
|
<Badge colorPalette="cyan" variant="outline">
|
|
188
164
|
TF: {strategy.interval}m
|
|
189
165
|
</Badge>
|
|
190
|
-
<Flex gap="1">
|
|
191
|
-
<Text fontSize="sm" fontWeight="bold" color="gray.400"
|
|
166
|
+
<Flex gap="1" alignItems="baseline" flexShrink={0}>
|
|
167
|
+
<Text fontSize="sm" fontWeight="bold" color="gray.400">
|
|
192
168
|
connector:
|
|
193
169
|
</Text>
|
|
194
170
|
<Text fontSize="lg" fontWeight="bold" color="gray.200">
|
|
@@ -196,8 +172,8 @@ export const RuntimeStrategyCard = ({
|
|
|
196
172
|
</Text>
|
|
197
173
|
</Flex>
|
|
198
174
|
|
|
199
|
-
<Flex gap="1">
|
|
200
|
-
<Text fontSize="sm" fontWeight="bold" color="gray.400"
|
|
175
|
+
<Flex gap="1" alignItems="baseline" flexShrink={0}>
|
|
176
|
+
<Text fontSize="sm" fontWeight="bold" color="gray.400">
|
|
201
177
|
trades:
|
|
202
178
|
</Text>
|
|
203
179
|
<Text fontSize="lg" fontWeight="bold" color="gray.200">
|
|
@@ -205,8 +181,8 @@ export const RuntimeStrategyCard = ({
|
|
|
205
181
|
</Text>
|
|
206
182
|
</Flex>
|
|
207
183
|
|
|
208
|
-
<Flex gap="1">
|
|
209
|
-
<Text fontSize="sm" fontWeight="bold" color="gray.400"
|
|
184
|
+
<Flex gap="1" alignItems="baseline" flexShrink={0}>
|
|
185
|
+
<Text fontSize="sm" fontWeight="bold" color="gray.400">
|
|
210
186
|
active:
|
|
211
187
|
</Text>
|
|
212
188
|
<Text
|
|
@@ -220,8 +196,15 @@ export const RuntimeStrategyCard = ({
|
|
|
220
196
|
</Text>
|
|
221
197
|
</Flex>
|
|
222
198
|
|
|
223
|
-
<Flex
|
|
224
|
-
|
|
199
|
+
<Flex
|
|
200
|
+
ml="auto"
|
|
201
|
+
gap={3}
|
|
202
|
+
alignItems="baseline"
|
|
203
|
+
justifyContent="flex-end"
|
|
204
|
+
minW={0}
|
|
205
|
+
flex={1}
|
|
206
|
+
>
|
|
207
|
+
<Text fontSize="sm" color="gray.500" truncate>
|
|
225
208
|
{lastTrade
|
|
226
209
|
? `last trade: ${lastTrade.symbol} ${formatDateTime(lastTrade.entryTimestamp)}`
|
|
227
210
|
: strategy.connected
|
|
@@ -231,7 +214,7 @@ export const RuntimeStrategyCard = ({
|
|
|
231
214
|
|
|
232
215
|
<Menu.Root positioning={{ placement: 'bottom-end' }}>
|
|
233
216
|
<Menu.Trigger asChild>
|
|
234
|
-
<Button size="sm" variant="outline">
|
|
217
|
+
<Button size="sm" variant="outline" flexShrink={0}>
|
|
235
218
|
Actions
|
|
236
219
|
</Button>
|
|
237
220
|
</Menu.Trigger>
|
|
@@ -99,8 +99,8 @@ export const RuntimeStrategyRevisionsDrawer = ({
|
|
|
99
99
|
overflowY="auto"
|
|
100
100
|
>
|
|
101
101
|
<Text color="gray.400">
|
|
102
|
-
Current revision and all revision
|
|
103
|
-
selected
|
|
102
|
+
Current revision and all revision activations observed by the
|
|
103
|
+
runtime in the selected window.
|
|
104
104
|
</Text>
|
|
105
105
|
|
|
106
106
|
{revisions.map((revision) => (
|
|
@@ -137,8 +137,8 @@ export const RuntimeStrategyRevisionsDrawer = ({
|
|
|
137
137
|
</Text>
|
|
138
138
|
<Text mt={2} fontSize="xs" color="gray.500">
|
|
139
139
|
{revision.changedAt == null
|
|
140
|
-
? 'No revision
|
|
141
|
-
: `
|
|
140
|
+
? 'No revision activation observed in this window'
|
|
141
|
+
: `Activated at ${formatDateTime(revision.changedAt)}`}
|
|
142
142
|
</Text>
|
|
143
143
|
</Box>
|
|
144
144
|
))}
|
|
@@ -239,6 +239,7 @@ const RuntimeStrategiesContent = () => {
|
|
|
239
239
|
})
|
|
240
240
|
.sort(
|
|
241
241
|
(left, right) =>
|
|
242
|
+
right.stat.netProfit - left.stat.netProfit ||
|
|
242
243
|
left.strategyName.localeCompare(right.strategyName) ||
|
|
243
244
|
left.deploymentLabel.localeCompare(right.deploymentLabel),
|
|
244
245
|
);
|