From c00fd8a0fff27223b2fe31532711ac29dbfe4ba1 Mon Sep 17 00:00:00 2001 From: bangae1 Date: Sun, 31 Aug 2025 07:05:50 +0900 Subject: [PATCH] =?UTF-8?q?=ED=94=84=EB=A1=AC=ED=94=84=ED=8A=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- strategy.js | 6 ++++-- test.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/strategy.js b/strategy.js index bbc8123..1802726 100644 --- a/strategy.js +++ b/strategy.js @@ -2,7 +2,7 @@ import logger from './logger.js'; import {OpenAI} from "openai"; - const prompts = { +const prompts = { "1h": `You are a BTC/USDT 1-hour swing-trading engine. - Timeframe: 1h candles only. - Daily trade frequency target: ≥ 3 valid setups. @@ -82,6 +82,8 @@ const openai = new OpenAI({ apiKey: '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', }); + + export async function aiSignal(bars) { if (bars.length < 20) return null; console.log(Date.now()) @@ -91,7 +93,7 @@ export async function aiSignal(bars) { ${JSON.stringify(bars)} `; const completion = await openai.chat.completions.create({ - model: 'qwen/qwen3-235b-a22b-2507', + model: 'qwen/qwen3-coder', messages: [ { role: 'user', diff --git a/test.js b/test.js index f0e6d05..66f241b 100644 --- a/test.js +++ b/test.js @@ -11,7 +11,7 @@ const ex = new ccxt.bybit({ options: { defaultType: 'swap' } }); -const ohlcv = await ex.fetchOHLCV(cfg.cctxSymbol, cfg.ohlcvInterval, undefined, 672); +const ohlcv = await ex.fetchOHLCV(cfg.cctxSymbol, cfg.ohlcvInterval, undefined, 50); const bars = ohlcv.map(c => ({ t: c[0], o: c[1],