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

Notification

Icon
Error

Options
Go to last post Go to first unread
Vega  
#1 Posted : Wednesday, April 4, 2007 8:46:51 AM(UTC)
Vega

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/4/2007(UTC)
Posts: 11

Hello Equis&Reuters population,

Can anyone help what´s wrong with my first formula>

Cross(LinearReg(C,5), LinearReg(C,13))

It plots the cross correctly, so simple cross of 2 indicators with different
timezones, but for some reason when I add the same indicator for Expert
trends section to dwaw a green and red line, those lines are not allways
marked correctly when cross occures. I am using EOD data.


Bullish
Cross(LinearReg(C,5), LinearReg(C,13))

Bearish
Cross(LinearReg(C,13), LinearReg(C,5))

Does it something to do that I use Close price and with EOD data these crosses
perhaps happened during the day ?

Also, I would really appreciate if someone could give me example how to use "div" (divergence)
formula ie. with LinearReg.

Regards,

Vega




wabbit  
#2 Posted : Wednesday, April 4, 2007 9:10:36 AM(UTC)
wabbit

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 Vega...

To start with, the code you have provided should not be used in an expert Advisor Trends section, use this instead:

Bullish
LinearReg(C,5)>LinearReg(C,13)

Bearish
LinearReg(C,5)<LinearReg(C,13)

Your code was triggered on particular bars and was more suited to being used as a highlight or symbol. Trends usually cover a range, so the above code is more suited.

Please have a read of the MS Users Manual to find out more on creating experts.


As for the Div() code, I would steer well clear of it as it uses dynamic indicators (ZigZag) in its construction, which means it connot be traded in real life.

If you are looking for divergences I strongly suggest you look at purchasing Jose Silva's All-In-One divergence kit, see: http://www.metastocktools.com/MACDH/96diverg.htm
*PP  
#3 Posted : Wednesday, April 4, 2007 9:25:51 AM(UTC)
*PP

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/1/2006(UTC)
Posts: 135
Location: Romania

Vega,

1.ur formulas are corect and the expert advisor its corectly marking those crosses on the chart.

2. Also the divergence function uses zig zag and it is uselles.

3. U really should read metastock help because all answes are there.

4. if u really want it here it is: divergence(c,linearreg(c,13),0.5)

cheers

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.