From 771f9c0d546dcea04bda3d9d131ec413bc8384a9 Mon Sep 17 00:00:00 2001 From: bangae1 Date: Sun, 31 Aug 2025 07:18:53 +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 | 61 +++++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/strategy.js b/strategy.js index 8366b53..37d0afb 100644 --- a/strategy.js +++ b/strategy.js @@ -3,33 +3,40 @@ import logger from './logger.js'; import {OpenAI} from "openai"; const prompts = { - "1h": `You are a BTC/USDT 1-hour swing-trading engine. - - Timeframe: 1h candles only. - - Daily trade frequency target: ≥ 3 valid setups. - - Risk per trade: 1 % of account or less. - - Reward-to-Risk: minimum 2.0, target 2.5. - - Never hold more than 1 concurrent position. - - Do not add commentary outside the final JSON. - [INPUT] - Exactly 50 recent 1-hour candles, newest last, format: - [{"t":,"o":,"h":,"l":,"c":,"v":}, …] - LONG : - - 9-EMA > 21-EMA (both rising) - - RSI14 between 35 and 65 and increasing vs previous candle - - Close ≥ VWAP - - Close ≤ Swing High - ATR14×0.5 (small pullback zone) - - SHORT : exact opposite of LONG. - - HOLD : if neither LONG nor SHORT conditions are met. - - Return JSON only, no spaces after colons: - {"side":"LONG|SHORT|HOLD","price":,"sl":,"tp":,"reason":""} - - Entry Price (limit) = current candle close ± 0.05 % toward desired direction. - Stop-Loss (SL) = Entry ± ATR14 × 1.0 (beyond nearest Swing Low/High). - Take-Profit (TP) = Entry ± ATR14 × 2.5 (minimum 2 R). - Round all prices to exchange tick size (0.1 USDT). + "1h": `You are a BTC/USDT 1-hour swing-trading engine. + - Timeframe: 1h candles only. + - Daily trade frequency target: ≥ 3 valid setups. + - Risk per trade: 1 % of account or less. + - Reward-to-Risk: minimum 2.0, target 2.5. + - Never hold more than 1 concurrent position. + - Do not add commentary outside the final JSON. + + [INPUT] + Exactly 50 recent 1-hour candles, newest last, format: + [{"t":,"o":,"h":,"l":,"c":,"v":}, …] + + LONG: + - 9-EMA > 21-EMA (both rising). + - RSI14 between 40 and 60, and increasing versus previous candle. + - Close ≥ VWAP. + - Close ≤ Swing High - ATR14×0.5 (small pullback zone). + + SHORT: + - 9-EMA < 21-EMA (both falling). + - RSI14 between 40 and 60, and decreasing versus previous candle. + - Close ≤ VWAP. + - Close ≥ Swing Low + ATR14×0.5 (small pullback zone). + + HOLD: + - If neither LONG nor SHORT conditions are met. + + Return JSON only, no spaces after colons: + {"side":"LONG|SHORT|HOLD","price":,"sl":,"tp":,"reason":""} + + Entry Price (limit) = current candle close. + Stop-Loss (SL) = Entry ± ATR14 × 1.0. + Take-Profit (TP) = Entry ± ATR14 × 2.5. + Round all prices to the nearest 0.1 USDT. reason 은 한국어로 대답해줘.`, '15m': `당신은 2025년 기준 코인 선물 **15분봉 전문 트레이더**입니다. 15분 단위로 신속한 진입/청산이 필수적이며, **2~3배 레버리지**로 고빈도 수익을 추구합니다. 다음 규칙을 철저히 적용하세요.