# Introduction

Managing App is a bot management application written using C# and Typescript. First goal was to be able to run an
infinite
number of Bot without any limitations (will depend on your server capabilities only)
It is designed to support multiples exchanges and be controlled via webUI or Discord.
It contains bot management, backtesting, scenario management and money management..

---

# Roadmap

## v1 - The base

- [x] Bot management
- [x] Backtesting
- [x] MoneyManagement
- [x] Strategies systems
- [x] WebUI
- [x] Robust trading management
- [x] Adaptive trading
- [x] Account management
- [x] Workers (prices, backtests, volumes)
- [x] Bot backup

## v2 - The custody back

- [x] Web3 Authentification
- [x] Hot-wallets management
- [x] Chainlink and Subgraphs feeds
- [x] [GMX Contracts integration](https://gmx.io/)
- [ ] GMX v2 Contracts integration

### v2.1

- [x] Tools : RektFees, Spotlight
- [x] Funding Rates
- [ ] Strategies optimisation
- [ ] Delta neutral positions
- [ ] Address tracking
- [ ] Trading desk
- [ ] Metrics (backtests, portofolio)
- [ ] Account Abstraction Layer
- [ ] Enhance performances
- [ ] Dockerize everything

### v2.2

- [ ] Hedging Bot with Options [HegicOption](https://www.hegic.co/)
- [ ] Market making

## v3 - The bitcoin protocol

- [ ] Integrate [LNMarkets](https://lnmarkets.com/)

## v4 - The omnipotence

- [ ] Connect to [Blockstream Satellite](https://blockstream.com/satellite/)

# Stack

## Architecture

![alt text](assets/img/Architecture.png)

## Front-end

- [Vite.JS](https://vitejs.dev/)
- [Tailwindcss](https://tailwindcss.com/)
- [Daisy UI](https://daisyui.com/)
- [HeroIcon](https://heroicons.com/)
- [Toastify](https://fkhadra.github.io/react-toastify/introduction)
- [Tradingview Lightweight-charts](https://github.com/tradingview/lightweight-charts)
- [Ploty](https://github.com/plotly/react-plotly.js)
- [SignalR](https://github.com/dotnet/aspnetcore/tree/main/src/SignalR#readme)
- [Wagmi](https://wagmi.sh/)
- [Connectkit](https://github.com/family/connectkit)

## Back-end

- .NET 7
- [SignalR](https://dotnet.microsoft.com/en-us/apps/aspnet/signalr)
- [Discord.Net](https://github.com/discord-net/Discord.Net)
- [CryptoExchange.Net](https://github.com/JKorf/CryptoExchange.Net)
- [Stock Indicators](https://daveskender.github.io/Stock.Indicators/)
- [InfluxDb](https://github.com/influxdata/influxdb-client-csharp)
- [Nethereum](https://github.com/Nethereum/Nethereum)

---

# Features

## Money Management

- Create a defined money management for a given timeframe (StopLoss, TakeProfit, Amount to risk)
- Edit a money management configuration
- Delete a configuration

## Strategies

- Build a strategy
- Delete strategy

Strategies availables :

| Strategy             | Description                                                                                                                        | Recommended values                                |
|----------------------|------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|
| ChandelierExit       | Triggers a SHORT signal when the previous candle is above the ChandelierExit, and the last candle closes below the ChandelierExit. | Period: 22, Multiplier: 3                         |
| EMACross             | Triggers a signal when the last candle crosses the EMA.                                                                            | Period: 200                                       |
| EMATrend             | Returns a Trend signal SHORT when the last candle is below the EMA, and a Trend LONG signal when StochRSI < 20%.                   | Period: 200                                       |
| MACDCross            | Triggers a signal when EMAs cross.                                                                                                 | FastPeriod: 12, SlowPeriods: 26, SignalPeriods: 9 |
| RSIDivergenceConfirm | First, detects a divergence and then triggers a signal when the divergence is confirmed.                                           | Period: 4 for 6                                   |
| RSIDivergence        | Triggers a signal when a divergence occurs on the period.                                                                          | Period: 4 for 6                                   |
| STC                  | Returns a signal SHORT when the previous STC > 75% and the current STC <= 75%.                                                     | Period: 22                                        |
| StochRsiTrend        | Returns a Trend signal SHORT when Stoch RSI > 80% and a Trend LONG signal when StochRSI < 20%.                                     | Period: 22                                        |
| SuperTrend           | Triggers a SHORT signal when the previous candle is above the super trend, and the last candle closes below the super trend.       | Period: 10, Multiplier: 3                         |
| ThreeWhiteSoldiers   | Triggers a LONG signal when the Three White Soldiers pattern is identified.                                                        | Lookback Period: 3                                |

## Scenarios

- Build a scenario with multiple strategies
- Delete a scenario

## Backtests

The backtest system works with multiple required parameters :

- Exchange (Binance, Kraken, FTX)
- Ticker (ADAUSDT, BTCUSDT, etc..)
- Days : Since when did you want to start backtest. Should be a negative value
- ScenarioName
- Timeframe (OneDay, FifteenMinutes, etc..)
- BotType (ScalpingBot or FlippingBot)
- Initial balance

## Bots

- Create and run a bot
- Stop / Restart a bot
- Delete a bot
- Stop all bots
- Set bot to watch only (send signal to discord instead of opening a new position)

Bot types availables :

| Type        | Description                                                                            |
|-------------|----------------------------------------------------------------------------------------|
| ScalpingBot | This bot will open position and wait before opening a new one                          |
| FlippingBot | The flipping bot flipping the position only when a strategy trigger an opposite signal |

