twopirllc / pandas-ta

Technical Analysis Indicators - Pandas TA is an easy to use Python 3 Pandas Extension with 150+ Indicators
https://twopirllc.github.io/pandas-ta/
MIT License
5.5k stars 1.08k forks source link

MACDAS Indicator Request #336

Closed UlasTosun closed 3 years ago

UlasTosun commented 3 years ago

Hi @twopirllc , MACDAS, MACD AS, MACD-AS or Thomas Aspray's MACD is a special version of MACD indicator. People believe that, it reacts faster than classical MACD for buy/sell signals. Since it is based on classical MACD, I hope that it will be easy for you to add MACDAS to Pandas-TA. Could you add it to Pandas-TA please. I couldn't find better sources for it, however I hope that following links will be enough. Main Source Alternative Source 1 Alternative Source 2

twopirllc commented 3 years ago

@UlasTosun,

Sure. Looking at the Pinescript code below, it does not warrant a separate indicator. I can add a switch to macd to handle the additional differences.

fastMA = ema(close, fastperiod)
slowMA = ema(close, slowperiod)
macd = fastMA - slowMA
signal = ema(macd, signalperiod)

macdAS = macd - signal
signalAS = ema(macdAS, signalperiod)

Kind Regards, KJ

twopirllc commented 3 years ago

@UlasTosun,

So I added the AS mode to macd if you want to test it out on the development branch. You can test it out like so: ta.macd(.., asmode=True).

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

Thanks, KJ

UlasTosun commented 3 years ago

@twopirllc I have tested it out and it works properly, no bugs at first glance. I am grateful to you, thanks! Also, when will you release it as a stable version? Do you have any plan for it? Kind regards.

twopirllc commented 3 years ago

@UlasTosun,

I have tested it out and it works properly, no bugs at first glance.

Great! Thanks for promptly testing it out.

Also, when will you release it as a stable version? Do you have any plan for it?

Soon I hope! Maybe in a few days. 🤷🏼‍♂️ I have been busy answering Issues and lacking the time to spend the time fixing and adding new features and indicators ⚖️ ; MACDAS was an exception since it was an addition to an existing indicator. Don't fret, I'll keep you posted.

I am grateful to you, thanks!

No worries. Thank you! KJ

twopirllc commented 3 years ago

Hello @UlasTosun ,

New stable version v0.3.14b ought to have this feature. Please let me know otherwise.

$ pip install pandas_ta

Thanks, KJ

UlasTosun commented 3 years ago

@twopirllc Yes it has and works properly. Thank you again!