Files
quantumbotx/add_crypto_bot.py

42 lines
1.2 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import sys
import os
# Tambahkan direktori root ke sys.path agar bisa import modul core
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from core.db.queries import add_bot
def create_crypto_bot():
print("Creating Crypto Bot for CCXT...")
# Parameter Bot
name = "BTC-Scalper-CCXT"
market = "BTC/USDT" # Simbol standar CCXT (Binance)
lot_size = 0.001 # Sesuaikan dengan min order exchange
sl_pips = 50 # Dalam poin/pips (tergantung strategi)
tp_pips = 100
timeframe = "M15" # String timeframe standar
interval = 60 # Check interval seconds
strategy = "RSI Crossover" # Strategi yang sudah ada
# Tambahkan ke Database
bot_id = add_bot(
name=name,
market=market,
lot_size=lot_size,
sl_pips=sl_pips,
tp_pips=tp_pips,
timeframe=timeframe,
interval=interval,
strategy=strategy
)
if bot_id:
print(f"✅ Bot '{name}' berhasil dibuat dengan ID: {bot_id}")
print(f"️ Pastikan container berjalan dengan BROKER_TYPE=CCXT")
else:
print("❌ Gagal membuat bot.")
if __name__ == "__main__":
create_crypto_bot()