n봉 침체 터치 조건 추가
This commit is contained in:
@@ -36,6 +36,8 @@ public class LiveConditionStatusService {
|
||||
Map.entry("CROSS_UP", "상향 돌파"),
|
||||
Map.entry("CROSS_DOWN", "하향 돌파"),
|
||||
Map.entry("SLOPE_UP", "상승 중"),
|
||||
Map.entry("LOWEST_LTE", "N봉 최저 ≤"),
|
||||
Map.entry("LOWEST_GTE", "N봉 최저 ≥"),
|
||||
Map.entry("SLOPE_DOWN", "하락 중")
|
||||
);
|
||||
|
||||
|
||||
@@ -411,6 +411,7 @@ public class StrategyDslToTa4jAdapter {
|
||||
int rightPeriod = cond.path("rightPeriod").asInt(-1);
|
||||
int slopePeriod = cond.path("slopePeriod").asInt(3);
|
||||
int holdDays = cond.path("holdDays").asInt(3);
|
||||
int lookbackPeriod = cond.path("lookbackPeriod").asInt(20);
|
||||
|
||||
if (needsCrossTimeframeComposite(cond, ctx)) {
|
||||
return buildCrossTimeframeCompositeRule(cond, ctx);
|
||||
@@ -468,6 +469,16 @@ public class StrategyDslToTa4jAdapter {
|
||||
new ConstantIndicator<>(series, series.numFactory().numOf(v)));
|
||||
}
|
||||
case "HOLD_N_DAYS" -> buildHoldRule(new OverIndicatorRule(left, right), holdDays);
|
||||
case "LOWEST_LTE" -> {
|
||||
Indicator<Num> rollingMin = new LowestValueIndicator(left, lookbackPeriod);
|
||||
yield new OrRule(new UnderIndicatorRule(rollingMin, right),
|
||||
buildEqRule(rollingMin, right, series));
|
||||
}
|
||||
case "LOWEST_GTE" -> {
|
||||
Indicator<Num> rollingMin = new LowestValueIndicator(left, lookbackPeriod);
|
||||
yield new OrRule(new OverIndicatorRule(rollingMin, right),
|
||||
buildEqRule(rollingMin, right, series));
|
||||
}
|
||||
// ── 일목균형표 전용 ────────────────────────────────────────────
|
||||
case "ABOVE_CLOUD" -> buildCloudAboveRule(series, indParams);
|
||||
case "BELOW_CLOUD" -> buildCloudBelowRule(series, indParams);
|
||||
|
||||
Reference in New Issue
Block a user