Rank: Member
Groups: Registered, Registered Users Joined: 10/12/2009(UTC) Posts: 13
|
Hi,
I know the first prev is assumed to be 0. My question is: can I initialize prev with some other value.
E.g. IF plot C*1.03
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Nathan
Here's an example of how an EMA might initialize or seed bar one.
{Exponential Moving Average} Pds:=Input("Periods",1,1000,10); Rate:=2 / (Pds+1); EMA:=If(Cum(1)=1, C, PREV*(1-Rate) + C*Rate ); EMA;
Roy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 10/12/2009(UTC) Posts: 13
|
Hi Roy,
Thank you very much for your help. It is very helpful.
Kind Regards,
Nathan
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.