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)
|
5 PREVs saved so far... will keep working on it!
--8<------------------------------
{Henry1224 - TrapAbs Indicator}
{modified by wabbit 17Jul05}
A:=C/Input("divide",1,144,40);
Marge:=If(A>144,144,If(A>89,89,If(A>55,55,If(A>34,34,If(A>21,21,If(A>13,13,If(A>8,8,If(A>5,5,If(A>3,3,If(A>2,2,1))))))))));
Trapabs:=If(Ref(C,-1)>=PREV,
(If(C>(PREV+marge),C-marge,If(C>=PREV,PREV,If(C<PREV,C+marge,0)))),
(If(C<(PREV-marge),C+marge,If(C<=PREV,PREV,If(C>PREV,C-marge,0)))));
MA:=Mov(Trapabs,5,S);
{plots}
MA;
Trapabs;
--8<------------------------------
wabbit :D
[Edit]
Seven down, wonder how many to go?
--8<------------------------------
{Henry1224 - TrapAbs Indicator}
{modified by wabbit 17Jul05}
A:=C/Input("divide",1,144,40);
Marge:=If(A>144,144,If(A>89,89,If(A>55,55,If(A>34,34,If(A>21,21,If(A>13,13,If(A>8,8,If(A>5,5,If(A>3,3,If(A>2,2,1))))))))));
Trapabs:=If(Ref(C,-1)>=PREV,
(If(C>(PREV+marge),C-marge,If(C>=PREV,PREV,C+marge))),
(If(C<(PREV-marge),C+marge,If(C<=PREV,PREV,C-marge))));
MA:=Mov(Trapabs,5,S);
{plots}
MA;
Trapabs;
--8<------------------------------
wabbit :D
|