Rank: Newbie
Groups: Registered, Registered Users Joined: 3/28/2009(UTC) Posts: 5
|
I want to write a formula that the closing price and low price (a) is higher than the recent lowest price, and then there is another day the closing price is higher than (a)'s highest price.
I have try several time but didnt success, could anyone help? Thank you verry much
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
I think you have to define what "recent lowest price" means. Then you can compare today's price to that value.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 3/28/2009(UTC) Posts: 5
|
if recent lowest price is the lowest price in a month, then what can i do?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
Here is a function for the previous months high/low from Jose, a contributor of this board once upon a time. Plot it over the stock and use the function Cross() to create signals. Hope this gets you going.
{monthly_H_L}
mth1:=If((Month()=Ref(Month(),-1)+1) OR (Ref(Month(),-1)-Month()=11),1,0);
H1:=HighestSince(1,mth1=1,H); H2 := If((Ref(Month(),-1)<Month()) OR (Ref(Month(),-1)-Month()=11),Ref(H1,-1),0); H3 := HighestSince(1,(H2<>0),H2); H3;
L1 :=LowestSince(1,mth1=1,L); L2 := If((Ref(Month(),-1)<Month()) OR (Ref(Month(),-1)-Month()=11),Ref(L1,-1),0); L3 := HighestSince(1,(L2<>0),L2); L3
|
|
|
|
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.