Skip to content

polymathLTE/TradingBridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TradingBridge

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.


Table of Contents


Features

  • 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

Getting Started

Prerequisites

  • .NET SDK (6.0 or later) installed
  • Optionally, an IDE like Visual Studio, Visual Studio Code, or Rider

Setup & Build

  1. Clone the repo

    git clone https://github.com/polymathLTE/TradingBridge.git
    cd TradingBridge
    
    
  2. Restore dependencies & build

    dotnet restore
    dotnet build --configuration Release
  3. Run the project

    dotnet run --project src/TradingBridge

Configuration

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-secrets for local development — never commit sensitive data!

Usage

Run the trading logic in command line:

dotnet run --project src/TradingBridge

You can pass additional runtime arguments or toggle logging:

dotnet run --project src/TradingBridge -- --symbol BTC-USD --fast 10 --slow 24 --signal 8

Or, experiment interactively in REPL mode (if implemented):

dotnet watch run --project src/TradingBridge

Example

A 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.)


Contributing

Contributions are welcome! To get started:

  1. Fork the repo
  2. Create a branch: feature/my-indicator
  3. Make changes and test thoroughly
  4. 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

License

MIT License – feel free to reuse and modify as you see fit.


Contact

For questions or collaboration, reach out via GitHub Discussions/Issues or directly: polymathLTE


About

A port of my MACD trader to .NET that turned serious

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages