프롬프트 수정

This commit is contained in:
2025-08-31 07:05:50 +09:00
parent f4d3ff9e33
commit c00fd8a0ff
2 changed files with 5 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
import logger from './logger.js'; import logger from './logger.js';
import {OpenAI} from "openai"; import {OpenAI} from "openai";
const prompts = { const prompts = {
"1h": `You are a BTC/USDT 1-hour swing-trading engine. "1h": `You are a BTC/USDT 1-hour swing-trading engine.
- Timeframe: 1h candles only. - Timeframe: 1h candles only.
- Daily trade frequency target: ≥ 3 valid setups. - Daily trade frequency target: ≥ 3 valid setups.
@@ -82,6 +82,8 @@ const openai = new OpenAI({
apiKey: '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', apiKey: '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',
}); });
export async function aiSignal(bars) { export async function aiSignal(bars) {
if (bars.length < 20) return null; if (bars.length < 20) return null;
console.log(Date.now()) console.log(Date.now())
@@ -91,7 +93,7 @@ export async function aiSignal(bars) {
${JSON.stringify(bars)} ${JSON.stringify(bars)}
`; `;
const completion = await openai.chat.completions.create({ const completion = await openai.chat.completions.create({
model: 'qwen/qwen3-235b-a22b-2507', model: 'qwen/qwen3-coder',
messages: [ messages: [
{ {
role: 'user', role: 'user',

View File

@@ -11,7 +11,7 @@ const ex = new ccxt.bybit({
options: { defaultType: 'swap' } 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 => ({ const bars = ohlcv.map(c => ({
t: c[0], t: c[0],
o: c[1], o: c[1],