Skip to content
All library documents

Recomputing Derived Values from Editable Strategy Parameters

Article vn.py community

Summary

A VeighNa forum user asks how to keep a displayed value C synchronized with inputs A and B. C is initially calculated as the difference between A and B, but editing either input leaves C at its previous value. The user also wants C to remain editable like the other parameters.

The reply recommends representing C as a variable defined from A and B, rather than as a parameter. The explanation distinguishes fixed input parameters from values that can change through calculation. This is a narrow implementation tip, not a trading strategy: the exchange gives no code, details about parameter update behavior, or discussion of how to handle manual edits to a derived value. It provides a practical conceptual distinction, but does not fully address the request to make C both derived and independently editable.

Key ideas

  • A value derived from other inputs may become stale if stored as a parameter.
  • The reply recommends defining the derived value as a variable based on the inputs.
  • The exchange distinguishes parameters from values that can be recalculated.
  • It does not explain how a derived value could also remain independently editable.

Tags

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