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

Notification

Icon
Error

Options
Go to last post Go to first unread
set4lifenj  
#1 Posted : Thursday, May 12, 2005 9:33:23 PM(UTC)
set4lifenj

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/23/2005(UTC)
Posts: 9

What would be the best way to calculate moving averages that are in a very close range of each other? I guess the best way to explain what I'm looking to do is an example. Let's say I want to find charts that have a .04 cent range of the following ma's (actually Tim Tillson 'T3') I would have values as T3-3-1.36451 T3-5-1.36311 T3-8-1.35341 T3-13-1.34258 Optional T-3-21-1.38606 (3,5,8,13, are all periods) With a T3 > yesterdays value. I mostly play sub 2.00 stocks and currently scanning 300 charts a night. It sure takes some time but finding something LNUX sure pays for my time. Any suggestions? Thanks for your time.
henry1224  
#2 Posted : Friday, May 13, 2005 12:50:24 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)
Are you asking for a binary indicator that states when all of the T3's are below the high and above the low of a .04 range bar with the T3 > Ref(T3,-1)?
wabbit  
#3 Posted : Friday, May 13, 2005 12:51:48 AM(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)
I am away from my own computer at the moment, so havent tested this submission, but you could try something like: create an indicator using the formula: ma3:=mov(c,3,s); ma5:=mov(c,5,s); ma8:=mov(c,8,s); ma13:=mov(c,13,s); ma21:=mov(c,21,s); threshold:=0.04; maMin:=min(min(min(min(ma3,ma5),ma8),ma13),ma21); maMax:=max(max(max(max(ma3,ma5),ma8),ma13),ma21); mamax-maMin<threshold; This will produce a 1 if the range is less than the threshold (or spread might be a better term?) and a 0 otherwise. If you add this to an exploration, you can add the other parameters you are looking for, c<2 etc. If this doesnt work, then let me know and when I get home I will have another look at it, or maybe someone else will chime and lend you some assistance. Hope this helps. wabbit :D
henry1224  
#4 Posted : Friday, May 13, 2005 1:05: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)
due to the number of variables in each T3, you will have to create separate T3 of each length, Then you will have to create the binary indicator using the Fml() function for each T3 T3:=Fml("T3"); T5:=Fml("T5"); T8:=Fml("T8"); T13:=Fml("T13"); T21:=Fml("T21"); Con1:=If(H>Max(T3,Max(T5,Max(T8,Max(T13,T21))))1,0); Con2:=If(L<Min(T3,Min(T5,Min(T8,Min(T13,T21))))1,0); (Con1+Con2)=2 and ATR(1)=.04 and T3>Ref(T3,-1)
set4lifenj  
#5 Posted : Friday, May 13, 2005 3:04:53 AM(UTC)
set4lifenj

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/23/2005(UTC)
Posts: 9

WOW, thanks guys! Wabbit, your code did the trick. Exactly what I was looking for! I had to replace "mov(c,3,s);" with what henry had posted "Fml("T3")" Thank you! I assume if I want to take one of the ma's out of the line, I would have to remove one 'min' and one 'max' out of the line?
wabbit  
#6 Posted : Friday, May 13, 2005 8:35:50 AM(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)
Thats right.... If you have two variables, you need one min/max to compare the values; if you have three variables, you need two mins/maxs; if you have 'n' variables, you need 'n-1' mins/maxs Hope this helps. wabbit :D BTW: whats a T3?
set4lifenj  
#7 Posted : Friday, May 13, 2005 2:40:38 PM(UTC)
set4lifenj

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/23/2005(UTC)
Posts: 9

wabbit wrote:
BTW: whats a T3?
A super smooth modified moving averages. They don't whip saw like sma or ema. Here is the code http://forum.equis.com/viewtopic.php?t=530 I use them with hot .618 (fib number)
henry1224  
#8 Posted : Saturday, May 14, 2005 12:33:56 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)
A:=Input("1=P 2=O 3=H 4=L 5=C 6=MP 7=TYP 8=OHLC",1,8,5); A1:=If(A=1,P,If(A=2,O,If(A=3,H,If(A=4,L,If(A=5,C,If(A=6,MP(),If(A=7,Typical(),(O+H+L+C)/4))))))); e1:=Mov(A1,3,E); e2:=Mov(e1,3,E); e3:=Mov(e2,3,E); e4:=Mov(e3,3,E); e5:=Mov(e4,3,E); e6:=Mov(e5,3,E); e1a:=Mov(A1,5,E); e2a:=Mov(e1a,5,E); e3a:=Mov(e2a,5,E); e4a:=Mov(e3a,5,E); e5a:=Mov(e4a,5,E); e6a:=Mov(e5a,5,E); c1:=-.618*.618*.618; c2:=3*.618*.618+3*.618*.618*.618; c3:=-6*.618*.618-3*.618-3*.618*.618*.618; c4:=1+3*.618+.618*.618*.618+3*.618*.618; T5:=c1*e6a+c2*e5a+c3*e4a+c4*e3a; T3:=c1*e6+c2*e5+c3*e4+c4*e3; T3;T5; You can also checkout the expert in the formula section
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.