Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

PSAR has a side effect #123

@AGG2017

Description

@AGG2017

After using PSAR I see that the original data for "close" in ohlc has changed and calling any other function after PSAR will produce wrong results because "close" price is already different.

It is very easy to see that getting the close price by psar=close[0:len(close)] will not create a copy but will be optimized to create a reference to close and any change of psar later will affect the original close values.

One easy fix is to be replaced by psar = close.copy()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions