1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"repo": "andreapianidev/opentradingmt4bot", "files": {"install_python.sh": {"bb775201fd67f79fc12f4320e0a82073bc23abd5": {"t": 1785745945.9047704, "n": 4542, "h": "8200d761b3554f74", "c": "#!/bin/bash\n\n# ==========================================\n# OpenMT4TradingBot - Installation Script\n# ==========================================\n# Copyright (c) 2025 Immaginet Srl\n# \n# Script di installazione per i componenti Python di OpenMT4TradingBot\n\n# Colori per output più leggibile\nGREEN=\"\\033[0;32m\"\nBLUE=\"\\033[0;34m\"\nYELLOW=\"\\033[1;33m\"\nRED=\"\\033[0;31m\"\nRESET=\"\\033[0m\"\nBOLD=\"\\033[1m\"\n\n# Stampa il logo ASCII\necho -e \"${BLUE}${BOLD}\"\necho \" ____ __ __ _____ _ _ _____ _ _ ____ _ \"\necho \" / __ \\\\ | \\\\/ |_ _| || | |_ _| | (_) | _ \\\\ | | \"\necho \"| | | |_ __ ___ _ __ | \\\\ / | | | | || |_ | |_ __ __ _ __ _| |_ _ __ __ _| |_) | ___ | |_ \"\necho \"| | | | '_ \\\\ / _ \\\\ '_ \\\\| |\\\\/| | | | |__ _| | | '__/ _\\` |/ _\\` | | | '_ \\\\ / _\\` | _ < / _ \\\\| __|\"\necho \"| |__| | |_) | __/ | | | | | |_| |_ | | | | | | (_| | (_| | | | | | | (_| | |_) | (_) | |_ \"\necho \" \\\\____/| .__/ \\\\___|_| |_|_| |_|_____| |_| |_|_| \\\\__,_|\\\\__,_|_|_|_| |_|\\\\__, |____/ \\\\___/ \\\\__|\"\necho \" | | __/ | \"\necho \" |_| |___/ \"\necho -e \"${RESET}\"\necho -e \"${GREEN}============================== Installazione ==============================${RESET}\"\necho\n\n# Verifica che Python sia installato\nif ! command -v python3 &> /dev/null; then\n echo -e \"${RED}Python 3 non è installato. Per favore installalo prima di continuare.${RESET}\"\n exit 1\nfi\n\necho -e \"${GREEN}Python $(python3 --version | cut -d' ' -f2) trovato.${RESET}\"\n\n# Crea un ambiente virtuale (opzionale)\necho -e \"${YELLOW}Vuoi creare un ambiente virtuale Python? (consigliato) [s/n]: ${RESET}\"\nread -p \"\" create_venv\nif [[ $create_venv == \"s\" || $create_venv == \"S\" ]]; then\n echo -e \"${GREEN}Creazione dell'ambiente virtuale...${RESET}\"\n python3 -m venv venv\n \n # Attiva l'ambiente virtuale\n if [[ \"$OSTYPE\" == \"msys\" || \"$OSTYPE\" == \"win32\" ]]; then\n source venv/Scripts/activate\n else\n source venv/bin/activate\n fi\n \n echo -e \"${GREEN}Ambiente virtuale creato e attivato.${RESET}\"\nelse\n echo -e \"${YELLOW}Continuando senza ambiente virtuale. Assicurati che tutte le dipendenze siano installate globalmente.${RESET}\"\nfi\n\n# Installa le dipendenze\necho -e \"${GREEN}Installazione delle dipendenze...${RESET}\"\npip3 install -r python/requirements.txt\n\n# Crea la directory dei log se non esiste\nif [ ! -d \"logs\" ]; then\n echo -e \"${GREEN}Creazione della directory dei log...${RESET}\"\n mkdir -p logs\nfi\n\n# Verifica se è presente un file .env\nif [ ! -f .env ]; then\n echo -e \"${YELLOW}Creazione del file .env di esempio...${RESET}\"\n echo \"DEEPSEEK_API_KEY=your_api_key_here\" > .env\n echo \"DEEPSEEK_MODEL=deepseek-chat\" >> .env\n echo \"DEEPSEEK_API_BASE=https://api.deepseek.com/v1\" >> .env\n echo -e \"${YELLOW}File .env creato. Per favore modifica il file con la tua chiave API DeepSeek.${RESET}\"\nelse\n echo -e \"${GREEN}File .env già esistente.${RESET}\"\n \n # Verifica se contiene una chiave API valida\n DEEPSEEK_KEY=$(grep DEEPSEEK_API_KEY .env | cut -d= -f2)\n if [ \"$DEEPSEEK_KEY\" = \"your_api_key_here\" ] || [ -z \"$DEEPSEEK_KEY\" ]; then\n echo -e \"${RED}ATTENZIONE: Chiave API DeepSeek non configurata nel file .env${RESET}\"\n echo -e \"${RED}Alcune funzionalità potrebbero non essere disponibili.${RESET}\"\n else\n echo -e \"${GREEN}Configurazione DeepSeek trovata.${RESET}\"\n fi\nfi\n\n# Rendi eseguibile lo script di avvio\nchmod +x start_trading_bot.sh\n\n# Messaggio finale\necho -e \"\\n${GREEN}${BOLD}Installazione completata con successo!${RESET}\\n\"\necho -e \"${YELLOW}Per avviare il bot con l'interfaccia grafica:${RESET}\"\necho -e \" ${GREEN}./start_trading_bot.sh${RESET}\"\necho\necho -e \"${YELLOW}Per avviare manualmente i componenti:${RESET}\"\necho -e \" ${GREEN}python3 python/signal_engine.py${RESET} (Motore dei segnali)\"\necho -e \" ${GREEN}python3 python/chat_interface.py${RESET} (Interfaccia chat)\"\necho -e \" ${GREEN}python3 python/chat_interface.py --server --port 8000${RESET} (Server web)\"\necho\necho -e \"${BLUE}${BOLD}Vuoi avviare ora l'interfaccia di controllo? [s/n]${RESET}\"\nread -p \"\" start_now\nif [[ $start_now == \"s\" || $start_now == \"S\" ]]; then\n ./start_trading_bot.sh\nelse\n echo -e \"${GREEN}Puoi avviare l'interfaccia in qualsiasi momento con ./start_trading_bot.sh${RESET}\"\nfi\n"}, "47e2233927e03cb3198aa3ae68c7bde6641b0771": {"t": 1785758178.6284785, "n": 4542, "h": "8200d761b3554f74", "c": "#!/bin/bash\n\n# ==========================================\n# OpenMT4TradingBot - Installation Script\n# ==========================================\n# Copyright (c) 2025 Immaginet Srl\n# \n# Script di installazione per i componenti Python di OpenMT4TradingBot\n\n# Colori per output più leggibile\nGREEN=\"\\033[0;32m\"\nBLUE=\"\\033[0;34m\"\nYELLOW=\"\\033[1;33m\"\nRED=\"\\033[0;31m\"\nRESET=\"\\033[0m\"\nBOLD=\"\\033[1m\"\n\n# Stampa il logo ASCII\necho -e \"${BLUE}${BOLD}\"\necho \" ____ __ __ _____ _ _ _____ _ _ ____ _ \"\necho \" / __ \\\\ | \\\\/ |_ _| || | |_ _| | (_) | _ \\\\ | | \"\necho \"| | | |_ __ ___ _ __ | \\\\ / | | | | || |_ | |_ __ __ _ __ _| |_ _ __ __ _| |_) | ___ | |_ \"\necho \"| | | | '_ \\\\ / _ \\\\ '_ \\\\| |\\\\/| | | | |__ _| | | '__/ _\\` |/ _\\` | | | '_ \\\\ / _\\` | _ < / _ \\\\| __|\"\necho \"| |__| | |_) | __/ | | | | | |_| |_ | | | | | | (_| | (_| | | | | | | (_| | |_) | (_) | |_ \"\necho \" \\\\____/| .__/ \\\\___|_| |_|_| |_|_____| |_| |_|_| \\\\__,_|\\\\__,_|_|_|_| |_|\\\\__, |____/ \\\\___/ \\\\__|\"\necho \" | | __/ | \"\necho \" |_| |___/ \"\necho -e \"${RESET}\"\necho -e \"${GREEN}============================== Installazione ==============================${RESET}\"\necho\n\n# Verifica che Python sia installato\nif ! command -v python3 &> /dev/null; then\n echo -e \"${RED}Python 3 non è installato. Per favore installalo prima di continuare.${RESET}\"\n exit 1\nfi\n\necho -e \"${GREEN}Python $(python3 --version | cut -d' ' -f2) trovato.${RESET}\"\n\n# Crea un ambiente virtuale (opzionale)\necho -e \"${YELLOW}Vuoi creare un ambiente virtuale Python? (consigliato) [s/n]: ${RESET}\"\nread -p \"\" create_venv\nif [[ $create_venv == \"s\" || $create_venv == \"S\" ]]; then\n echo -e \"${GREEN}Creazione dell'ambiente virtuale...${RESET}\"\n python3 -m venv venv\n \n # Attiva l'ambiente virtuale\n if [[ \"$OSTYPE\" == \"msys\" || \"$OSTYPE\" == \"win32\" ]]; then\n source venv/Scripts/activate\n else\n source venv/bin/activate\n fi\n \n echo -e \"${GREEN}Ambiente virtuale creato e attivato.${RESET}\"\nelse\n echo -e \"${YELLOW}Continuando senza ambiente virtuale. Assicurati che tutte le dipendenze siano installate globalmente.${RESET}\"\nfi\n\n# Installa le dipendenze\necho -e \"${GREEN}Installazione delle dipendenze...${RESET}\"\npip3 install -r python/requirements.txt\n\n# Crea la directory dei log se non esiste\nif [ ! -d \"logs\" ]; then\n echo -e \"${GREEN}Creazione della directory dei log...${RESET}\"\n mkdir -p logs\nfi\n\n# Verifica se è presente un file .env\nif [ ! -f .env ]; then\n echo -e \"${YELLOW}Creazione del file .env di esempio...${RESET}\"\n echo \"DEEPSEEK_API_KEY=your_api_key_here\" > .env\n echo \"DEEPSEEK_MODEL=deepseek-chat\" >> .env\n echo \"DEEPSEEK_API_BASE=https://api.deepseek.com/v1\" >> .env\n echo -e \"${YELLOW}File .env creato. Per favore modifica il file con la tua chiave API DeepSeek.${RESET}\"\nelse\n echo -e \"${GREEN}File .env già esistente.${RESET}\"\n \n # Verifica se contiene una chiave API valida\n DEEPSEEK_KEY=$(grep DEEPSEEK_API_KEY .env | cut -d= -f2)\n if [ \"$DEEPSEEK_KEY\" = \"your_api_key_here\" ] || [ -z \"$DEEPSEEK_KEY\" ]; then\n echo -e \"${RED}ATTENZIONE: Chiave API DeepSeek non configurata nel file .env${RESET}\"\n echo -e \"${RED}Alcune funzionalità potrebbero non essere disponibili.${RESET}\"\n else\n echo -e \"${GREEN}Configurazione DeepSeek trovata.${RESET}\"\n fi\nfi\n\n# Rendi eseguibile lo script di avvio\nchmod +x start_trading_bot.sh\n\n# Messaggio finale\necho -e \"\\n${GREEN}${BOLD}Installazione completata con successo!${RESET}\\n\"\necho -e \"${YELLOW}Per avviare il bot con l'interfaccia grafica:${RESET}\"\necho -e \" ${GREEN}./start_trading_bot.sh${RESET}\"\necho\necho -e \"${YELLOW}Per avviare manualmente i componenti:${RESET}\"\necho -e \" ${GREEN}python3 python/signal_engine.py${RESET} (Motore dei segnali)\"\necho -e \" ${GREEN}python3 python/chat_interface.py${RESET} (Interfaccia chat)\"\necho -e \" ${GREEN}python3 python/chat_interface.py --server --port 8000${RESET} (Server web)\"\necho\necho -e \"${BLUE}${BOLD}Vuoi avviare ora l'interfaccia di controllo? [s/n]${RESET}\"\nread -p \"\" start_now\nif [[ $start_now == \"s\" || $start_now == \"S\" ]]; then\n ./start_trading_bot.sh\nelse\n echo -e \"${GREEN}Puoi avviare l'interfaccia in qualsiasi momento con ./start_trading_bot.sh${RESET}\"\nfi\n"}, "cc35a431038838d2ac3805b8f580724097580ee4": {"t": 1785758180.6137047, "n": 1614, "h": "ff2c852673de4215", "c": "#!/bin/bash\n\n# Script di installazione per i componenti Python di OpenMT4TradingBot\necho \"Installazione dei componenti Python di OpenMT4TradingBot...\"\n\n# Verifica che Python sia installato\nif ! command -v python3 &> /dev/null; then\n echo \"Python 3 non è installato. Per favore installalo prima di continuare.\"\n exit 1\nfi\n\n# Crea un ambiente virtuale (opzionale)\nread -p \"Vuoi creare un ambiente virtuale Python? (consigliato) [s/n]: \" create_venv\nif [[ $create_venv == \"s\" || $create_venv == \"S\" ]]; then\n echo \"Creazione dell'ambiente virtuale...\"\n python3 -m venv venv\n \n # Attiva l'ambiente virtuale\n if [[ \"$OSTYPE\" == \"msys\" || \"$OSTYPE\" == \"win32\" ]]; then\n source venv/Scripts/activate\n else\n source venv/bin/activate\n fi\n \n echo \"Ambiente virtuale creato e attivato.\"\nfi\n\n# Installa le dipendenze\necho \"Installazione delle dipendenze...\"\npip3 install -r python/requirements.txt\n\n# Verifica se è presente un file .env\nif [ ! -f .env ]; then\n echo \"Creazione del file .env di esempio...\"\n echo \"DEEPSEEK_API_KEY=your_api_key_here\" > .env\n echo \"DEEPSEEK_MODEL=deepseek-chat\" >> .env\n echo \"DEEPSEEK_API_BASE=https://api.deepseek.com/v1\" >> .env\n echo \"File .env creato. Per favore modifica il file con la tua chiave API DeepSeek.\"\nelse\n echo \"File .env già esistente.\"\nfi\n\necho \"Installazione completata!\"\necho \"Per avviare il motore di segnali: python3 python/signal_engine.py\"\necho \"Per avviare l'interfaccia chat: python3 python/chat_interface.py\"\necho \"Per avviare l'interfaccia web: python3 python/chat_interface.py --server --port 8000\"\n"}}, ".env.template": {"bb775201fd67f79fc12f4320e0a82073bc23abd5": {"t": 1785746731.7276597, "n": 1180, "h": "5cc72c8c3b46e71a", "c": "# OpenMT4TradingBot - Environment Variables\n# Rename this file to .env and fill in your values\n\n# DeepSeek API Configuration\nDEEPSEEK_API_KEY=your_deepseek_api_key\nDEEPSEEK_API_BASE=https://api.deepseek.com/v1\nDEEPSEEK_MODEL=deepseek-chat\nDEEPSEEK_DAILY_LIMIT=5.0 # Limite giornaliero in USD per le chiamate API DeepSeek\n\n# Adaptive Throttling Configuration\n# Decommentare queste variabili per personalizzare il comportamento di throttling\n# THROTTLING_NORMAL_THRESHOLD=0.2 # % del limite giornaliero per throttling normale (default: 20%)\n# THROTTLING_LIGHT_THRESHOLD=0.4 # % del limite giornaliero per throttling leggero (default: 40%)\n# THROTTLING_MODERATE_THRESHOLD=0.6 # % del limite giornaliero per throttling moderato (default: 60%)\n# THROTTLING_HEAVY_THRESHOLD=0.8 # % del limite giornaliero per throttling pesante (default: 80%)\n# THROTTLING_INACTIVE_MARKET_MULTIPLIER=2.0 # Moltiplicatore per mercati inattivi (default: 2.0)\n\n# MT4 Configuration\n# MT4_FILES_PATH=path_to_mt4_files # Opzionale: sovrascrive il percorso predefinito di MT4\n\n# Trading Bot Configuration\n# SYMBOLS=XAUUSD,XAGUSD,EURUSD # Opzionale: sovrascrive i simboli predefiniti da monitorare\n"}, "7d1848f31f1351951aaaedd864e7a157eace6cd9": {"t": 1785758178.3044744, "n": 1180, "h": "5cc72c8c3b46e71a", "c": "# OpenMT4TradingBot - Environment Variables\n# Rename this file to .env and fill in your values\n\n# DeepSeek API Configuration\nDEEPSEEK_API_KEY=your_deepseek_api_key\nDEEPSEEK_API_BASE=https://api.deepseek.com/v1\nDEEPSEEK_MODEL=deepseek-chat\nDEEPSEEK_DAILY_LIMIT=5.0 # Limite giornaliero in USD per le chiamate API DeepSeek\n\n# Adaptive Throttling Configuration\n# Decommentare queste variabili per personalizzare il comportamento di throttling\n# THROTTLING_NORMAL_THRESHOLD=0.2 # % del limite giornaliero per throttling normale (default: 20%)\n# THROTTLING_LIGHT_THRESHOLD=0.4 # % del limite giornaliero per throttling leggero (default: 40%)\n# THROTTLING_MODERATE_THRESHOLD=0.6 # % del limite giornaliero per throttling moderato (default: 60%)\n# THROTTLING_HEAVY_THRESHOLD=0.8 # % del limite giornaliero per throttling pesante (default: 80%)\n# THROTTLING_INACTIVE_MARKET_MULTIPLIER=2.0 # Moltiplicatore per mercati inattivi (default: 2.0)\n\n# MT4 Configuration\n# MT4_FILES_PATH=path_to_mt4_files # Opzionale: sovrascrive il percorso predefinito di MT4\n\n# Trading Bot Configuration\n# SYMBOLS=XAUUSD,XAGUSD,EURUSD # Opzionale: sovrascrive i simboli predefiniti da monitorare\n"}}}} |