일목균형표 수정

This commit is contained in:
Macbook
2026-05-27 23:36:48 +09:00
parent 9cee6387c3
commit 8cc0d1c88c
73 changed files with 2256 additions and 334 deletions
@@ -55,6 +55,28 @@ class StrategyConditionTimeframeServiceTest {
assertFalse(service.usesTimeframe(1L, "1m"));
}
@Test
void collectForStrategy_readsMultipleCandleTypesFromTimeframeNode() {
GcStrategy multi = new GcStrategy();
multi.setId(3L);
multi.setBuyConditionJson("""
{
"type": "TIMEFRAME",
"candleType": "1m",
"candleTypes": ["1m", "3m", "5m"],
"children": [{
"type": "CONDITION",
"condition": { "indicatorType": "RSI", "period": 14 }
}]
}
""");
when(strategyRepo.findById(3L)).thenReturn(Optional.of(multi));
Set<String> tfs = service.collectForStrategy(3L);
assertEquals(Set.of("1m", "3m", "5m"), tfs);
assertTrue(service.usesTimeframe(3L, "3m"));
}
@Test
void collectForStrategy_legacyTreeDefaultsTo1m() {
GcStrategy legacy = new GcStrategy();