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