User lane: do not run local retraining or optimization. Use onboarding, select profile 1-5, pull approved model revisions from R2, and run trading.
This guide assumes you have a broker account with MetaTrader 5 and the MT5 API server already running. If you need to set that up first, see MT5 API server .
Prerequisites
Python 3.10–3.13 (3.13 recommended)
A broker MT5 account (VT Markets Cent for testing, any MT5 broker for live)
Cloudflare R2 credentials (to pull pre-trained models)
Steps
Clone the repository
git clone https://github.com/mokatific/novosky
cd novosky
Create a virtual environment
python3.11 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
For detailed platform-specific instructions, see Installation .
Configure environment variables
Edit .env with your values: API_URL=http://<YOUR_MT5_SERVER_IP>:6542
API_TOKEN=<your_api_token>
CF_R2_ACCESS_KEY_ID=<your_r2_key_id>
CF_R2_SECRET_ACCESS_KEY=<your_r2_secret>
# Optional — disabling just silences notifications
TELEGRAM_TOKEN=<bot_token>
TELEGRAM_CHAT_ID=<chat_id>
For a full reference of all config files, see Configuration .
Run onboarding and choose your risk profile (1-5)
python scripts/onboarding.py --balance 500 --profile 3
Use --profile 1 to --profile 5 (or profile names) based on your risk tolerance. When onboarding asks about first optimization, choose n to skip retraining.
Pull the approved model revision from R2
python ml/r2_hub.py --pull --revision vYYYYMMDD-p3
Use the revision announced by your developer/operator for your selected profile. If you do not have direct R2 credentials, ask your operator for the approved revision and pull it from your managed environment.
Verify model compatibility
python3 -c "
import json
mc = json.load(open('models/model_compat.json'))
ml = json.load(open('ml_config.json'))
assert mc['feature_count'] == len(ml['features'])
print('OK:', mc['feature_count'], 'features')
"
This checks that the pulled models and feature config are in sync.
Run a true OOS backtest
Confirm the models work correctly on your machine before going live: python backtest_config.py \
--balance 500 --no-swap --leverage 500 \
--spread 16.95 --oos-only --no-chart
You should see WR around 57–85% depending on the OOS window. See Backtesting for details.
Dry-run (diagnostic-only, safe)
This runs the full trading loop — fetching candles, computing features, generating signals — but keeps side effects disabled. In --dry mode:
No real orders are sent.
No close/SLTP modification requests are sent.
No Telegram messages are sent.
Telegram command bot is not started.
No Supabase writes are made.
No runtime CSV/state files are written.
Go live
When you’re satisfied with the dry-run output: For production deployments with auto-restart on crash and reboot persistence, use PM2: npm install -g pm2
bash scripts/pm2-start.sh # start with API readiness check
bash scripts/pm2-start.sh --setup # first-time: enable auto-start on reboot
See First run for PM2 management commands.
Next steps
Configuration reference All config.json and ml_config.json keys explained.
Brokers Cent vs standard accounts, spread values per broker.
Telegram notifications Every notification the bot sends and when.
Monitoring Log files, dashboards, and model health checks.