Home  ›  SignalPipe  ›  Documentation  ›  Position Sync

Position Sync

Position Sync

Position synchronization ensures your dashboard stays accurate by detecting when positions are closed on Capital.com and updating the corresponding deals in the database.

How Take-Profits Are Filled

When SignalPipe sets a take-profit level on a Capital.com position, Capital.com monitors the price and automatically closes the position when the target is reached. This happens independently of the webhook system -- there is no webhook event from TradingView for this.

Real-Time Deal Monitoring

The dashboard uses a Firestore real-time listener that monitors your deals collection. When a deal document is modified (e.g., status changes from "active" to "completed"), the change is detected automatically:

  • The deal card disappears from the active deals section
  • A toast notification shows the symbol and realized P&L
  • The deal appears in the completed deals section

Dashboard Refresh Sync

Each time you load the SignalPipe Dashboard, the system:

  1. Creates a fresh Capital.com session using your stored credentials
  2. Fetches all active deals from the database
  3. Queries live position data from the Capital.com API
  4. Enriches each deal with current price, unrealized P&L, and actual position status

If an active deal exists in the database but no corresponding position is found on Capital.com, this indicates the take-profit was hit or the position was closed outside of SignalPipe.

Sub-Position Management

Because Capital.com treats each DCA step as a separate position, SignalPipe tracks multiple sub-positions per deal. During dashboard sync:

  • Each sub-position's current price and unrealized P&L are fetched individually
  • The total deal P&L is the sum of all sub-position P&Ls
  • If any sub-position has been closed by Capital.com (e.g., TP hit), it is marked accordingly
This is a static view of a single section. For full search and interactivity visit the docs app. Open interactive docs →