Skip to content

How can I use Close price in MESA Adaptive Moving Average? #500

Answered by DaveSkender
allcasper99 asked this question in Q&A
Discussion options

You must be logged in to vote

As you've mentioned, the formula for MAMA calls for the use of Price=(H+L)/2. If you want to use Close price instead, the workaround here would be to convert your quote history to accommodate so (H+L)/2 = Close.

var modifiedQuotes = quotes
   .Select(x => new Quote
   {
       Date = x.Date,
       High = x.Close,
       Low = x.Close,
       Close = x.Close
   });

var results = modifiedQuotes.GetMama(..);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DaveSkender
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #499 on July 24, 2021 21:52.