question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PSAR af0 used as af

See original GitHub issue

Which version are you running? The lastest version is on Github. Pip is for major releases.

import pandas_ta as ta
print(ta.version)

0.3.14b0

Describe the bug I might have misunderstooded the idea but af0 = 0.01, af = 0.02 and I got ‘af0’ being used as ‘af’ and ‘af’ being ignored.

To Reproduce

    af0 = 0.01
    af = 0.02
    df_temp = df.ta.psar(high=df.high, low=df.low, close=df.close, af0=af0, af=af)

Expected behavior First ‘af0’ used after reversal as 0.01, and after new EP 'af’s new values should be 0.03 (af0 + 1xaf), 0.05 (af0 + 2xaf) and so on.

Screenshots psar bug

Thank you for your time!!!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tiagomakotocommented, Jun 13, 2022

Hello @tiagomakoto,

Hmmm… that doesn’t sound good! Thanks for bringing it to my attention.

Out of curiosity, does it also not work for the development branch?

$ pip install -U git+https://github.com/twopirllc/pandas-ta.git@development

In any case, psar is being re investigated for Issue #539 and PR #543 so I will add this to the list to double check.

Kind Regards, KJ

import pandas_ta as ta
print(ta.version)

0.3.67b0

after dev install

And it still happens.

Also I just realized now that the code does take af0 as af since the column title with params is 0.01 (af) and 0.2 (max).

Best regards!

0reactions
twopirllccommented, Jun 13, 2022

Hey @tiagomakoto and @AbyssAlora,

Thanks @tiagomakoto for verifying that it is also happening on the development branch.

Also, the only code that matters right now is on the development branch. Here is the psar for the development branch.

Furthermore, there is more than af0 that needs to be fixed, as I mentioned above, as well as create a numpy version to hopefully speed it up. Unfortunately, this won’t be fixed soon as I have a ton on my plate right now. But if you find a fix and make a Pull Request (PR), that definitely helps reduce my testing time.

KJ

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parabolic SAR Indicator: Definition, Formula, Trading Strategies
The parabolic SAR indicator is used by traders to determine trend direction and ... A PSAR reversal only means that the price and...
Read more >
How Python and Parabolic SAR Improved My Stock Trading
This indicator is mostly used as a trailing stop that tracks the trend as it develops but there is no harm in testing...
Read more >
Commonly Used Types and Recent Development of Ankle ...
Ankle-foot orthosis (AFO) is a commonly used orthosis in patients having weakness in the ankle dorsiflexor or plantarflexor muscles due to ...
Read more >
Ankle-Foot/Knee-Ankle-Foot Orthoses - Policy Article (A52457)
A static/dynamic ankle-foot orthosis (AFO) (L4396, L4397) and replacement interface (L4392) are denied as noncovered (no Medicare benefit) when they are used ......
Read more >
How to Trade With Parabolic Stop and Reverse (PSAR)
Here's a description of the Parabolic Stop and Reverse (PSAR) indicator, including its definition, calculation, and basic use in trading.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found