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

Notification

Icon
Error

Options
Go to last post Go to first unread
alfonsine  
#1 Posted : Thursday, May 13, 2010 9:27:17 PM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

Need an indicator to highlight 20-Day High and 20-Day Low. 20-Day High. If the last price bar (Range from High to Low) exceed the high of the last 20 days. Indicated by a blue strip. 20-Day Low. If the last price bar (Range from High to Low) goes below he low of the last 20 days . Indicate by a red vertical strip. Thanks.
johnl  
#2 Posted : Saturday, May 15, 2010 8:09:34 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

Can you doctor up a chart to show what you are looking for?
v.trader  
#3 Posted : Saturday, May 15, 2010 10:53:57 PM(UTC)
v.trader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/26/2009(UTC)
Posts: 76
Location: Toronto, Canada

I don't think you can automatically make Metastock draw vertical lines..... but you can always program an indicator to do such things: x:= H; y:= L; If(x>HHV(H,20),1,If(LLV(L,20)>y,-1,0));
alfonsine  
#4 Posted : Saturday, May 15, 2010 11:52:52 PM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

Many thanks v.trader for your response. I managed to research a bit on the forum and tweak a bit on the formulation and got want I want. Here it is. nh:=H>Ref(HHV(H,21),-1); nl:=L
alfonsine  
#5 Posted : Saturday, May 15, 2010 11:53:37 PM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

Many thanks johnl for your response. I managed to research a bit on the forum and tweak a bit on the formulation and got want I want. Here it is. nh:=H>Ref(HHV(H,21),-1); nl:=LIf(nh,1,If(nl,-1,0)) It works beautifully for me.
alfonsine  
#6 Posted : Saturday, May 15, 2010 11:57:32 PM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

Sorry for the wrong forumula. This is the right one. nh:=H>Ref(HHV(H,21),-1); nl:=L
alfonsine  
#7 Posted : Saturday, May 15, 2010 11:58:24 PM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

John, Here is the correct version. Work well for me. nh:=H>Ref(HHV(H,21),-1); nl:=L
alfonsine  
#8 Posted : Sunday, May 16, 2010 12:05:04 AM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

nh:=H>Ref(HHV(H,21),-1); nl:=L
alfonsine  
#9 Posted : Sunday, May 16, 2010 12:09:03 AM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

Correct Formula: I have a problem of cut and paste. Everytime I cut and paste, the formula becomes mixed . I don't know why. So now I cut and paste and then type out the forumula , hope it will appear correctly. If not , I don't know how to put in this forum correctly. nh:H>Ref(HHV(H,21),-1); nl:L
alfonsine  
#10 Posted : Sunday, May 16, 2010 12:11:17 AM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

I am so sorry. Formula still cannot appear as I want to appear, although I type it out . Don't know what to do next.
v.trader  
#11 Posted : Sunday, May 16, 2010 8:44:20 AM(UTC)
v.trader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/26/2009(UTC)
Posts: 76
Location: Toronto, Canada

Hi, The forum has an issue of showing the sign "smaller than" and this is why you probably cannot paste it... Don't worry I understand what you are trying to do... Happy trading :) VT
alfonsine  
#12 Posted : Tuesday, May 18, 2010 7:23:01 AM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

Hi VT, I understand that there is a way to change the color of the price bar . I am thinking instead of the 20day high and 20 day low indicator, everytime it hit a 20 days high I like to change the price bar to blue and everytime it hit the 20 day low , change the price bar to red. I understand that there is a highlight formula for the price but just cannot get it. Would you be kind enough to supply the formula the color change of price bar. many thanks
vienna  
#13 Posted : Tuesday, May 18, 2010 8:06:08 AM(UTC)
vienna

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/14/2009(UTC)
Posts: 140
Location: Austria

Hi

as I remember there is no function to change the color of a line for a specific area. You can only change the color for the whole line. Beside this is only possible manually (and not from any formula)

But you can output 2 different lines (variables) and set alternatly one or the other to 0. then manually change one line to one color and the other line to an other color.

The other possiblity is to create an expert advisor which is possible to show you such events with colors or special signs...
alfonsine  
#14 Posted : Tuesday, May 18, 2010 9:07:00 AM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

Thanks vienna, you are right. I read in the manual that there is a possible way to change the price bar color by highlight. By itself, metastock seem only can accept binary output. i thought by changing color would be more visible. thanks for the assistance. Hope others could enlightened more if they knows.
rkkarnani  
#15 Posted : Tuesday, May 18, 2010 10:29:16 AM(UTC)
rkkarnani

Rank: Member

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

To highlight a Bar for given conditions, you need to use the formula in EXPERT under the tab "Highlight". This should do what you need. I am a novice myself and prone to err, but no harm in giving it a try
henry1224  
#16 Posted : Tuesday, May 18, 2010 4:20:30 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)
Nhl:=If(H > Ref(HHV(h,20),-1),1,If(L < Ref(LLV(L,20),-1),-1,0));

now open an expert, click on the highlight tab,create a new highlight call it new highs

paste this formula

Nhl:=If(H > Ref(HHV(h,20),-1),1,If(L < Ref(LLV(L,20),-1),-1,0));
Nhl=1


create another highlight,call it new lows

Paste this formula

Nhl:=If(H > Ref(HHV(h,20),-1),1,If(L < Ref(LLV(L,20),-1),-1,0));
Nhl=-1


alfonsine  
#17 Posted : Wednesday, May 19, 2010 6:54:37 AM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

Thanks Henry
alfonsine  
#18 Posted : Monday, May 31, 2010 1:39:01 AM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

Hi VT, I am putting my swing exploration in the forum so that someone can assist me . I have a lot of sign smaller than. So I am unable to get the formulation out fully with the smaller symbol. Do u have any idea how to post smaller than sign on the forum
henry1224  
#19 Posted : Monday, May 31, 2010 1:47:57 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 have to use a space before and after the less than sign

Nhl:=If(H > Ref(HHV(h,20),-1),1,If(L < Ref(LLV(L,20),-1),-1,0));
Nhl=1

alfonsine  
#20 Posted : Monday, May 31, 2010 7:44:23 PM(UTC)
alfonsine

Rank: Member

Groups: Registered, Registered Users
Joined: 5/4/2010(UTC)
Posts: 18

Hi Henry, I try to add space before and after the less than sign. Still I am unable to input the less than sign into the forum.
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.