A modular trading system supporting multiple strategies and brokers.
- Create a Python virtual environment:
python -m venv venv-
Activate the virtual environment:
- On Windows (PowerShell):
Set-ExecutionPolicy RemoteSigned -Scope Process .\venv\Scripts\activate
- On Windows (Command Prompt):
venv\Scripts\activate.bat
- On Unix or MacOS:
source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt- Install the package in development mode:
pip install -e .- Install dependencies:
pip install -r requirements.txt- Create a
.envfile with your broker credentials:
# FTMO
mt_login_id3=your_login
mt_password3=your_password
mt_server_name3=your_server
path3=path_to_mt5
# Oanda
mt_login_idOANDA=your_login
mt_passwordOANDA=your_password
mt_server_nameOANDA=your_server
pathOANDA=path_to_mt5
# Exness
mt_login_id5=your_login
mt_password5=your_password
mt_server_name5=your_server
path5=path_to_mt5- Uses Z-score to identify overbought/oversold conditions
- ATR-based position sizing and stop loss
- Configurable parameters in
core/config.py
- Uses dual moving average crossover
- Trend-following with ATR-based position sizing
- Configurable parameters in
core/config.py
- Uses RSI for entry signals
- Tighter stops and targets
- Volatility filtering with ATR
- Configurable parameters in
core/config.py
You can start a strategy directly from Python:
from main import run_strategy
# Run scalping strategy on forex pairs with FTMO
run_strategy('scalping', 'FTMO', 'forex')
# Run momentum strategy on indices with Oanda
run_strategy('momentum', 'Oanda', 'indices')
# Run mean reversion on crypto with Exness
run_strategy('mean_reversion', 'Exness', 'crypto')To stop a running strategy, use Ctrl+C in the terminal.
- Create a new strategy class in
core/strategies/ - Inherit from
BaseTrader - Implement
define_strategy()andexecute_trades() - Add configuration to
STRATEGY_CONFIGSincore/config.py
Each strategy includes:
- Position sizing based on account risk percentage
- ATR-based stop losses
- Risk:reward ratio management
- Maximum position checks
The system logs:
- Trade execution
- Position updates
- Error handling
- Strategy signals
Logs are formatted with timestamp, level, and message.
quant-atc-mushini/
├── core/
│ ├── base_trader.py # Base trading functionality
│ ├── config.py # Configuration settings
│ ├── utils.py # Technical indicators and helpers
│ └── strategies/ # Strategy implementations
│ ├── mean_reversion.py
│ ├── momentum.py
│ └── scalping.py
├── main.py # Main execution script
└── requirements.txt # Dependencies