SSMA - smoothed simple moving average
Closed this issue · 3 comments
rrfaria commented
Hello, first of all thank you for your amazing job.
I would like to ask you if do you know how to calculate ssma?
I saw this indicator on iqoption site but I can't found how to calc this.
I found SMA but not SSMA.
could you help me ?
mrjbq7 commented
If you have a link to any literature, I could help look it up. But likely these two links describe the same indicator:
https://apiaryfund.com/training/glossary/ssma-smooth-simple-moving-average
https://mahifx.com/mfxtrade/indicators/smoothed-moving-average-smma
The indicated calculation seems pretty simple to implement. Let me know if you want help with getting something to work.
… On Apr 1, 2019, at 6:30 AM, Rafael Far ***@***.***> wrote:
Hello, first of all thank you for your amazing job.
I would like to ask you if do you know how to calculate ssma?
I saw this indicator on iqoption site but I can't found how to calc this.
I found SMA but not SSMA.
could you help me ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
rrfaria commented
fallowing first link I did this js
// (sum of the close prices of the candles in the period)-(SMA of the candles in the period)+(current price)Period
const ssma = (closes = [], sma, currentPrice, period) => {
const closesSum = closes.reduce( (accum, curr) => accum + curr );
const calc = (closesSum - sma + currentPrice) * period;
return calc;
}