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

Notification

Icon
Error

Options
Go to last post Go to first unread
charmeta  
#1 Posted : Saturday, March 4, 2006 12:12:09 AM(UTC)
charmeta

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/25/2005(UTC)
Posts: 23
Location: Melbourne, Australia

Hello, I want to insert a variable into the Ref function, but MetaStock won't let me. Is there a way around this? Example: I want to create an exploration to look for positive divergence between stochastic and price. I used the following formula to return the number of bars since the second most recent stochastic trough: Tb:=TroughBars(2,Stoch(5,3),.1); Now I want the closing price Tb bars ago, so I can see if it's higher than the current close. Neg(Tb); Ref(C,Tb) Returns the error "This variable or expression must contain only constant data".
mstt  
#2 Posted : Saturday, March 4, 2006 12:28:14 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Charmeta Use the Forum dll Ref function. This does allow a variable to be used. Go to the Downloads link to find the dll. Roy MetaStock Tips & Tools
charmeta  
#3 Posted : Saturday, March 4, 2006 12:58:06 AM(UTC)
charmeta

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/25/2005(UTC)
Posts: 23
Location: Melbourne, Australia

Thanks mstt. I've installed the forum dll and it's working. Also many thanks to patrick for the dll collection. charmeta
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.