일목균형표 수정
This commit is contained in:
@@ -181,7 +181,12 @@ function describeNode(
|
||||
|
||||
if (node.type === 'TIMEFRAME') {
|
||||
const inner = node.children?.[0];
|
||||
const tf = candleKo(node.candleType ?? '1m');
|
||||
const types = node.candleTypes?.length
|
||||
? node.candleTypes
|
||||
: [node.candleType ?? '1m'];
|
||||
const tf = types.length > 1
|
||||
? types.map(candleKo).join(', ')
|
||||
: candleKo(types[0]);
|
||||
if (!inner) return [`[${tf}] 연결된 조건이 없습니다.`];
|
||||
const innerLines = describeNode(inner, signalType, def, depth + 1);
|
||||
return [`[${tf} 기준]`, ...innerLines.map(l => (l.startsWith('•') ? ` ${l}` : ` • ${l}`))];
|
||||
@@ -248,9 +253,15 @@ function describeSignalBranches(
|
||||
const paragraphs: string[] = [];
|
||||
|
||||
if (active.length === 1) {
|
||||
const { candleType, root } = active[0];
|
||||
const tf = candleKo(candleType);
|
||||
paragraphs.push(`${tf} 차트를 기준으로 아래 조건을 평가합니다.`);
|
||||
const { candleType, candleTypes, root } = active[0];
|
||||
const tf = candleTypes && candleTypes.length > 1
|
||||
? candleTypes.map(candleKo).join(', ')
|
||||
: candleKo(candleType);
|
||||
paragraphs.push(
|
||||
candleTypes && candleTypes.length > 1
|
||||
? `${tf} 각 시간봉 마감 시점마다 아래 조건을 독립적으로 평가합니다.`
|
||||
: `${tf} 차트를 기준으로 아래 조건을 평가합니다.`,
|
||||
);
|
||||
bullets.push(...describeNode(root!, signalType, def));
|
||||
return { hasContent: true, paragraphs, bullets };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user