Reading VeighNa Position Data and Setting PnL-Based Stops
Summary
The discussion explains how a VeighNa CTA strategy can retrieve live long and short position records, inspect their average price, volume, and unrealized profit or loss, and use that information to trigger stop orders. It identifies the position lookup key as a combination of gateway, instrument, and direction, and points to the position PnL field for current profit or loss.
It outlines fixed-currency, percentage-based, ATR-based, and trailing-stop approaches. The examples are implementation sketches rather than tested performance evidence, and the percentage calculation is not validated for different contract conventions. Position lookup and the described stop logic are stated to apply in live trading, not backtests. Local stops are monitored by the trading application, so execution after triggering can face slippage; the notes also flag that missing or delayed gateway position data can leave average price unavailable.
Key ideas
- Position lookup uses gateway, instrument, and direction to identify a live position.
- The position record provides its average price, size, and current PnL.
- Stops can be based on a cash loss, a loss ratio, ATR distance, or a trailing high.
- Locally monitored stops depend on live price updates and may experience slippage.
- The described position API and stop logic are not available in backtests.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.