Skip to content
All library documents

Grid Trading with Manual or Automatically Calculated Price Bounds

Article Strategy library · Author: tapRoot_coding

Summary

This Pine strategy builds evenly spaced price levels between an upper and lower bound, then prepares a grid of order states for trading. Bounds can be supplied manually or calculated from recent closing-price highs and lows, widened or narrowed by a deviation, or set around a simple moving average. The grid spacing follows from the distance between the bounds and the selected number of lines.

The excerpt explains the grid construction and its configurable inputs, including a line count. It notes that automatic bounds may require less attention but could be less profitable, while the plotted-neighbor helper identifies nearby grid levels. The provided material ends before the order-entry and exit rules, so it does not show how the levels trigger trades, how capital is allocated, or how risk is controlled. No performance results are included; actual behavior and suitability cannot be assessed from this excerpt alone.

Key ideas

  • The strategy divides a chosen price range into evenly spaced grid levels.
  • Bounds can be set manually or derived from recent prices or a moving average.
  • An adjustable deviation can widen or narrow bounds based on the selected calculation method.
  • The excerpt does not include the rules for placing or closing trades.

Tags

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