Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 7/24/2009(UTC) Posts: 3
|
I am trying to figure out how to create a oscillator that would oscolate the ave spread between two stocks within a simular index/ ie. gold, industrial, finance ect.
For example:
I have stock X and stock Y in the gold index. On ave the hedge is say 2 and currently the hedge is 3. (this is shown on the oscolator) Thus I would be able to go short one and long the other until the ave returns back to normal.
Does this make sence? Could anyone help with this?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Hi s-2-t,
Welcome to the Forum.
Have a look at the use of the Security() function.
wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 7/24/2009(UTC) Posts: 3
|
Thanks for your reply. I started to look at that. When refering on one chart from another chartwouln't I need to run the actual calculation via an xl doc or formula with the DDE link funtion?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
s-2-t wrote:Thanks for your reply. I started to look at that. When refering on one chart from another chartwouln't I need to run the actual calculation via an xl doc or formula with the DDE link funtion? Probably not -- depending on the complexity of your computation, but you should be able to do something along the lines of: Code:
thisData:=CLOSE;
otherData:=Security("path to my data or online\symbol",CLOSE);
spread:=thisData-otherData;
avSpread:=mov(spread,10,s);
{plot}
spread;
Hope this gives you some inspiration. wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 7/24/2009(UTC) Posts: 3
|
Oh I forgot to mention that it is for intraday trading only.
|
|
|
|
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.