-
-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem with ATR and MACD indicators #78
Comments
You're right, defaults for MACD should be reversed. Regarding ATR, there are different smoothing methods (see ATR Calculation Methods and Formulas) - vectorbt uses SMA and EMA, while ta, talib and probably TradingView use Wilder’s method. There is no right or wrong method. If you want to use Wilder, you can use |
Thank you! It is exactly how you say and the information in the link. The "translation" to TradingView would be the window times 2n-1. In this case ATR(27) from vectorbt is mostly equivalent to ATR(14) from Wilder's, talib, tradingview. |
Hi! thank you for vectorbt!
According to the documentation, the MACD defaults are defined as: def run(close, fast_window=26, slow_window=12,...
is it really fast_window=12, slow_window=26 ??
Also, I had hard times trying to find why the ATR(14) from vectorbt does not match with calculated from tradingview.
Do you mind to check the code ? I check and I see it ok. The strange thing is that ATR(28) (and using ewm = true) here in vectorbt matchs ok the ATR(14) from tradingview.
Thank you again!!
The text was updated successfully, but these errors were encountered: