UNPKG

@gabriel3615/ta_analysis

Version:

stock ta analysis

78 lines (77 loc) 2.39 kB
export let chipConfig = { buy: { concentration: { high: 15, medium: 10, low: 5 }, bullBear: { strongBull: 15, moderateBull: 10, strongBear: -10, strongBullRatio: 3, moderateBullRatio: 1.5, strongBearRatio: 0.5, }, resistance: { weak: 20, medium: 10 }, shapeBuy: 20, volume: { shrinkStrong: 10, expandSmall: 15, expandBreakout: 20, expandTop: -10, breakoutProfitThreshold: 30, topProfitThreshold: 60, }, migration: { strongUp: 10, slowUp: 15, strongDown: -10 }, technical: { strongBuy: 15, buy: 10, strongSell: -15, sell: -10 }, }, short: { concentration: { high: -15, medium: -5, low: 10 }, bullBear: { strongBear: 20, slightBear: 10, strongBull: -20, strongBearRatio: 0.5, slightBearRatio: 1, strongBullRatio: 3, }, resistance: { strong: 20, medium: 10, weak: -5 }, shapeAgainstBuy: 15, volume: { expandTop: 15, shrinkHigh: 10, expandBottom: -15, topProfitThreshold: 60, bottomProfitThreshold: 30, }, migration: { strongDown: 20, slowDown: 10, strongUp: -20, slowUp: -10 }, technical: { strongSell: 20, sell: 15, strongBuy: -20, buy: -15 }, rsi: { overbought: 15, oversold: -15, overboughtThreshold: 70, oversoldThreshold: 30, }, }, overall: { buyStrongThreshold: 60, buyVeryStrongThreshold: 80, shortStrongThreshold: 60, shortVeryStrongThreshold: 80, neutralLower: 40, neutralUpper: 60, biasDelta: 15, }, combine: { signalDiffThreshold: 20, alignmentStrongThreshold: 70, groupProximityThreshold: 0.02, }, }; export function updateChipConfig(partial) { chipConfig = { ...chipConfig, ...partial, buy: { ...chipConfig.buy, ...(partial.buy || {}) }, short: { ...chipConfig.short, ...(partial.short || {}) }, overall: { ...chipConfig.overall, ...(partial.overall || {}) }, combine: { ...chipConfig.combine, ...(partial.combine || {}) }, }; }