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

Notification

Icon
Error

Options
Go to last post Go to first unread
Spaceant  
#1 Posted : Friday, August 4, 2006 12:14:01 AM(UTC)
Spaceant

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/16/2005(UTC)
Posts: 182

I try to code a simple indicator to to show the correction from recent top and bottom. Well, the key problem is that: how to define the top and bottom....

SSig:=Input("Correction from [1]Top [2]Bottom",1,2,1);
x:=Input("Data: 1-H 2-L 3-C",1,3,3);
x:=If(x=1,H,If(x=2,L,C));
Pd:=Input("# of periods",1,9999,100);
HHi:=HHV(H,Pd);
LLo:=LLV(L,Pd);
Rt:=(HHi-X)*100/(HHi-LLo);
Rb:=(X-LLo)*100/(HHi-LLo);
Pc:=If(SSig=1,Rt,Rb);
Pc

It appears to be showing what I want, but it is not user friendly....

Any better idea to code it?

Could I set the indicator to just show the most recent number of bars (as set by "Pd")?

sa

p/s I have tried to attach two captured images, but failed.... how to do that??

Spaceant  
#2 Posted : Wednesday, August 9, 2006 10:28:58 PM(UTC)
Spaceant

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/16/2005(UTC)
Posts: 182

would anyone comment..?

also, how do I set the indicator to just display a number of bars set by "Pd"?

sa

wabbit  
#3 Posted : Wednesday, August 9, 2006 11:25:01 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)
Code:

SSig:=Input("Correction from [1]Top [2]Bottom",1,2,1);
x:=Input("Data: 1-H 2-L 3-C",1,3,3);
x:=If(x=1,H,If(x=2,L,C));
Pd:=Input("# of periods",1,9999,100);
HHi:=HHV(H,Pd);
LLo:=LLV(L,Pd);
Rt:=(HHi-X)*100/(HHi-LLo);
Rb:=(X-LLo)*100/(HHi-LLo);
Pc:=If(SSig=1,Rt,Rb);
x:=BarsSince(Cum(1)=LastValue(Cum(1)-pd))>=0;
x*pc;



Hope this helps.

wabbit [:D]
wabbit  
#4 Posted : Wednesday, August 9, 2006 11:35:20 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)
SA,

You might also want to look at the indicators to see what information they are giving you about the trend direction and strength. Have a look at this combination of the indicators for example:

Code:

Pd:=Input("# of periods",1,9999,100);

HHi:=HHV(H,Pd);
LLo:=LLV(L,Pd);

Rng:=HHi-LLo;
Rt:=(HHi-H)/Rng;
Rb:=(L-LLo)/Rng;

100*(Rb-Rt);


A move above zero indicates an uptrend? A move below zero is downtrend? The distance from the zero gives an indication of the strength?

Is this how you would interpret the information?


wabbit [:D]
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.