logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
set4lifenj  
#1 Posted : Friday, January 26, 2007 3:38:52 PM(UTC)
set4lifenj

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/23/2005(UTC)
Posts: 9

I believe the formula below is for macd.
Mov(C,8,E) - Mov(C,17,E) - Mov((Mov(C,8,E) - Mov(C,17,E)),9,E)

Is it possible to usea formula I wrote instead of mov?
I'm getting confused when I get to this point Mov((Mov(C,8,E)
Fml((Fml("8")

Thanks
hayseed  
#2 Posted : Friday, January 26, 2007 7:54:33 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey set4..... your macd formula looks different than the common one seen.... most often people use

---------------------------

macd : = mov(c,12,e) - mov(c,26,e) ;

and the signal line would be the 9 ema of that....

signal : = mov(macd(),9,e) ;

--------------------------

if you created a indicator using your formula above , Mov(C,8,E) - Mov(C,17,E) - Mov((Mov(C,8,E) - Mov(C,17,E)),9,E) and then named it 8, you could reference to it by using fml("8").....

the Mov((Mov(C,8,E) Fml((Fml("8") part is confusing me, not sure what your trying to do there.....h

pds1:=Input("short moving average",1,100,12);
pds2:=Input("long moving average ",1,200,26);
pds3:=Input("signal moving average",1,200,9);
0;
a:=Mov(C ,pds1 ,E )- Mov(C ,pds2 ,E );
b:=Mov(a,pds3,E);
d:=a-b;
a;
b;


set4lifenj  
#3 Posted : Friday, January 26, 2007 8:41:25 PM(UTC)
set4lifenj

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/23/2005(UTC)
Posts: 9

Hi hayseed,

I'm trying to use tillsons smoothed averages as macd
Here is what my Fml("8") would look like
e1:=Mov(C,8,E);
e2:=Mov(e1,8,E);
e3:=Mov(e2,8,E);
e4:=Mov(e3,8,E);
e5:=Mov(e4,8,E);
e6:=Mov(e5,8,E);
c1:=-.618*.618*.618;
c2:=3*.618*.618+3*.618*.618*.618;

I can change the averages to the standard macd that you posted, I just can't figure out how to put it all together.

(as you posted above)
pds1:=Input("short moving average",1,100,12);
pds2:=Input("long moving average ",1,200,26);
pds3:=Input("signal moving average",1,200,9);
0;
a:=Mov(C ,pds1 ,E )- Mov(C ,pds2 ,E );
b:=Mov(a,pds3,E);
d:=a-b;
a;
b;
------------------------------
(I got to this point but can't seem to plot the second one)
a1:=Fml("t12") - Fml("t26");
e1:=Mov(a1,9,E);
e2:=Mov(e1,9,E);
e3:=Mov(e2,9,E);
e4:=Mov(e3,9,E);
e5:=Mov(e4,9,E);
e6:=Mov(e5,9,E);
c1:=-.618*.618*.618;
c2:=3*.618*.618+3*.618*.618*.618;
a1;

Thanks for your help



hayseed  
#4 Posted : Friday, January 26, 2007 9:49:39 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey set4..... tillsons is more about smoothing than anything else.... the fib componet allows for some shift.... so it might be better just to apply tillsons math to the macd formula rather than using the fml("") function..... below would be a quick first guess at the best way to achieve that..... better coders might have a neater layout....

the code below has inputs for the 12,26,9 values along with the fib adjustments just in case other values are desired..... see what you think......h

tillsons macd

---------------------------------

pdss:=Input("slow periods ",1,50,26);
pdsf:=Input("fast periods ",1,50,12);
pdssig:=Input("signal",1,20,9);

a:=Input("slow fib ",0,2, 1); {fiboncia setting}

e1:=Mov(P,pdss,E);
e2:=Mov(e1,pdss,E);
e3:=Mov(e2,pdss,E);
e4:=Mov(e3,pdss,E);
e5:=Mov(e4,pdss,E);
e6:=Mov(e5,pdss,E);
c1:=-a*a*a;
c2:=3*a*a+3*a*a*a;
c3:=-6*a*a-3*a-3*a*a*a;
c4:=1+3*a+a*a*a+3*a*a;
aa:=c1*e6+c2*e5+c3*e4+c4*e3;

b:=Input("fast fib ",0,2, 1); {fiboncia setting}


e1:=Mov(P,pdsf,E);
e2:=Mov(e1,pdsf,E);
e3:=Mov(e2,pdsf,E);
e4:=Mov(e3,pdsf,E);
e5:=Mov(e4,pdsf,E);
e6:=Mov(e5,pdsf,E);
c1:=-b*b*b;
c2:=3*b*b+3*b*b*b;
c3:=-6*b*b-3*b-3*b*b*b;
c4:=1+3*b+b*b*b+3*b*b;
bb:=c1*e6+c2*e5+c3*e4+c4*e3;

0;
aaa:=Mov(bb ,pdsf ,E )- Mov(aa ,pdss ,E );
bbb:=Mov(aaa,pdssig,E);
d:=aaa-bbb;

d; { click on the d line after ploting and change it to histogram style}
aaa;
bbb;

-----------------------------------------------

set4lifenj  
#5 Posted : Saturday, January 27, 2007 2:52:25 PM(UTC)
set4lifenj

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/23/2005(UTC)
Posts: 9

Thank you Hayseed!
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.