n봉 침체 터치 조건 추가
This commit is contained in:
@@ -288,6 +288,28 @@ class ComplexStrategyDslAdapterTest {
|
||||
assertDoesNotThrow(() -> rule.isSatisfied(primary1m.getEndIndex(), null));
|
||||
}
|
||||
|
||||
@Test
|
||||
void stochLowestLte_compilesAndEvaluates() throws Exception {
|
||||
JsonNode cond = MAPPER.readTree("""
|
||||
{
|
||||
"id": "c-stoch-lowest",
|
||||
"type": "CONDITION",
|
||||
"condition": {
|
||||
"indicatorType": "STOCHASTIC",
|
||||
"conditionType": "LOWEST_LTE",
|
||||
"leftField": "STOCH_K",
|
||||
"rightField": "HL_UNDER",
|
||||
"lookbackPeriod": 20,
|
||||
"candleRange": 1
|
||||
}
|
||||
}
|
||||
""");
|
||||
|
||||
Rule rule = adapter.toRule(cond, primary1m, Map.of());
|
||||
assertNotNull(rule);
|
||||
assertDoesNotThrow(() -> evaluateRange(rule, primary1m.getEndIndex()));
|
||||
}
|
||||
|
||||
// ── helpers ────────────────────────────────────────────────────────────────
|
||||
|
||||
private static void evaluateRange(Rule rule, int endIndex) {
|
||||
|
||||
Reference in New Issue
Block a user