Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3d63b84

Browse files
fix: snake_case instead of camelCase
1 parent 30f3377 commit 3d63b84

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

‎composer.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Command/BacktestingCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ private function displayTradesLog(SymfonyStyle $io, array $closedTrades): void
188188
$trade['tradeNumber'],
189189
$trade['symbol'],
190190
ucfirst($trade['direction']),
191-
implode(', ', $trade['enter_tags'] ?? []),
192-
implode(', ', $trade['exit_tags'] ?? []),
191+
implode(', ', $trade['enterTags'] ?? []),
192+
implode(', ', $trade['exitTags'] ?? []),
193193
$trade['entryTime'],
194194
$trade['exitTime'],
195195
$this->formatNumber($trade['quantity'], self::DISPLAY_SCALE_QTY),

‎src/Domain/Backtesting/Service/StatisticsService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public function calculate(array $results): array
6464

6565
return [
6666
'pairStats' => empty($closedTrades) ? [] : array_values($this->calculateGroupedStats($closedTrades, 'symbol')),
67-
'enterTagStats' => empty($closedTrades) ? [] : array_values($this->calculateGroupedStats($closedTrades, 'enter_tags')),
68-
'exitTagStats' => empty($closedTrades) ? [] : array_values($this->calculateGroupedStats($closedTrades, 'exit_tags')),
67+
'enterTagStats' => empty($closedTrades) ? [] : array_values($this->calculateGroupedStats($closedTrades, 'enterTags')),
68+
'exitTagStats' => empty($closedTrades) ? [] : array_values($this->calculateGroupedStats($closedTrades, 'exitTags')),
6969
'summaryMetrics' => $summary,
7070
];
7171
}

‎tests/Domain/Backtesting/Service/StatisticsServiceTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ private function getMockResults(): array
4646
'symbol' => 'BTC/USDT', 'pnl' => '100',
4747
'entryTime' => '2024年01月01日 10:00:00', 'exitTime' => '2024年01月01日 11:00:00',
4848
'quantity' => '1', 'entryPrice' => '1000',
49-
'enter_tags' => ['ema_cross'], 'exit_tags' => ['exit_signal'],
49+
'enterTags' => ['ema_cross'], 'exitTags' => ['exit_signal'],
5050
],
5151
[
5252
'symbol' => 'BTC/USDT', 'pnl' => '-50',
5353
'entryTime' => '2024年01月02日 10:00:00', 'exitTime' => '2024年01月02日 10:30:00',
5454
'quantity' => '1', 'entryPrice' => '1100',
55-
'enter_tags' => ['ema_cross', 'rsi_confirm'], 'exit_tags' => ['stop_loss'],
55+
'enterTags' => ['ema_cross', 'rsi_confirm'], 'exitTags' => ['stop_loss'],
5656
],
5757
[
5858
'symbol' => 'BTC/USDT', 'pnl' => '200',
5959
'entryTime' => '2024年01月03日 10:00:00', 'exitTime' => '2024年01月03日 12:00:00',
6060
'quantity' => '1', 'entryPrice' => '1050',
61-
'enter_tags' => ['rsi_confirm'], 'exit_tags' => ['take_profit'],
61+
'enterTags' => ['rsi_confirm'], 'exitTags' => ['take_profit'],
6262
],
6363
];
6464

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /