PSAR af0 used as af
See original GitHub issueWhich 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
Thank you for your time!!!
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
0.3.67b0
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!
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