Skip to content
All library documents

Support-Base Detection, Breakdown Entries, and Safety Orders

Article Strategy library · Author: tapRoot_coding

Summary

This strategy script defines candidate price bases by checking whether enough recent bars form lows near the current bar's bottom. It lets the user choose candle lows or the lower of opens and closes as the base source, set the lookback and required confidence, and prevent new bases from clustering too closely around existing ones. The displayed settings also include a threshold and time window for identifying a break below a base.

The order controls describe an initial allocation followed by optional safety orders when price falls by a set percentage, with a stop loss measured either from the first entry or the position's average price. The strategy allows multiple entries and specifies cash sizing, starting capital, and commission assumptions. However, the supplied document cuts off within a helper function, before the base confirmation, entry, exit, and safety-order implementation is shown. It therefore outlines a configurable breakdown and averaging approach but does not provide enough of the script to verify its exact trade rules or evaluate performance.

Key ideas

  • Candidate bases are identified from repeated nearby price bottoms within a configurable lookback.
  • The base source can use lows or the lower of candle opens and closes.
  • A break is configurable by its distance below a base and the number of bars allowed for the signal.
  • The order settings support an initial entry, additional safety orders, and a stop based on either initial or average entry price.
  • The excerpt ends before the full trading logic, so actual entries, exits, and results cannot be assessed.

Tags

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