PureBytes Links
Trading Reference Links
|
------------------------------------------------------------------------
You cannot reply to this message via email because you have chosen not
to disclose your email address to the group.
To reply: http://groups.yahoo.com/group/equismetastock/post?act=reply&messageNum=5052
------------------------------------------------------------------------
The variable A produces an indicator that results in values of 0 to
10. In order to use this as a time expression you would need to make
the indicaor adaptive. Equis does not allow adaptives per se. The
work around is to use an adaptive DLL which is not readily available,
prev statements in the fashion that Roy mentioned, or to use if
statements. A multi-period indicator using if statements would look
like this:
{Multi-Period If Adaptive}
N:=Input("A",1,100,5);
A:=Abs(CMO(C,N))/10;
If(A>0 AND A <1, HHV(C,1),
If(A>1 AND A <2, HHV(C,2),
If(A>2 AND A <3, HHV(C,3),
If(A>3 AND A <4, HHV(C,4),
If(A>4 AND A <5, HHV(C,5),
If(A>5 AND A <6, HHV(C,6),
If(A>6 AND A <7, HHV(C,7),
If(A>7 AND A <8, HHV(C,8),
If(A>8 AND A <9, HHV(C,9),
HHV(C,10)))))))))); {end}
The problem with this indicator is that it is not very smooth. Notice
that in the above indicator that you are confined to whole numbers
between 1 and 10. You could further refine the output by adding more
if statements to capture 1/2 of the values between the whole
numbers. Such as:
If(A>0 AND A < 0.5, HHV(C,0.5),
If(A>0.5 AND A < 1, HHV(C,1),
If(A>1 AND A <1.5, HHV(C,1.5),
If(A>1.5 AND A <2, HHV(C,2),
The limitation to this method is that you are limited to the number
of lines that you can use in a statement. Another solution in order
to smooth the indicator is to use a moving average of the indicator.
Doing this will introduce some lag so it is advisable to use low lag
moving averages such as those that Ehlers has proposed.
Hope this helps!
P
--- In equismetastock@xxxx, ihh3 <no_reply@xxxx> wrote:
> N:=Input("A",1,10,5);
> A:=Abs(CMO(C,9))/10;
> { N:=A; ??? }
> HHV(C,N);
> {This variable or expression must contain only constant data}
>
> the hhv(c,opt1); is permitted.
> the hhv(c,input("a",1,10,5)); is permitted.
> but hhv(c,abs(cmo(c,9))/10); in not.
>
> anyone know how to have a multi-period HHV?
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sell a Home for Top $
http://us.click.yahoo.com/RrPZMC/jTmEAA/MVfIAA/BefplB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|