Skip to content
All library documents

Separating Account Profit Monitoring from Strategy Execution

Article Strategy library · Author: 小草

Summary

This note describes running profit tracking as a separate process from a trading strategy. Its stated rationale is that strategy edits or restarts should not reset the monitoring baseline, and that separating account and ticker API calls may reduce the chance of network errors interfering with order logic. The loop interval can also be chosen independently.

The example records initial account values, repeatedly fetches the current account and ticker, and estimates net value by adding balances and frozen balances to stock holdings valued at the ticker’s buy price. It logs the difference from the initial estimate at five-second intervals, truncating the displayed value to three decimal places. This is operational guidance rather than a trading signal or return analysis, and it supplies no validation or performance evidence. The estimate depends on the fields exposed by the exchange API and on valuing holdings at the buy quote; it does not describe fees, deposits, withdrawals, or other adjustments that could affect the comparison.

Key ideas

  • The note recommends placing profit monitoring in a process separate from strategy execution.
  • It establishes an initial account value and compares later estimates against that baseline.
  • The estimate includes balances, frozen balances, and holdings valued at the ticker’s buy price.
  • The example polls every five seconds and truncates logged profit to three decimal places.
  • The note does not account for all possible cash flows or provide evidence that separation prevents API failures.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.