Skip to content
All library documents

Refreshing CTA Contract OHLC Values from Tick Events

Article vn.py community

Summary

A VeighNa community question asks how to update a contract’s open, high, low, and close values from the CTA module’s tick handler so they refresh on screen instead of remaining at zero. The reply points to updating the relevant global variable, illustrated by the open value, as the necessary step for the displayed state to change.

This is a brief implementation hint about connecting tick processing to the values shown in a trading interface. It does not include the questioner’s code, a complete procedure, or confirmation that the suggestion resolved the issue. It therefore offers limited troubleshooting guidance rather than a general explanation of CTA data handling.

Key ideas

  • The question concerns refreshing a contract’s OHLC values during tick processing in a CTA module.
  • The displayed values were reported as remaining at zero rather than updating in real time.
  • The reply suggests updating the relevant global variable, such as the open value.
  • The exchange does not provide complete code or confirm the outcome.

Tags

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