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],