일목균형표 전략 추가
This commit is contained in:
@@ -44,6 +44,14 @@ import {
|
||||
inferInflection33FilterLevel,
|
||||
inflection33FilterLevelLabel,
|
||||
} from '../utils/inflection33Strategy';
|
||||
import {
|
||||
buildIchimokuBbTree,
|
||||
isIchimokuBbPairRoot,
|
||||
isIchimokuBbPaletteValue,
|
||||
ichimokuBbDisplayName,
|
||||
ichimokuBbSummaryText,
|
||||
inferIchimokuBbConfig,
|
||||
} from '../utils/ichimokuBbStrategy';
|
||||
import {
|
||||
buildStableStrategyTree,
|
||||
isStableStrategyPairRoot,
|
||||
@@ -704,18 +712,18 @@ function buildFieldOptsForSlot(
|
||||
return slot === 'right'
|
||||
? [
|
||||
NONE,
|
||||
{ value: 'UPPER_BAND', label: `상단밴드(${DEF.bbPeriod}일, σ${DEF.bbStdDev})` },
|
||||
{ value: 'MIDDLE_BAND', label: `중심선(${DEF.bbPeriod}일)` },
|
||||
{ value: 'LOWER_BAND', label: `하단밴드(${DEF.bbPeriod}일, σ${DEF.bbStdDev})` },
|
||||
{ value: 'UPPER_BAND', label: `상한선(${DEF.bbPeriod}일, σ${DEF.bbStdDev})` },
|
||||
{ value: 'MIDDLE_BAND', label: `중앙값(${DEF.bbPeriod}일)` },
|
||||
{ value: 'LOWER_BAND', label: `하한선(${DEF.bbPeriod}일, σ${DEF.bbStdDev})` },
|
||||
{ value: 'CLOSE_PRICE', label: '종가' },
|
||||
{ value: 'OPEN_PRICE', label: '시가' },
|
||||
{ value: 'HIGH_PRICE', label: '고가' },
|
||||
{ value: 'LOW_PRICE', label: '저가' },
|
||||
]
|
||||
: [
|
||||
{ value: 'UPPER_BAND', label: `상단밴드(${DEF.bbPeriod}일, σ${DEF.bbStdDev})` },
|
||||
{ value: 'MIDDLE_BAND', label: `중심선(${DEF.bbPeriod}일)` },
|
||||
{ value: 'LOWER_BAND', label: `하단밴드(${DEF.bbPeriod}일, σ${DEF.bbStdDev})` },
|
||||
{ value: 'UPPER_BAND', label: `상한선(${DEF.bbPeriod}일, σ${DEF.bbStdDev})` },
|
||||
{ value: 'MIDDLE_BAND', label: `중앙값(${DEF.bbPeriod}일)` },
|
||||
{ value: 'LOWER_BAND', label: `하한선(${DEF.bbPeriod}일, σ${DEF.bbStdDev})` },
|
||||
{ value: 'CLOSE_PRICE', label: '종가' },
|
||||
{ value: 'OPEN_PRICE', label: '시가' },
|
||||
{ value: 'HIGH_PRICE', label: '고가' },
|
||||
@@ -985,6 +993,10 @@ export const nodeToText = (node: LogicNode, DEF: DefType = DEF_DEFAULTS): string
|
||||
const level = inferInflection33FilterLevel(node);
|
||||
return `${inflection33DisplayName(mode, period)} [필터:${inflection33FilterLevelLabel(level)}]\n${inflection33SummaryText(mode, period, level)}`;
|
||||
}
|
||||
if (isIchimokuBbPairRoot(node) && node.ichimokuBbPair?.mode === 'buy') {
|
||||
const cfg = inferIchimokuBbConfig(node);
|
||||
return `${ichimokuBbDisplayName(cfg.mode, cfg.chikouDisplacement)}\n${ichimokuBbSummaryText(cfg)}`;
|
||||
}
|
||||
if (isPriceExtremeBreakoutPairRoot(node) && node.priceExtremePair) {
|
||||
const { mode, shortPeriod, longPeriod } = node.priceExtremePair;
|
||||
const level = inferPriceExtremeFilterLevel(node);
|
||||
@@ -1004,6 +1016,10 @@ export const nodeToText = (node: LogicNode, DEF: DefType = DEF_DEFAULTS): string
|
||||
const level = inferInflection33FilterLevel(node);
|
||||
return `${inflection33DisplayName(mode, period)} [필터:${inflection33FilterLevelLabel(level)}]\n${inflection33SummaryText(mode, period, level)}`;
|
||||
}
|
||||
if (isIchimokuBbPairRoot(node) && node.ichimokuBbPair?.mode === 'sell') {
|
||||
const cfg = inferIchimokuBbConfig(node);
|
||||
return `${ichimokuBbDisplayName(cfg.mode, cfg.chikouDisplacement)}\n${ichimokuBbSummaryText(cfg)}`;
|
||||
}
|
||||
if (isStochOverboughtPairRoot(node)) {
|
||||
const sec = node.stochPair!.secondaryIndicatorType;
|
||||
return `${stochPairDisplayName(sec)}\n${stochPairSummaryText(sec)}`;
|
||||
@@ -1527,6 +1543,8 @@ export type MakeNodeOptions = {
|
||||
priceExtremeBreakout?: boolean;
|
||||
/** 33변곡 EMA+채널 복합 */
|
||||
inflection33?: boolean;
|
||||
/** 일목 후행×볼린저 복합 */
|
||||
ichimokuBb?: boolean;
|
||||
/** 추천 안정형 전략 복합 */
|
||||
stableStrategy?: boolean;
|
||||
};
|
||||
@@ -1537,6 +1555,7 @@ export function makeNodeOptionsFromPalette(data: {
|
||||
stochPair?: boolean;
|
||||
priceExtremeBreakout?: boolean;
|
||||
inflection33?: boolean;
|
||||
ichimokuBb?: boolean;
|
||||
stableStrategy?: boolean;
|
||||
secondaryIndicator?: string;
|
||||
period?: number;
|
||||
@@ -1558,6 +1577,9 @@ export function makeNodeOptionsFromPalette(data: {
|
||||
if (data.inflection33 || (data.value && isInflection33PaletteValue(data.value))) {
|
||||
return { inflection33: true };
|
||||
}
|
||||
if (data.ichimokuBb || (data.value && isIchimokuBbPaletteValue(data.value))) {
|
||||
return { ichimokuBb: true };
|
||||
}
|
||||
if (data.stableStrategy || (data.value && isStableStrategyPaletteValue(data.value))) {
|
||||
return { stableStrategy: true };
|
||||
}
|
||||
@@ -1590,6 +1612,10 @@ export const makeNode = (
|
||||
const tree = buildInflection33Tree(value, DEF);
|
||||
if (tree) return tree;
|
||||
}
|
||||
if (options?.ichimokuBb || isIchimokuBbPaletteValue(value)) {
|
||||
const tree = buildIchimokuBbTree(value, DEF);
|
||||
if (tree) return tree;
|
||||
}
|
||||
if (options?.stableStrategy || isStableStrategyPaletteValue(value)) {
|
||||
const tree = buildStableStrategyTree(value, DEF);
|
||||
if (tree) return tree;
|
||||
|
||||
Reference in New Issue
Block a user