chore: update gitignore — untrack .claude/, ignore runtime data & logs

- Untrack .claude/settings.local.json (IDE-specific)
- Gitignore: data/bot_status.json, signal_persistence.json, model_metrics.json
- Gitignore: logs/ (all content, not just *.log)
- Gitignore: backtests/.claude/
- Add scripts/check_trade_detail.py utility
- Update data/risk_state.txt to current state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
GifariKemal
2026-02-09 07:56:48 +07:00
parent b9e283878a
commit 71b9bcc472
4 changed files with 60 additions and 67 deletions
-59
View File
@@ -1,59 +0,0 @@
{
"permissions": {
"allow": [
"mcp__filesystem__directory_tree",
"mcp__filesystem__read_multiple_files",
"WebSearch",
"WebFetch(domain:github.com)",
"WebFetch(domain:docs.pola.rs)",
"mcp__filesystem__create_directory",
"mcp__filesystem__write_file",
"Bash(pip install:*)",
"Bash(python:*)",
"Bash(dir:*)",
"Bash(ping:*)",
"Bash(findstr:*)",
"Bash(timeout /t 5 /nobreak)",
"Bash(more:*)",
"Bash(taskkill:*)",
"Bash(powershell -Command:*)",
"Bash(timeout:*)",
"Bash(tasklist:*)",
"mcp__filesystem__list_allowed_directories",
"mcp__filesystem__list_directory",
"mcp__filesystem__read_text_file",
"Bash(docker:*)",
"Bash(where:*)",
"mcp__filesystem__list_directory_with_sizes",
"Bash(docker-compose up:*)",
"Bash(start python:*)",
"WebFetch(domain:ttkbootstrap.readthedocs.io)",
"mcp__shadcn__get_project_registries",
"mcp__shadcn__search_items_in_registries",
"mcp__shadcn__list_items_in_registries",
"Bash(npx create-next-app@latest . --typescript --tailwind --eslint --app --src-dir --import-alias \"@/*\" --use-npm)",
"Bash(npx --yes create-next-app@latest . --ts --tailwind --eslint --app --src-dir --import-alias \"@/*\" --use-npm --turbopack --yes)",
"Bash(npx:*)",
"Bash(npm install:*)",
"Bash(npm run build:*)",
"Bash(curl:*)",
"Bash(netstat:*)",
"Bash(start http://localhost:3000)",
"Bash(start \"Trading Bot\" cmd /k \"python main_live.py\")",
"Bash(grep:*)",
"Bash(git init:*)",
"Bash(git branch:*)",
"Bash(git add:*)",
"Bash(git rm:*)",
"Bash(Remove-Item -Recurse -Force \"web-dashboard\\\\.git\" -ErrorAction SilentlyContinue)",
"Bash(git commit:*)",
"Bash(gh repo create:*)",
"mcp__git__git_status",
"Bash(git push:*)"
]
},
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": [
"shadcn"
]
}
+9 -3
View File
@@ -41,9 +41,8 @@ env/
*.swo
*~
# Logs (keep structure, ignore content)
logs/*.log
logs/**/*.log
# Logs (ignore all content)
logs/
# Data files (large)
data/market_data/
@@ -86,6 +85,13 @@ archive/
bot.pid
bot_output.log
nul
data/bot_status.json
data/signal_persistence.json
data/model_metrics.json
# Claude Code local settings
.claude/
backtests/.claude/
# Screenshots
*.png
+6 -5
View File
@@ -1,5 +1,6 @@
date:2026-02-06
daily_loss:177.60000000000002
daily_profit:21.73
consecutive_losses:2
total_loss:155.87
date:2026-02-09
daily_loss:0.0
daily_profit:7.17
consecutive_losses:0
total_loss:0
saved_at:2026-02-09T07:08:09.193663+07:00
+45
View File
@@ -0,0 +1,45 @@
"""Quick script to check trade #158666685 details."""
import sys, os
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import MetaTrader5 as mt5
from datetime import datetime
from dotenv import load_dotenv
load_dotenv()
mt5.initialize(os.getenv('MT5_PATH'))
mt5.login(int(os.getenv('MT5_LOGIN')), os.getenv('MT5_PASSWORD'), os.getenv('MT5_SERVER'))
from_date = datetime(2026, 2, 7)
to_date = datetime(2026, 2, 10)
deals = mt5.history_deals_get(from_date, to_date)
if deals:
for d in deals:
if d.position_id == 158666685:
deal_type = 'BUY' if d.type == 0 else 'SELL'
entry = 'IN' if d.entry == 0 else 'OUT'
t = datetime.fromtimestamp(d.time)
print(f"Ticket: {d.ticket} | Position: {d.position_id}")
print(f" Time: {t} (WIB: {t.hour+7 if t.hour+7<24 else t.hour+7-24}:{t.minute:02d})")
print(f" Type: {deal_type} | Entry: {entry}")
print(f" Price: {d.price} | Volume: {d.volume}")
print(f" Profit: ${d.profit:.2f} | Commission: ${d.commission:.2f}")
print(f" Comment: {d.comment}")
print()
# Also check recent orders for context
orders = mt5.history_orders_get(from_date, to_date)
if orders:
for o in orders:
if o.position_id == 158666685:
t = datetime.fromtimestamp(o.time_setup)
order_type = 'BUY' if o.type == 0 else 'SELL'
print(f"Order: {o.ticket} | Position: {o.position_id}")
print(f" Setup: {t}")
print(f" Type: {order_type} | Price: {o.price_open}")
print(f" SL: {o.sl} | TP: {o.tp}")
print(f" Comment: {o.comment}")
print()
mt5.shutdown()