Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey binhmaithanh..... a good coder will likely get a good laugh from my attempt here.... possibly it could be condensed some.... i used the dow 30..... just change the tickers to yours, delete the extra lines, and be sure to leave '))' at the end not a '+'......
it appears at first glance to work......h
name and paste into indicator builder
Cum(If(Security("online:mmm",C>Ref(C,-1)),1,-1)+
If(Security("online:aa",C>Ref(C,-1)),1,-1)+
If(Security("online:mo",C>Ref(C,-1)),1,-1)+
If(Security("online:axp",C>Ref(C,-1)),1,-1)+
If(Security("online:aig",C>Ref(C,-1)),1,-1)+
If(Security("online:ba",C>Ref(C,-1)),1,-1)+
If(Security("online:cat",C>Ref(C,-1)),1,-1)+
If(Security("online:c",C>Ref(C,-1)),1,-1)+
If(Security("online:ko",C>Ref(C,-1)),1,-1)+
If(Security("online:dd",C>Ref(C,-1)),1,-1)+
If(Security("online:xom",C>Ref(C,-1)),1,-1)+
If(Security("online:ge",C>Ref(C,-1)),1,-1)+
If(Security("online:gm",C>Ref(C,-1)),1,-1)+
If(Security("online:hpq",C>Ref(C,-1)),1,-1)+
If(Security("online:hd",C>Ref(C,-1)),1,-1)+
If(Security("online:hon",C>Ref(C,-1)),1,-1)+
If(Security("online:intc",C>Ref(C,-1)),1,-1)+
If(Security("online:ibm",C>Ref(C,-1)),1,-1)+
If(Security("online:jnj",C>Ref(C,-1)),1,-1)+
If(Security("online:jpm",C>Ref(C,-1)),1,-1)+
If(Security("online:mcd",C>Ref(C,-1)),1,-1)+
If(Security("online:mrk",C>Ref(C,-1)),1,-1)+
If(Security("online:msft",C>Ref(C,-1)),1,-1)+
If(Security("online:pfe",C>Ref(C,-1)),1,-1)+
If(Security("online:pg",C>Ref(C,-1)),1,-1)+
If(Security("online:sbc",C>Ref(C,-1)),1,-1)+
If(Security("online:utx",C>Ref(C,-1)),1,-1)+
If(Security("online:vz",C>Ref(C,-1)),1,-1)+
If(Security("online:wmt",C>Ref(C,-1)),1,-1)+
If(Security("online:dis",C>Ref(C,-1)),1,-1))
----------------------------------------------------
|