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

Notification

Icon
Error

Options
Go to last post Go to first unread
nishant  
#1 Posted : Wednesday, January 19, 2011 10:46:05 PM(UTC)
nishant

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/9/2007(UTC)
Posts: 35

Thanks: 1 times
Hello fellow traders, I have come up with a formula to project the expected range for the subsequent trading day, but am unable to make indicator for the same. Following is the requirement which i'm looking for: If C>O, 3H + 2L + C = X If C
nishant  
#2 Posted : Thursday, January 20, 2011 4:39:12 AM(UTC)
nishant

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/9/2007(UTC)
Posts: 35

Thanks: 1 times
IMPORTANT: I do not know why the 3 cases are not shown in above msg despite it was perfect at the time of creating this thread..and am unable to edit my original msg... please find the 3 case below.. [i hope this time it shows]..... {C > O then X = 3H + 2L + C}.........{C < O then X = 2H + 3L + C}.......{C = O then X = 1.5*H + 1.5*L + 3C}
henry1224  
#3 Posted : Thursday, January 20, 2011 6:46:32 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)
X:=If(C>O,(3*H+2*L+C),
If(C<O,(2*H+3*L+C),
(1.5*H+1.5*L+3*C)));

PH:=(X/3)-L;
PL:=(X/3)-H;

Ref(PH,-1);Ref(PL,-1);PH;PL;


Metastock will not project past the last bar shown!

Ref(PH,-1) and Ref(PL,-1) are values from the previous day

PH and PL are the values for the current bar
nishant  
#4 Posted : Friday, January 21, 2011 7:04:28 AM(UTC)
nishant

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/9/2007(UTC)
Posts: 35

Thanks: 1 times
Thanks for putting your time.. and am feeling vexed on the fact that Metastock doesn't project past the last bar show... But can you review once again your posting... i think some error just like in case of mine must have occurred... i mean to say that in your coding i cant see the 3rd case, viz. If C=O... though the second part is there...just clarify me on the same... i'm failing to modify your code by prefixing C=O.. its showing some kind of unexpected error...
henry1224  
#5 Posted : Friday, January 21, 2011 10:28:52 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)
Trust me, it's in there!!!

X:=If(C>O,(3*H+2*L+C),
If(C<O,(2*H+3*L+C),
(1.5*H+1.5*L+3*C)));

PH:=(X/3)-L;
PL:=(X/3)-H;

Ref(PH,-1);Ref(PL,-1);PH;PL;


there are only 3 possible outcomes 1: Close is greater than Open 2;Close is less than the Open and 3: Close is equal to the Open

now lets look at the code of X: the first line states condition 1,{result}, {else},the second line states condition 2{result},{else},in the third line condition 3 does not have to be mentioned,just the result!!!

Ref(PH,-1)and Ref(PL,-1) are the values projected 1 day ahead and how they would plot in actual trading

PH and PL are the values plotted on the last bar that you would use for the next bar
nishant  
#6 Posted : Sunday, January 23, 2011 9:31:53 PM(UTC)
nishant

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/9/2007(UTC)
Posts: 35

Thanks: 1 times
Oops!.. sorry!.. now i got your point... And there is all reason to trust you for i understand you are quite senior in codification.. :D... Thanks for all help and explanation you have provided me...
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.