18 lines
704 B
Python
18 lines
704 B
Python
|
|
import asyncio, json, sys
|
||
|
|
sys.path.insert(0, '.')
|
||
|
|
from app.main import load_env; load_env()
|
||
|
|
from app.monitor.notifier import send
|
||
|
|
|
||
|
|
ctx = json.load(open('data/midday_context.json', encoding='utf-8'))
|
||
|
|
hot = ', '.join(ctx.get('hot_sectors', [])) or '없음'
|
||
|
|
avoid = ', '.join(ctx.get('avoid_sectors', [])) or '없음'
|
||
|
|
flag = '✅ 점심진입허용' if ctx.get('lunch_trade_allowed', True) else '🚫 점심진입중단'
|
||
|
|
msg = (
|
||
|
|
f'[장중분석] {ctx["date"]} {ctx.get("generated_at","")}\n'
|
||
|
|
f'{flag} | 포지션배율: x{ctx.get("position_size_multiplier", 1.0)}\n'
|
||
|
|
f'주목: {hot} | 회피: {avoid}\n'
|
||
|
|
f'📝 {ctx.get("reason","")}'
|
||
|
|
)
|
||
|
|
asyncio.run(send(msg))
|
||
|
|
print('Discord 전송 완료')
|