This directory contains example trading experts that demonstrate how to use the MetaExpert library to create automated trading strategies.
- Binance EMA Expert - An Exponential Moving Average strategy for Binance
- Bybit RSI Expert - A Relative Strength Index strategy for Bybit
- OKX MACD Expert - A Moving Average Convergence Divergence strategy for OKX
- Navigate to the directory of the example you want to try
- Copy
.env.exampleto.envand fill in your API credentials - Install dependencies:
pip install -e .(or use uv:uv sync) - Run the expert:
python main.py
Each example can be customized by modifying:
- API credentials in the
.envfile - Strategy parameters in the
@expert.on_initdecorator - Trading logic in the event handlers (especially the
bar()function)
The examples include placeholders for the actual trading logic. You'll need to:
- Uncomment the necessary imports (numpy, etc.)
- Implement the indicator calculations in the
bar()function - Add your trading logic to generate buy/sell signals
- Use the expert's methods to place trades
For more information on the MetaExpert library and its capabilities, see the main documentation.