Skip to content
All library documents

Pyramiding Positions from Buy and Sell Signals

Article Strategy library · Author: JustinTimeTunes

Summary

This document describes a generic position-management strategy that consumes an external buy or sell signal. A positive signal opens a long or adds to an existing long by the configured order size; a negative signal does the same for a short. An opposing signal closes the current direction and opens the other. An optional cancel input can close a position or prevent new entries, depending on its selected mode.

A stop can be specified as a fixed value or as a percentage of the chart asset’s price, with zero disabling it. The script’s notes emphasize configuring sufficient pyramiding capacity and capital to accommodate accumulated positions. The supplied source is truncated, so its later order and stop handling cannot be fully assessed. No market, entry indicator, backtest results, or evidence of profitability is provided; outcomes depend on the external signals, sizing, capital, and platform settings.

Key ideas

  • The strategy uses an external signed signal to open or add to long and short positions.
  • An opposing signal reverses direction by closing the current position and opening the other side.
  • A configurable cancel signal can close positions or block entries, depending on its mode.
  • Stops can use a fixed value or a percentage of the asset price.
  • Pyramiding and capital settings affect whether repeated additions can be supported.

Tags

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