Job Description
**Overview**
I need an experienced **cTrader (cAlgo) C#** developer to build a clean risk-management panel for manual trading. The panel must be **draggable anywhere on the chart** (mouse drag) and use **three interactive lines** (Entry / SL / TP). It should calculate position size from risk, place orders with correct SL/TP, and include basic management (partial closes, move to BE, optional trailing). Production-grade code, no external dependencies.
Please start your reply with **“cTrader ETA”** to confirm you read this spec.
**Core Scope (MVP)**
1) **Draggable on-chart panel (StackPanel UI)**
- Primary: drag via a grab-bar using chart mouse down/move/up with **pixel coordinates**.
- Fallback: if pixels aren’t exposed on the target build, provide arrow nudge buttons and/or X/Y inputs.
- Persist panel position per symbol/timeframe. Compact layout. Theme colors (bg/accent) via hex.
2) **Three lines only**
- **ENTRY** (blue), **SL** (red), **TP** (green) — all interactive.
- Defaults: Entry at Bid, SL ±20 pips, TP ±20 pips.
- Button: **Reset Lines** (recreate the 3 lines).
3) **Risk & size calculation**
- Modes: **Percent**, **Fixed $**, **% Equity**.
- Inputs: Risk%, Risk$, %Equity, **R** multiple (chips: 1R/1.5R/2R), **Sim Balance** (used if Account.Balance==0).
- Calc:
- stopPips = |Entry−SL| / PipSize (≥ 0.01)
- risk$ by mode (Percent/Fixed/Equity; Sim Balance fallback)
- lotsRaw = risk$ / (stopPips × Symbol.PipValue)
- round to **VolumeInUnitsStep/Min**, convert back to lots
- Outputs (read-only): **Size (lots), Stop (pips), Risk $, RR**.
- **Set R**: TP snaps to Entry ± (R × stop) in the correct direction.
4) **Order placement**
- **Buy/Sell Market** with SL/TP derived from current price (Ask for buy, Bid for sell) using modern protection overloads.
- Order label prefix: `ETA`.
5) **Management tools**
- **Close 25% / 50% / 100%** (respect step/min).
- **Move to BE** (+ offset pips).
- **Optional** trailing stop by input pips (toggle).
6) **Polish & performance**
- Persist inputs (risk, sim balance, mode, R) per symbol/timeframe.
- Throttled refresh (Timer vs. OnTick spam).
- Clear messages for size=0, stop too small, SL==Entry, etc.
- Handle JPY, metals, indices PipSize/PipValue correctly.
**Nice-to-Have (quote separately)**
- Pending orders from Entry line: auto **LIMIT** if favorable, else **STOP**.
- Alerts when price crosses Entry/SL/TP.
- Theme presets; “About” box/version.
- Alternative UI option if overlays are unreliable: **Plugin (dockable) panel** + tiny execution cBot.
**Deliverables**
- **cBot (.cs)** source (and Plugin if that route is chosen); no external deps.
- README (install, settings, edge cases).
- I retain full IP; dev may keep generic utility libs by agreement.
**Acceptance Tests**
- I can **drag the panel** anywhere; position **persists** after stop/restart. Works at 100% and 125–150% Windows scaling.
- With ~10-pip stop and **Percent 1%** + Sim Balance ⇒ **Size > 0**.
- Switching to **Fixed $50** updates size predictably.
- **R=2** snaps TP to 2× stop on the correct side of Entry.
- **Buy MKT** places with correct SL/TP (±1 pip tolerance).
- **Close 50%** halves volume (rounded to step).
- **Move to BE** sets SL ≈ entry ± offset.
**Milestones & Payment**
1) Draggable panel + persistence + 3 lines — 25%
2) Risk calc + outputs — 25%
3) Buy/Sell Market + protection + error handling — 30%
4) Management tools + README — 20%
**Budget & Timeline**
- **MVP:** USD **$800–$1,200**.
- With Nice-to-Have: up to **$1,800–$2,200**.
- **Timeline:** 2–3 weeks with interim builds per milestone.
**Please include in your proposal**
- Links/screens of prior **cTrader UI/panel** work.
- How you’ll implement **drag** (pixel coords vs fallback).
- Your **VolumeInUnits** rounding strategy (min/step).
- Target **cTrader version**.
- Fixed price for MVP and separate price for Nice-to-Have.