Long Grid Trading Within Fixed Gold Price Bounds
Summary
This Pine strategy describes a long-only grid for XAU. It divides a fixed price range into configurable levels spaced either geometrically or arithmetically. The system buys as price crosses levels downward and sells as price crosses upward to the next level, allocating a share of a stated investment to each grid slot. Inputs include the range, grid density, total allocation, optional backtest dates, and display settings.
The source specifies a bounded allocation and grid range as structural risk constraints, with no trailing logic. It also includes commission and slippage assumptions and settings for order sizing and pyramiding. These details describe a backtestable framework, but the excerpt provides no performance results or evidence of profitability. Fixed bounds can leave the strategy inactive or exposed to accumulated long positions if price moves beyond the selected range, and trading costs may materially affect results. The visible source ends during a helper function, so the complete order and alert implementation is not available here.
Key ideas
- The strategy opens long positions when price crosses grid levels downward.
- It closes positions as price rises through the next grid level.
- Grid levels can use geometric or arithmetic spacing within fixed bounds.
- The total investment is divided across the configured grid slots.
- The document gives no backtest results and the shown source is incomplete.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.