Skip to content
All library documents

Scheduled Entry and Exit with Optional Price-Based Stops

Article Strategy library · Author: Zero

Summary

This rule-based strategy opens a position during a configured daily entry window and closes it during a configured exit window. The schedule can span midnight, and fractional hour settings encode minutes. It repeatedly submits and cancels limit orders near the latest price until account balances indicate that the requested buy or sell amount has been filled. Optional stop-loss and take-profit checks can close the position before the scheduled exit. A trailing reference to the highest observed price is available for stop-loss calculations.

The document provides default settings for entry and exit hours, order amount, retry delay, stop thresholds, and whether stops are enabled. The accompanying script checks conditions once per minute and uses exchange account balances to track fills. No backtest results or performance evidence are provided. The strategy’s behavior depends on order execution, available balance, and the configured price offset; its repeated cancellation and resubmission may also create execution costs or fail to fill in fast markets. Stop logic and exchange-specific order behavior should be assessed before deployment.

Key ideas

  • The strategy buys during a specified daily time window and sells during another.
  • Entry and exit windows can cross midnight, and decimal hour fractions represent minutes.
  • It retries limit orders until account balances indicate a fill.
  • An optional stop can reference either the highest observed price or the entry price.
  • The document provides implementation logic but no evidence of profitability.

Tags

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