Description
After upgrading from pynesys-pynecore==6.4.9 to 6.4.10, strategies using ta.atr() fail before processing the first bar.
The same strategy and OHLCV data run successfully on 6.4.9.
Minimal reproduction
"""@pyne"""
from pynecore.lib import close, plot, script, ta
@script.indicator("ATR 6.4.10 reproduction")
def main():
plot(ta.atr(20), "ATR")
plot(close, "Close")
Run:
pyne run atr_repro.py MYX_FCPO1_30
Actual behavior
pynecore/lib/ta.py:203 in atr
return rma(tr(True), length)
pynecore/lib/ta.py:1829 in tr
val = (high - low) if handle_na else NA(float)
TypeError: unsupported operand type(s) for -: 'Source' and 'Source'
The failure occurs before the first strategy bar is processed.
Expected behavior
ta.atr(20) should return an ATR series as it does under PyneCore 6.4.9.
Regression information
- PyneCore 6.4.9: works
- PyneCore 6.4.10: crashes
- The issue reproduces without
request.security(), HTF data or strategy order logic.
Environment
- Package:
pynesys-pynecore==6.4.10
- OS: Windows 11
- Python: 3.12.13
- Execution: PyneCore CLI
- Data: standard OHLCV with
time, open, high, low, close, volume
Additional context
This appears to be a regression in how built-in high and low Source objects are handled inside ta.tr(). Downgrading to pynesys-pynecore==6.4.9 restores normal operation.
Description
After upgrading from
pynesys-pynecore==6.4.9to6.4.10, strategies usingta.atr()fail before processing the first bar.The same strategy and OHLCV data run successfully on 6.4.9.
Minimal reproduction
Run:
Actual behavior
The failure occurs before the first strategy bar is processed.
Expected behavior
ta.atr(20)should return an ATR series as it does under PyneCore 6.4.9.Regression information
request.security(), HTF data or strategy order logic.Environment
pynesys-pynecore==6.4.10time, open, high, low, close, volumeAdditional context
This appears to be a regression in how built-in
highandlowSourceobjects are handled insideta.tr(). Downgrading topynesys-pynecore==6.4.9restores normal operation.