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

Notification

Icon
Error

Options
Go to last post Go to first unread
Arna  
#1 Posted : Saturday, September 9, 2006 1:17:22 PM(UTC)
Arna

Rank: Newbie

Groups: Registered, Registered Users
Joined: 9/9/2006(UTC)
Posts: 5

Hi

I am trying to use the count version of td-sequential, but when I try to use it I only see a line in the chart. Can someone see or know what i do wrong?

This is the formula i use:

{TDSeqBuySignal}

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

{TDSeqSellSignal}
+
(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) )

Thanks in advance for any help.

hayseed  
#2 Posted : Saturday, September 9, 2006 2:22:54 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey arna.... not sure of the need for the '+' under sell, other than that everything checks out ok....

plots a binary 1 for buys and sells perfectly here on everything....... are you expecting something other than the binary wave?....h

i just put both in 1 indicator and used colors to differentiate between buy/sell

(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) );


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

Arna  
#3 Posted : Saturday, September 9, 2006 2:46:27 PM(UTC)
Arna

Rank: Newbie

Groups: Registered, Registered Users
Joined: 9/9/2006(UTC)
Posts: 5

Thanks for your answer. I thought it was the countin version I got is that Wrong?
hayseed  
#4 Posted : Saturday, September 9, 2006 11:11:22 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey arna..... are you talking about counting like this.....h
Arna  
#5 Posted : Sunday, September 10, 2006 4:39:54 AM(UTC)
Arna

Rank: Newbie

Groups: Registered, Registered Users
Joined: 9/9/2006(UTC)
Posts: 5

Yes, that was what I was talking about.
hayseed  
#6 Posted : Sunday, September 10, 2006 7:19:21 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey arna.... in that situation you would want to create an expert with symbols and rules for each day.... place your numbered rules in top down order, so symbol 1 would be day 9 , symbol 2 would be day 8 and so on.....

as you know, there are more rules than that for demarks deal, such as the buy , perfection buy ,sell and perfection sell..... those can be coded in also....

it's a risk running exe's from the internet, esp from unknowns.... also as henry has mentioned before there is a risk swapping experts and such.... you should be able to create the expert but if not here is the standard metastock style fosetup exe to auto-install the expert in your metastock version 9 or higher.... clicking that link leads to the 2 standard warnings.... clicking run on both will auto install the expert.... have metastock running just in case it needs to be....

i'll code in the rest later.... the expert is named arna version td sequential ..... rename to suit....h

Arna  
#7 Posted : Tuesday, September 12, 2006 11:15:22 AM(UTC)
Arna

Rank: Newbie

Groups: Registered, Registered Users
Joined: 9/9/2006(UTC)
Posts: 5

Thanks for your help.It worked. I have searched for that but could not find it. True I chould not run exe. from unknown, but, it worked well. Guess it is safer to download it from a stockforum then everywhere else.
Thanks again.

hayseed  
#8 Posted : Tuesday, September 12, 2006 5:13:53 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey arna.... the code for sell countdown is the same except replace the '<' with a '>'.... i coded both buy and sell on up to 14.... the exploration would be just the day 9 code.... i ran it last night .... came up with a bunch oil related issues...

day 9 is the buy signal.... the perfection buy has a few more conditions.... below is a very rough first draft of it......

i also created a layout and template with both daily and weekly time frames, looks promising....

i also created a intraday 5 time frame layout and template.... looks equaly promising.....

i'll up date that exe later to include everything along with the 4 companion indicators for the layout/template....

and btw, thanks for the question.....we all learn.....h

-----------------------------------------------

a:=(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) );
aa:=(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) );

aaa:=(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) );

aaaa:=(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) );

b:=If((a=1) AND (aa<>1),1,0);
x:=ValueWhen(1,b,L);

bb:=If((aa=1) AND (aaa<>1),1,0);
xx:=ValueWhen(1,bb,L);

bbb:=If((aaa=1) AND (aaaa<>1),1,0);
[censored]:=ValueWhen(1,bbb,L);

bbbb:=If(aaaa,1,0);
[censored]x:=ValueWhen(1,bbbb AND (BarsSince(bbbb)<BarsSince(bbb)) AND (BarsSince(bbbb)<BarsSince(b)),L);

y:=([censored]x<x AND [censored]x<xx) OR ([censored]<xx AND [censored]<x);


bcon:=y;

scon:=C>Ref(C,-4);

bset:=BarsSince(bbbb)<BarsSince(bbb);

sset:=y;

setup:=If(bset,1, If(sset,-1,PREV));

Cross(If(setup=1 AND bcon,1,If(setup=-1 AND scon,-1,PREV)),0.5);

--------------------------------------------------------

stop laughing patrick, i said it was rough.....

wabbit  
#9 Posted : Tuesday, September 12, 2006 5:43:06 PM(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)
h....

Cannot
Code:

a:=(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) );


be written as:
Code:

a:=Sum(C < Ref(C,-4),6)=6



This will save you some typing!!!


wabbit [:D]
hayseed  
#10 Posted : Wednesday, September 13, 2006 7:15:08 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey wabbit..... neat... thanks..... thats what we call thinking outside the box....

it also simplyfies some other ideas i've been working on but couldn't get past the 'sum if' part... thanks again.....h

Arna  
#11 Posted : Thursday, October 19, 2006 12:42:51 PM(UTC)
Arna

Rank: Newbie

Groups: Registered, Registered Users
Joined: 9/9/2006(UTC)
Posts: 5

Hi and thanks for all your help. I have made it to count to 13.

Regards
Arna
kanglc  
#12 Posted : Sunday, January 20, 2008 10:35:54 PM(UTC)
kanglc

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 1/18/2008(UTC)
Posts: 1

Hi Hayseed,

I'm still new in using Metastock programming and currently, I'm using Metastock Ver 8.0. I believe that the auto-install the expert you mentioned here is for ver 9.0 or higher. Do you have the file compatible with ver 8.0? I'm very glad if you could kindly help me.

Thanks,

Richard

Ashok  
#13 Posted : Friday, February 1, 2008 8:16:13 AM(UTC)
Ashok

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/1/2006(UTC)
Posts: 2

Hi,

I am aware this post is an old one but i just got introduced to Tom demark's sequential indicator. I have used your programming and coding skills and got this on my Metastock. Thanks for the effort.

Just wanted to check the code you have written is for Setup have you attempted the code for countdown? stop loss.Correct me if i am wrong i guess the concept of set up and countdown are different right?

Secondly i wanted a clarificaiton

What is the entry signal in the setup? Is it close above the 8th or 9th bar is it? and stop loss is close below the entry bar is it?

Can we use the set up as an indicator in itself without using the count down.

Thanks for your support and assistance.

Cheers Ashok

hayseed  
#14 Posted : Sunday, September 15, 2019 12:04:08 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey hovaresit...... it's been quite a while since my dealing with metastock code but it appears the variables are being caught by a html watch program..... 3 x's in a row must throw a red flag and get censored..... you can replace them with anything not already used.....h such as,

Code:

a:=(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) );
aa:=(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) );

aaa:=(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) );

aaaa:=(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) );

b:=If((a=1) AND (aa<>1),1,0); x:=ValueWhen(1,b,L);

bb:=If((aa=1) AND (aaa<>1),1,0); xx:=ValueWhen(1,bb,L);

bbb:=If((aaa=1) AND (aaaa<>1),1,0); any:=ValueWhen(1,bbb,L);

bbbb:=If(aaaa,1,0); anyx:=ValueWhen(1,bbbb AND (BarsSince(bbbb) y:=(anyx

bcon:=y;

scon:=C>Ref(C,-4);

bset:=BarsSince(bbbb) sset:=y;

setup:=If(bset,1, If(sset,-1,PREV));

Cross(If(setup=1 AND bcon,1,If(setup=-1 AND scon,-1,PREV)),0.5);

Edited by user Sunday, September 15, 2019 12:09:36 PM(UTC)  | Reason: Not specified

Users browsing this topic
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.