# User installation guide

## Package layout

The user package contains:

```text
1_TradeLinkBridge
  Open Dashboard.url
2_NinjaTrader
3_User_Guide
```

## Start the bridge

The bridge validates the license on startup, on every full web page load, and every six hours while it remains open. If the license check fails, MT5 hedge opening is blocked until the license is valid again.

1. Open `1_TradeLinkBridge`.
2. Double-click `Start TradeLink Bridge.bat` or `TradeLinkBridge.exe`. Leave the bridge window running.
3. Double-click `Open Dashboard.url`, or manually open `http://127.0.0.1:5000` in a browser.
4. Activate the license if prompted.
5. Set the path to MetaTrader `terminal64.exe` in the dashboard.

## Install the NinjaTrader AddOn

1. Open NinjaTrader 8.
2. Open **Control Center > Tools > Import > NinjaScript Add-On**.
3. Select the compiled TradeLink AddOn zip from `2_NinjaTrader`.
4. Restart NinjaTrader if prompted.
5. Open **Control Center > New > TradeLink**.
6. Confirm the AddOn says **Connection OK**.

## First test

Use Sim101 and an MT5 demo account first.

1. Confirm the dashboard shows MT5 connected.
2. Confirm the dashboard shows **NT AddOn active: 1**.
3. Check the AddOn account dropdown is on Sim101.
4. Submit a small test order.
5. Confirm the dashboard record updates.
6. Close the test trade.
7. Confirm the closed record appears in recent closed/history.

## Default trading settings

New installs default to `price_conversion_mode=calibrated_basis` and `backend_order_enabled=true` (**MT5 hedge orders** enabled). Saved user settings are preserved on upgrade; disable MT5 hedge orders before dry-run testing if needed.

## Runtime data

TradeLink stores local runtime data under the Windows local app-data folder:

```text
%LOCALAPPDATA%\TradeLink
```

This is where logs, local settings, and the SQLite record database live.
