필터 지우기
필터 지우기

MACD(50, 90,9)

조회 수: 3 (최근 30일)
Sonima
Sonima 2019년 1월 19일
편집: Stephan 2019년 1월 21일
Hi!
I want to calculate MACD(50, 90,9), however I don't know how to specifiy the "50" and "90" values. Matlab has default MACD of MACD(12, 26,9).
Thanks.
  댓글 수: 2
Star Strider
Star Strider 2019년 1월 19일
Reference: macd, a Financial Toolbox function.
(‘Financial Toolbox’ tag added.)
Walter Roberson
Walter Roberson 2019년 1월 20일
Most other people do not know what macd is, and the link helps other people to understand what is being asked.
The Mathworks supplied function does not support any other parameters.
I see hints in some research papers that some people have implemented general MACD in MATLAB, but it might not be easy to find the code.

댓글을 달려면 로그인하십시오.

채택된 답변

Stephan
Stephan 2019년 1월 20일
편집: Stephan 2019년 1월 21일
Hi,
with a little effort it should be possible to write your own MACD. The movavg function supports an exponential type as option. Together with the definition of the MACD it should be possible to build your own function, which accepts 3 input arguments to calculate the MACD like you wish.
For testing purposes i suggest, that you compare the results of your function (using the standard values) with the result of the built in MACD. Then you can be sure to made it correct.
EDIT:
If you have access to Financial Toolbox on R2018a or higher, then you can use this function from FEX to calculate the MACD like you wish.
Best regards
Stephan

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by