Skip to content
All library documents

Fractal Memory Forecasting with ATR-Based Trend Entries and Exits

Article Strategy library · Author: JayadevRana

Summary

The visible script describes a strategy that searches historical log-return sequences for a window resembling the recent return pattern. It then sums returns following the closest historical match over a forecast horizon to infer a directional forecast. This forecast can be used to require agreement with a trend signal before trading. The strategy also calculates an ATR-based trailing stop that flips directional state when price crosses the stop, and exposes stop-loss, partial take-profit, and trade-direction settings.

The supplied material is truncated partway through the code, so the complete entry and exit rules and panel behavior cannot be confirmed. It includes configurable scan depth, pattern window, forecast length, and risk controls, along with commission and slippage assumptions in the strategy declaration. No market, test period, or performance report is visible. Similarity to a past return pattern is a heuristic, and the excerpt provides no evidence that its forecast is predictive or robust.

Key ideas

  • The method compares recent normalized returns with historical windows to find a similar pattern.
  • It estimates direction from the returns that followed the selected historical match.
  • An ATR-based trailing stop determines trend direction and potential reversal points.
  • Inputs include forecast settings, directional restrictions, stop loss, and staged profit taking.
  • The excerpt is incomplete and provides no backtest evidence for forecast quality.

Tags

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