Daily Market-Price Investing with a Once-Per-Day Buy Loop
Summary
This short script demonstrates a basic scheduled accumulation method: it checks the date once per minute and submits one market buy for a configured amount when the date differs from the last recorded investment date. The amount is fixed rather than adjusted to price or account value, so purchases occur on a calendar schedule instead of in response to market signals.
The example logs the account and the date of each purchase, but it provides no performance results, asset selection rules, or evaluation of the approach. Its date is derived from an ISO timestamp, which uses UTC; depending on the exchange and the operator’s intended schedule, that may not match the local trading day. The loop also does not show handling for order failures, balances, fees, or exchange-specific market-buy conventions. It is therefore an illustration of a simple recurring purchase mechanism, not evidence that daily buying improves returns or suits every market.
Key ideas
- The script submits a fixed-amount market buy after detecting a new calendar date.
- It polls once per minute and records the date after each purchase attempt.
- The schedule uses the date from an ISO timestamp, which is based on UTC.
- The example gives no performance data or handling for failed orders and trading costs.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.