Hello
I am just wondering if someone gives some suggestions regarding the below problem
I wanted the recursive equation for Reverse Exponential
moving average, Let me explain this in detail

1.Normal exponential moving average we define like below

EWMA(i)=a*x[i]+(1-a)EWMA[i-1]

where
a=2/(N+1),N=no of days ,0<a<1
That means if I want a 20-day exponential moving average
then a=0.95, and it works like we take a 20-day window and
give more weights to newer values and lesser weights to
older values and these weights are assigned exponentially.

I wanted another way round, that is more weight to older samples and lesser weights to newer samples and these weights should be assigned exponentially.
in short, I want a reverse exponential moving average recursive equation

Thanks for your reply
I think if I provide more weights to previous values of the closing price and fewer weights to the current closing price then how can the Result being (almost) equal to the input?? it should be more inclined to the previous closing prices, not the current closing price. I think inherent recursive equation will be different than normal EMA

All these recursive equations are equivalent to Exponential moving average, Let me explain

In the above equations whether a = 2/(period+1) or 1 - 2 / (period + 1), It always represent the exponential moving average as the inherent recursive equation is for exponential moving average as in both cases 0<a<1

I wanted recursive equation for reverse exponential moving average, Inherent equation would be different,
I appreciate that you replied and provided a detailed explanation .I am working on this and I will reply when I got the explanation

@prabhas - you are mistaken if you think that EMA works with any kind of "window"
and considers only limited number of bars.

Exponential moving average is INFINITE impulse response filter, it is recursive and it takes ALL bars into calculation and normally the influence of past data is diminished as you go. What you are trying to do is not really good idea because reversing the calculation is leading to absurd solution where the more bars you add to calculation the influence of current (most recent) bar goes asymptotically to zero. After few hundreds of bars, you will essentially get flat line, as any significant weight is only given only to past data.

First of all thanks for creating such a wonderful software AMIBROKER, Also it's my honor to get a reply from the owner of amibroker.

Yes you are right Exponential moving average is an INFINITE impulse response filter, it is recursive and it takes ALL bars into the calculation, and normally the influence of past data is diminished as you go. we can represent this with a recursive equation

EWMA(i)=a*x[i]+(1-a)EWMA[i-1]

and it gives correct value without introducing the error when initializing the first estimate

Note that there is no "accepted" value that should be chosen for a, But what we do in N-day exponential moving average is that we Approximating the EMA with a limited number of terms. A commonly used value for a is 2/(N+1), N=no of days This is because the weights of an SMA and EMA have the same "center of mass" For sufficiently large N, the first N datum points in an EMA represent about 86% of the total weight in the calculation when

a=2/(N+1)and if I am Approximating the EMA with a limited number of terms then why can we can not find the reverse EMA whose equation would look like below, REMA(reverse EMA)

Denote by Pt the period t closing price of a stock market index. Furthermore, denote by REMAt(k) the general weighted moving average at period-end t with k lagged prices.

When λ < 1, the exponentially weighted moving average assigns greater weights to the prices.

Contrary to the regular exponential moving average that gives greater weights to the most recent prices, the reverse exponential moving average assigns greater weights to the oldest prices and decreases the importance of the most recent prices. I am researching this and I will get back to you on this.
research paper link

What you are asking is not really exponential moving average anymore or even Infinite Impulse Response (IIR) filter anymore. The terms in both nominator and denominator are FINITE, therefore it is not IIR filter but Finite Impulse Response filter (FIR). FIR filter with user-definable coefficients is available natively:

Thanks, This is what I was looking for, This was my mistake that I have not looked at amibroker functions completely, I really thankful to you for the quick reply, I was really struggling with this for quite a long time.