TradingBridge is a C#/.NET-based trading tool implementing a MACD (Moving Average Convergence Divergence) strategy. It's designed to bridge algorithmic trading logic into production-ready .NET usage—clean, robust, and extensible.
- MACD Strategy: Full implementation of MACD-based trading logic
- .NET Core-ready: Modern, cross-platform C# tooling
- Clean architecture: Easily extensible for custom indicators or data feeds
- CLI-friendly: Designed for console-based integrations and automation
- Configurable: Use JSON or environment variables to tune strategy parameters
- .NET SDK (6.0 or later) installed
- Install from Microsoft’s official site
- Optionally, an IDE like Visual Studio, Visual Studio Code, or Rider
-
Clone the repo
git clone https://github.com/polymathLTE/TradingBridge.git cd TradingBridge -
Restore dependencies & build
dotnet restore dotnet build --configuration Release
-
Run the project
dotnet run --project src/TradingBridge
TradingBridge supports configuration via appsettings.json and environment variables. Create or adjust an appsettings.json under src/TradingBridge/, for example:
{
"Trading": {
"Symbol": "BTC-USD",
"FastPeriod": 12,
"SlowPeriod": 26,
"SignalPeriod": 9,
"DataSourceUrl": "https://api.example.com/price"
}
}For production secrets (API keys, etc.), use:
- Environment Variables, or
.NET user-secretsfor local development — never commit sensitive data!
Run the trading logic in command line:
dotnet run --project src/TradingBridgeYou can pass additional runtime arguments or toggle logging:
dotnet run --project src/TradingBridge -- --symbol BTC-USD --fast 10 --slow 24 --signal 8Or, experiment interactively in REPL mode (if implemented):
dotnet watch run --project src/TradingBridgeA minimal example run:
Initializing MACD strategy for BTC-USD...
Fetching price data from https://api.example.com/price...
Series length: 500
Fast EMA (12), Slow EMA (26), Signal EMA (9)
Latest MACD Histogram: +0.0023
Signal: Buy
(Your output and logging may vary based on current design.)
Contributions are welcome! To get started:
- Fork the repo
- Create a branch:
feature/my-indicator - Make changes and test thoroughly
- Submit a Pull Request with a clear summary of your work
Example contributions:
- Add new indicators (RSI, Bollinger Bands)
- Incorporate backtesting features
- Add support for real-time data streaming or multiple exchanges
MIT License – feel free to reuse and modify as you see fit.
For questions or collaboration, reach out via GitHub Discussions/Issues or directly: polymathLTE