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

Notification

Icon
Error

Options
Go to last post Go to first unread
techtrader31  
#1 Posted : Thursday, September 5, 2013 3:59:43 AM(UTC)
techtrader31

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/19/2013(UTC)
Posts: 4

request help in building an indicator which plots MACD of relative strength. So if i am comparing stock1 with stock2 it should plot the macd of relative strength of stock 1 with respect to stock 2...
henry1224  
#2 Posted : Thursday, September 5, 2013 7:17:29 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Create a composite security: A-B
make the relative strength of that RSI(A-B,Per1);
make the MACD of that
then make the signal of that
Code:

Per1:=Input("Length RSI",10,100,14);
Per2:=Input("Length Fast MA",10,100,12);
Per3:=Input("Length Slow MA",10,100,26);
Per4:=Input("Length Signal",1,100,9);
A:=Security("C:\MData\IBM",C);
B:=Security("C:\MData\SPX",C);
D:=RSI(A-B,Per1);
F:=Mov(D,per2,S)-Mov(D,Per3,S);
FS:=Mov(F,Per4,S);
F;FS;



techtrader31  
#3 Posted : Friday, September 6, 2013 1:52:33 AM(UTC)
techtrader31

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/19/2013(UTC)
Posts: 4

Henry thanks for your reply

i mean relative strength comparative and not RSI. Please advise

Grateful




techtrader31  
#4 Posted : Friday, September 6, 2013 2:52:21 AM(UTC)
techtrader31

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/19/2013(UTC)
Posts: 4

also is there any way to browse and pick security a and security b from a c drive folder to create the composite security
henry1224  
#5 Posted : Saturday, September 7, 2013 6:44:25 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
I think this is what you are looking for
Code:


Per1:=Input("Length Fast MA",10,100,12);
Per2:=Input("Length Slow MA",10,100,26);
Per3:=Input("Length Signal",1,100,9);
A:=Security("C:\MData\IBM",C);
B:=Security("C:\MData\SPX",C);
F:=Mov(A/B,per1,S)-Mov(A/B,Per2,S);
FS:=Mov(F,Per3,S);
F;FS;


henry1224  
#6 Posted : Saturday, September 7, 2013 7:15:42 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
You could change line f to

F:=Mov(C/B,Per1,S)- Mov(C/B,Per2,S);

You can also create an input to select different indexes to compare

Sec:=input("1=spx 2=dow 3=nas",1,3,1);
Sec:=if(Sec=1,Security("C:\MData\Spx",C).
if(Sec=2,Security("C:\MData\DJA",C). Security("C:\MData\QQQ",C)));
Users browsing this topic
Guest (Hidden)
Similar Topics
Oct 1999: MACD of Relative Strength (1999)
by KTP2 11/11/2008 4:39:41 PM(UTC)
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.