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

Notification

Icon
Error

Options
Go to last post Go to first unread
G-fer  
#1 Posted : Sunday, September 29, 2013 10:06:28 PM(UTC)
G-fer

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 8/15/2013(UTC)
Posts: 1

Hi ...

I'm looking for a way to use the expert advisor to put a symbol below the bar that is 40 bars back from the current bar. I tried
c=ref(c,-40) and o=ref(o,-40)
in the expert symbol editor, but that didn't work.

Any ideas?

G-fer
rkkarnani  
#2 Posted : Monday, September 30, 2013 8:03:16 AM(UTC)
rkkarnani

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 11/23/2009(UTC)
Posts: 13

Hi, I am very very New to Metastock 'coding' and please just laugh if the Solution I offer is hilarious !

The formula will mark the 40th Bar from Current bar ! As next bar starts to form it will mark the next bar, hence all the bars previous to the 40th Bar shall be marked !

Use this simple solution :

(Ref(C,40)>0)
henry1224  
#3 Posted : Monday, September 30, 2013 3:12:01 PM(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 are using a forward Ref function which looks forward in your case 40 bars
I don't see the logic in this experiment!
I could see it if you have a defined event, but to look back 40 bars to affect a trading decision doesn't make sense.
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.