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

Notification

Icon
Error

Options
Go to last post Go to first unread
ketal  
#1 Posted : Sunday, March 9, 2014 1:05:16 AM(UTC)
ketal

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/7/2014(UTC)
Posts: 17

Thanks: 6 times

Hi,

I am trying to code Demark TD sequential. Currently working on the first part of the code i.e TD buy/sell set up.

TD Buy Set Up- Need 9 consecutive close each one less than the corresponding close four bars earlier.

I have done some coding for TD set up but there is some errors coming in. Request members to please look into it and correct/help.

TD Buy Set up

Indicator Name : 9+
C<Ref(C,-4) AND Ref(C,-1)<Ref(C,-5) AND Ref(C,-2)<Ref(C,-6) AND Ref(C,-3)<Ref(C,-7) AND Ref(C,-4)<Ref(C,-8) AND Ref(C,-5)<Ref(C,-9) AND Ref(C,-6)<Ref(C,-10) AND Ref(C,-7)<Ref(C,-11) AND Ref(C,-8)<Ref(C,-12)

Expert

1) Set Up 9
Ref( Fml("9+"),0)=1

2) Set Up 8
Ref( Fml("9+"),1)=1

3) Set Up 7
Ref( Fml("9+"),2)=1

4) Set Up 6
Ref( Fml("9+"),3)=1

5) Set Up 5
Ref( Fml("9+"),4)=1

6) Set Up 4
Ref( Fml("9+"),5)=1

7) Set Up 3
Ref( Fml("9+"),6)=1

8) Set Up 2
Ref( Fml("9+"),7)=1

9) Set Up 1
Ref( Fml("9+"),8)=1

The above expert put 1-2-3-4-5-6-7-8-9 set up numbers below the bars if , satisfy the condition.

The problem I am facing is that if after 9, if next bar also satisfy the condition of C<REF(C,-4) there is a number 9 below this (next bar) also, which must not be there. How to make it possible in metastock that even if very next bar after 9 is satisfying the condition it does not show the number 9 . Kindly help.

Attached is the chart showing the above problem.

UserPostedImage

Regards,
K

henry1224  
#2 Posted : Sunday, March 9, 2014 5:30:27 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 Forward Ref functions, they will never show up for the current bar
ketal  
#3 Posted : Sunday, March 9, 2014 9:55:42 PM(UTC)
ketal

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/7/2014(UTC)
Posts: 17

Thanks: 6 times
henry1224 wrote:
You are using Forward Ref functions, they will never show up for the current bar

Hi henry,

Kindly pardon me, but I didnt understand what you have written. I have just started learning metastock coding.

Kindly help.

Regards,
K
henry1224  
#4 Posted : Monday, March 10, 2014 5:55:00 AM(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)
this is a forward Ref function Ref( Fml("9+"),1)=1

for a regular Ref function it should read Ref( Fml("9+"),-1)=1

the difference is in the bold

The closest bar that your formula would plot would be the 8th bar from the right edge of the chart
Users browsing this topic
Guest (Hidden)
Similar Topics
Has anyone found a TD Sequential expert or addin that works sucessfully (Formula Assistance)
by SAILBEARS1 11/4/2009 8:37:27 AM(UTC)
TD Sequential & TD Combo (Product Wish List)
by Crusier 2/26/2009 8:28:00 PM(UTC)
TD Sequential on Metaststock 10 Pro? (MetaStock)
by the13th 10/14/2006 11:18:32 PM(UTC)
TD Sequential (MetaStock Developer's Kit (MDK) Assistance)
by Packer 9/20/2005 6:03:08 AM(UTC)
TD Sequential Indicator (Formula Assistance)
by bobhun 3/15/2005 1:38:57 AM(UTC)
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.