Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 6/12/2007(UTC) Posts: 32
|
How do I smooth a moving average?
I am using a 35day moving average [Mov(C,35,S)>Ref(Mov(C,35,S),-1)] as a trend indicator within the Indicator Builder, but I want to make my signals less sensitive to small changes in the trend. I’ve have two ideas as to how to do this but need someone to tell me how to do the code (my attempts have resulted in a straight line when clearly the moving average is trending).
First idea
The current moving average has to fall below previous moving average by Z% before there’s a change in trend signal.
Second idea
Moving average has to fall below the close by Z% before there is a change in trend signal.
Gregor
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
You could try something like:
a1:=Mov(C,35,S); a2:=Ref(Mov(C,35,S),-1); b1:=a1-a2; Mov(b1,10,S); Mov(b1,20,S)
The Mov() slows the signal down, the crossover of the 10 and 20 Mov() speeds the signal up.
|
|
|
|
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.