From 8296610d2e715ad99df06d813ab3043357bfb003 Mon Sep 17 00:00:00 2001 From: bangae1 Date: Mon, 1 Sep 2025 21:07:24 +0900 Subject: [PATCH] =?UTF-8?q?tp=20=EB=B2=94=EC=9C=84=20=EC=A1=B0=EC=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- strategy.js | 70 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/strategy.js b/strategy.js index 37d0afb..180e5cf 100644 --- a/strategy.js +++ b/strategy.js @@ -3,42 +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 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 은 한국어로 대답해줘.`, + "1h": `BTC/USDT 1시간 스윙 트레이딩 엔진입니다. + - 시간대: 1시간 캔들만. + - 일일 거래 빈도 목표: ≥ 3개의 유효 설정. + - 거래당 위험: 계좌 잔액의 1% 이하. + - 동시에 2개 이상의 포지션을 보유하지 마십시오. + - 최종 JSON 외부에 해설을 추가하지 마십시오. + + [입력] + 최근 1시간 캔들 50개(최근 캔들 순, 형식: + [{"t":,"o":,"h":,"l":,"c":,"v":}, …] + + LONG: + - 9-EMA > 21-EMA (둘 다 상승). + - RSI14가 40~60 사이이고 이전 캔들 대비 상승하는 경우. + - Close ≥ VWAP. + - Close ≤ 스윙 고점 - ATR14×0.5 (작은 하락 구간). + + SHORT: + - 9-EMA < 21-EMA (둘 다 하락). + - RSI14가 40~60 사이이고 이전 캔들 대비 하락하는 경우. + - Close ≤ VWAP. + - Close ≥ 스윙 저점 + ATR14×0.5 (작은 하락 구간). + + HOLD: + - 매수 또는 매도 조건이 모두 충족되지 않는 경우. + + JSON만 반환하며, 콜론 뒤에 공백은 포함하지 않습니다. + {"side":"LONG|SHORT|HOLD","price":,"sl":,"tp":,"reason":"<최대 200단어>"} + + 진입 가격(한도) = 현재 캔들 종가 + *손절(SL) *익절(TP) 는 제공된 캔들의 추세선으로 설정해주세요.(중요) + 모든 가격을 가장 가까운 0.1 USDT로 반올림하세요. + + reason 은 한국어로 대답해줘.`, '15m': `당신은 2025년 기준 코인 선물 **15분봉 전문 트레이더**입니다. 15분 단위로 신속한 진입/청산이 필수적이며, **2~3배 레버리지**로 고빈도 수익을 추구합니다. 다음 규칙을 철저히 적용하세요. ### 📌 핵심 분석 지표 (15분봉 최적화) - **롱 진입 조건** (2가지 충족 시):