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

Notification

Icon
Error

Options
Go to last post Go to first unread
johngoat  
#1 Posted : Monday, December 8, 2014 7:42:51 AM(UTC)
johngoat

Rank: Newbie

Groups: Registered, Registered Users
Joined: 10/16/2011(UTC)
Posts: 9

Just wanted to drop off a helpful indicator I like, not sure if this is the right place. My apologies.

I used SPDRs but it could be done with all 501  S&P stocks. In my experience the SPDRs do a fine job at tracking the index so I don't find that necessary.

XlyC:=If(Security("ONLINE:XLY",C>Mov(C,200,S)),1,0);
XlpC:=If(Security("ONLINE:XLP",C>Mov(C,200,S)),1,0);
XleC:=If(Security("ONLINE:XLE",C>Mov(C,200,S)),1,0);
XlfC:=If(Security("ONLINE:XLF",C>Mov(C,200,S)),1,0);
XlvC:=If(Security("ONLINE:XLV",C>Mov(C,200,S)),1,0);
XliC:=If(Security("ONLINE:XLI",C>Mov(C,200,S)),1,0);
XlbC:=If(Security("ONLINE:XLB",C>Mov(C,200,S)),1,0);
XlkC:=If(Security("ONLINE:XLK",C>Mov(C,200,S)),1,0);
XluC:=If(Security("ONLINE:XLU",C>Mov(C,200,S)),1,0);

Pct:=((XlyC+XlpC+XleC+XlfC+XlvC+XliC+XlbC+XlkC+XluC)/9)*100;

Pct;
LinearReg(Pct,200,S,5);

Originally I had Mov(C,50,S) > Mov(C,200,S) which makes for a much smoother plot but it rarely went below 50% and that's kind of the point of it. The pic "SPDRs_Pct" in my album is a peek. Anyway I've always found it useful and thought someone else might too.

Good day & good trading.

***********************************************************************************

****As of this posting, I didn't know that MetaStock limited users to 20 defined variables. I found out the hard way when I tried to do this indicator with the DAX 30, CAC 40 & DJIA 30. Guess I can forget about the Russell 2000, LOL. The FTSE 100, NASDAQ 100 would all benefit from this indicator. IF IT COULD BE WRITTEN?????

WHY oh GOD why are we limited to the draconian ways of 20 defined variables?

Is there another way to write such VERY helpful indicators? 

Edited by user Saturday, December 20, 2014 7:03:17 AM(UTC)  | Reason: Not specified

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.