[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Re: peak - trough with variable



PureBytes Links

Trading Reference Links


here we see a daily progression of the zig line from the high pivot (in
blue). Each day zig tells us the price is headed down from that high. 5 days
into the Oct rally zigs finds that the rally has exceeded our retracement
setting and erases the blue lines, redrawing the low and establishing a
new up trend line. As price moved away from that new low zigs opinion
remains positive that the current bar is still part of the next leg
up...........



As the down trend exceeds the retracement setting we will see a new Pivot
top and a new down trend line drawn. any history of the blue lines will
vanish as the new down trend line is drawn.

Jayson

-----Original Message-----
From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...]
Sent: Friday, November 01, 2002 2:38 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: peak - trough with variable


--- In amibroker@xxxx, "Jayson" <jcasavant@xxxx> wrote:
> Estaban,
> no, until such time as your counter move has exceeded 1.2% the
turn is open
> change.

Zig may show the turn to have occurred but until the turn exceeds
the setting it is capable of reversing its self and simply erasing
any trace of its error.

Jayson,
Let me make a comment here.
>From the moment Zig detects a peak [some bars after the peak day], it
is a fact and it will not change in the future. We have a long and
interesting discussion on this behavior last summer. Tomasz created a
fine simulator on this purpose. The last peak, once established, will
not change, the last leg will search for the next trough.
DT


this is why zig can be so dangerous to rely on. when you
> system test zig is always correct. All of the turns have been
confirmed. In
> real life the system will not trade the way zig says it does.
>
> peak(ARRAY, change, n=1)
>
> Peak= a peak means simply the price today is lower than the price
yesterday
> and the price yesterday was higher than the price 2 days ago.
Picture a
> roof line. Peak is the peak of the roof
>
> Array= high, Low, Close value from which the calculations are made
>
> Change= the sensitivity of the confirmation. in this case a stock
who's move
> exceeds 1.2% cannot result in a vanishing signal. any counter move
after the
> 1.2% will result in a new leg being drawn. If the new move does
not exceed
> 1.2 percent and instead resumes the prior move than the turn is
erased and
> appears to have never been there to begin with.
>
> n=1 = which of the turns in the zigzag are you referring to? 1=
the last
> turn. 2= the turn prior to that, etc, etc
>
> if you are still lost contact me off list and I will send some
pictures,
>
>
>
> Jayson
>
> -----Original Message-----
> From: Esteban [mailto:ygroups@x...]
> Sent: Thursday, October 31, 2002 6:20 PM
> To: amibroker@xxxx
> Subject: Re: [amibroker] peak - trough with variable
>
>
> I think I've got it. Let me restate it, correctly, I hope.
>
> If the current bar reaches a retracement of 1.2% from the last
highest bar
> that is uncorrected, then it identifies that last high as the
peak. Right?
>
> <<The code I posted uses the high value to determine the turning
points. If
> you used the close then zig <<would use those values.
>
> Here's where I get confused, but I think I've got it now:
> peak(ARRAY, change, n=1)
> The point from which the peak function measures the % change
backwards to
> the high is the ARRAY in the formula. Right? So peak(L, 1.2 , 1)
would
> measure back to the high point from the current low, evaluating
whether or
> not it was >= 1.2%.
>
> If so then using the High value (as opposed to Low or Close) to
measure
> from a peak seems odd, as the retracement may have taken place from
the
> other price points of the bar. Part of why I've been confused about
this
> whole topic, since the examples I've seen use the high.
>
> Sorry to beat this to death. I've read lots of posts concerning zig-
zag and
> searched the manual, but I've never gotten the concept clear in my
mind.
>
> Esteban
>
>
> ----- Original Message -----
> From: Jayson
> To: amibroker@xxxx
> Sent: Thursday, October 31, 2002 3:59 PM
> Subject: RE: [amibroker] peak - trough with variable
>
>
> Esteban,
> no, peak looks BACK not forward. it uses zigzag to determine
turns in the
> market based on your setting, in your case 1.2%. The code I posted
uses the
> high value to determine the turning points. If you used the close
then zig
> would use those values. Zig is not time based but uses a percentage
> retracement to define a turn. from the "help" file.....
>
> PEAK (AFL 1.1)
>
> SYNTAX peak(ARRAY, change, n = 1)
> RETURNS ARRAY
> FUNCTION Gives the value of ARRAY n-th peak(s) ago. This
uses the
> Zig Zag function (see Zig Zag) to determine the peaks. n =1 would
return the
> value of the most recent peak. n =2 would return the value of the
2nd most
> recent peak. Caveat: this function is based on Zig-Zag indicator
and may
> look into the future.
> EXAMPLE peak(close,5,1)
>
>
>
> As DT correctly pointed out, the last turn in the series is
always open to
> change. tonight's peak may show a turn yesterday. if the market
corrects
> prior to your threshold being met (1.2%) then that peak will simply
> disappear. For this reason testing with zig/peak/trough is very
dangerous.
> to see how peak works drop zigzag on your price plot
>
> Jayson
>
> -----Original Message-----
> From: Esteban [mailto:ygroups@x...]
> Sent: Thursday, October 31, 2002 3:26 PM
> To: amibroker@xxxx
> Subject: Re: [amibroker] peak - trough with variable
>
>
> Jayson,
>
> LastValue function works great! My formula now works.
>
> I'm still unclear, however, on how the peak function works.
>
> Please correct my following understanding:
> Peak(H,1.2,1) At each bar, this formula looks ahead to find a
retracement
> of a least 1.2% from that current bar's high and verifies that
there are no
> higher highs within the retracement period. If it doesn't find this
> condition, it uses the last peak value.
>
> What would the formula do if it used Close in place of High? If
the
> forward retracement was in place at 1.2% from the current bar
close, would
> it the peak be the high of the current bar, or the close? Or do I
have it
> completely wrong?
>
> <<Jayson said:
> <<you want the peak of peakvalue. since peakvalue is a high you
should ask
> for peak(peakvalue......
> <<Peak(peakvalue,LastValue(MinRetracement),1) ;
>
> I don't understand this concept of peak of peak value. I used:
> MinRetracement = 6/C * 100 ;
> PeakValue =Peak(H,LastValue(MinRetracement),1) ;
>
>
> ----- Original Message -----
> From: Jayson
> To: amibroker@xxxx
> Sent: Thursday, October 31, 2002 12:45 AM
> Subject: RE: [amibroker] peak - trough with variable
>
>
>
> Esteban,
>
>
> I'm wanting to find the last peak based on a fixed number of
points,
> rather than percentage. So I set a variable to the fixed points
value I want
> divided by the high * 100 to give me a percentage to use in the peak
> formula. But I get an error. Maybe the function needs a value not
subject
> to fluctuation for its underlying calculations. Is there a way I
can use
> this function with a fixed number of points?
>
> MinRetracement = 6/C * 100 ; This gives a value of 1.2 percent
when C
> =500.
>
> PeakValue = Peak(H,1.2,1) ; This finds the peaks like I want,
when price
> is in the range of 500.
>
> PeakValue Peak(H,MinRetracement,1) ; Gives an error.
>
> you want the peak of peakvalue. since peakvalue is a high you
should ask
> for peak(peakvalue...... your change setting must be constant so
ask for
> the lastvalue of minretracement....
>
> try......
>
> MinRetracement = 6/C * 100 ;
>
> PeakValue = Peak(H,1.2,1) ;
>
> Peak(peakvalue,LastValue(MinRetracement),1) ;
>
> jayson
>
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
> Post AmiQuote-related messages ONLY to: amiquote@xxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
> Post AmiQuote-related messages ONLY to: amiquote@xxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
> Post AmiQuote-related messages ONLY to: amiquote@xxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
> Post AmiQuote-related messages ONLY to: amiquote@xxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
> Post AmiQuote-related messages ONLY to: amiquote@xxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


Yahoo! Groups Sponsor
ADVERTISEMENT




Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


------=_NextPart_001_05F6_01C28195.6275E940
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dus-ascii" http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D559072015-01112002>Dimitris, </SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D559072015-01=
112002>you=20
are of course correct. Perhaps a picture better illustrates the=20
point.......</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D559072015-01112002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D559072015-01=
112002><IMG=20
align=3Dbaseline alt=3D"" border=3D0 hspace=3D0=20
src=3D"cid:559072015@xxxx";></SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D559072015-01112002></SPAN></FONT>&nbsp;</DIV>
<DIV><SPAN class=3D559072015-01112002>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D472095707-01112002>&nbsp;<SPAN class=3D559072015-01112002>here we</=
SPAN> see=20
a daily progression of the zig line from the high pivot<SPAN=20
class=3D559072015-01112002> (in blue)</SPAN>. Each day zig tells us the pri=
ce is=20
headed down from that high. 5 days into th<SPAN class=3D559072015-01112002>=
e=20
Oct</SPAN> rally zigs finds that the rally has exceeded our retracement=20
setting&nbsp; and erases the blue lines, redrawing the low&nbsp; and=20
establishing a new up trend line. As price moved&nbsp;<SPAN=20
class=3D559072015-01112002>away&nbsp;</SPAN> from that&nbsp;<SPAN=20
class=3D559072015-01112002>new </SPAN>low zigs opinion remains positive tha=
t the=20
current bar is still part of the next leg up...........</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D472095707-01112002></SPAN></FONT>&nbsp;</DIV>
<DIV><IMG align=3Dbaseline alt=3D"" border=3D0 hspace=3D0=20
src=3D"cid:559072015@xxxx";></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D559072015-01=
112002>As the=20
down trend exceeds the retracement setting we will see a new Pivot top and =
a new=20
down trend line drawn. any history of the blue lines will vanish as the new=
down=20
trend line is drawn.</SPAN></FONT></DIV></SPAN></DIV>
<DIV>&nbsp;</DIV>
<P><FONT color=3D#0000ff face=3D"Palace Script MT" size=3D6><STRONG>Jayson=
=20
</STRONG></FONT></P>
<DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT face=3DTahom=
a=20
size=3D2>-----Original Message-----<BR><B>From:</B> DIMITRIS TSOKAKIS=20
[mailto:TSOKAKIS@x...]<BR><B>Sent:</B> Friday, November 01, 2002 2:38=
=20
AM<BR><B>To:</B> amibroker@xxxxxxxxxxxxxxx<BR><B>Subject:</B> [amibroker] R=
e:=20
peak - trough with variable<BR><BR></FONT></DIV><TT>--- In amibroker@xxxx,=
=20
"Jayson" &lt;jcasavant@xxxx&gt; wrote:<BR>&gt; Estaban,<BR>&gt;&nbsp; no, u=
ntil=20
such time as your counter move has exceeded 1.2% the <BR>turn is open<BR>&g=
t;=20
change. <BR><BR>Zig may show the turn to have occurred but until the turn=20
exceeds<BR>the setting it is capable of reversing its self and simply erasi=
ng=20
<BR>any trace of its error.<BR><BR>Jayson,<BR>Let me make a comment=20
here.<BR>From the moment Zig detects a peak [some bars after the peak day],=
it=20
<BR>is a fact and it will not change in the future. We have a long and=20
<BR>interesting discussion on this behavior last summer. Tomasz created a=20
<BR>fine simulator on this purpose. The last peak, once established, will=20
<BR>not change, the last leg will search for the next trough.<BR>DT&nbsp;=20
<BR><BR><BR>this is why zig can be so dangerous to rely on. when you<BR>&gt=
;=20
system test zig is always correct. All of the turns have been <BR>confirmed=
.=20
In<BR>&gt; real life the system will not trade the way zig says it does.<BR=
>&gt;=20
<BR>&gt; peak(ARRAY, change, n=3D1)<BR>&gt; <BR>&gt; Peak=3D a peak means s=
imply the=20
price today is lower than the price <BR>yesterday<BR>&gt; and the price=20
yesterday was higher than the price 2 days ago. <BR>Picture a<BR>&gt; roof=
=20
line.&nbsp; Peak is the peak of the roof<BR>&gt; <BR>&gt; Array=3D high, Lo=
w,=20
Close value from which the calculations are made<BR>&gt; <BR>&gt; Change=3D=
the=20
sensitivity of the confirmation. in this case a stock <BR>who's move<BR>&gt=
;=20
exceeds 1.2% cannot result in a vanishing signal. any counter move <BR>afte=
r=20
the<BR>&gt; 1.2% will result in a new leg being drawn.&nbsp; If the new mov=
e=20
does <BR>not exceed<BR>&gt; 1.2 percent and instead resumes the prior move =
than=20
the turn is <BR>erased and<BR>&gt; appears to have never been there to begi=
n=20
with.<BR>&gt; <BR>&gt; n=3D1&nbsp; =3D which of the turns in the zigzag are=
you=20
referring to? 1=3D <BR>the last<BR>&gt; turn. 2=3D the turn prior to that, =
etc,=20
etc<BR>&gt; <BR>&gt; if you are still lost contact me off list and I will s=
end=20
some <BR>pictures,<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Jayson<BR>&gt; <BR>&g=
t;=20
-----Original Message-----<BR>&gt; From: Esteban [mailto:ygroups@x...]<BR>&=
gt;=20
Sent: Thursday, October 31, 2002 6:20 PM<BR>&gt; To: amibroker@xxxx<BR>&gt;=
=20
Subject: Re: [amibroker] peak - trough with variable<BR>&gt; <BR>&gt; <BR>&=
gt; I=20
think I've got it. Let me restate it, correctly, I hope.<BR>&gt; <BR>&gt; I=
f the=20
current bar reaches a retracement of 1.2% from the last <BR>highest bar<BR>=
&gt;=20
that is uncorrected, then&nbsp; it identifies that last high as the <BR>pea=
k.=20
Right?<BR>&gt; <BR>&gt; &lt;&lt;The code I posted uses the high value to=20
determine the turning <BR>points. If<BR>&gt; you used the close&nbsp; then =
zig=20
&lt;&lt;would use those values.<BR>&gt; <BR>&gt; Here's where I get confuse=
d,=20
but I think I've got it now:<BR>&gt; peak(ARRAY, change, n=3D1)<BR>&gt; The=
point=20
from which the peak function measures the % change <BR>backwards to<BR>&gt;=
the=20
high is the ARRAY in the formula. Right? So peak(L, 1.2 , 1) <BR>would<BR>&=
gt;=20
measure back to the high point from the current low, evaluating <BR>whether=
=20
or<BR>&gt; not it was &gt;=3D 1.2%.<BR>&gt; <BR>&gt; If so then using the H=
igh=20
value (as opposed to Low or Close)&nbsp; to <BR>measure<BR>&gt; from a peak=
=20
seems odd, as the retracement may have taken place from <BR>the<BR>&gt; oth=
er=20
price points of the bar. Part of why I've been confused about <BR>this<BR>&=
gt;=20
whole topic, since the examples I've seen use the high.<BR>&gt; <BR>&gt; So=
rry=20
to beat this to death. I've read lots of posts concerning zig-<BR>zag=20
and<BR>&gt; searched the manual, but I've never gotten the concept clear in=
my=20
<BR>mind.<BR>&gt; <BR>&gt; Esteban<BR>&gt; <BR>&gt; <BR>&gt;&nbsp;&nbsp; --=
---=20
Original Message -----<BR>&gt;&nbsp;&nbsp; From: Jayson<BR>&gt;&nbsp;&nbsp;=
To:=20
amibroker@xxxx<BR>&gt;&nbsp;&nbsp; Sent: Thursday, October 31, 2002 3:59=20
PM<BR>&gt;&nbsp;&nbsp; Subject: RE: [amibroker] peak - trough with=20
variable<BR>&gt; <BR>&gt; <BR>&gt;&nbsp;&nbsp; Esteban,<BR>&gt;&nbsp;&nbsp;=
no,=20
peak looks BACK not forward. it uses zigzag to determine <BR>turns in=20
the<BR>&gt; market based on your setting, in your case 1.2%. The code I pos=
ted=20
<BR>uses the<BR>&gt; high value to determine the turning points. If you use=
d the=20
close&nbsp; <BR>then zig<BR>&gt; would use those values. Zig is not time ba=
sed=20
but uses a percentage<BR>&gt; retracement to define a turn. from the "help"=
=20
file.....<BR>&gt; <BR>&gt;&nbsp;&nbsp; PEAK (AFL 1.1)<BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYNTAX&nbsp;=20
peak(ARRAY, change, n =3D=20
1)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RETURNS=20
ARRAY<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FUNCTION&nbsp=
;=20
Gives the value of ARRAY n-th peak(s) ago. This <BR>uses the<BR>&gt; Zig Za=
g=20
function (see Zig Zag) to determine the peaks. n =3D1 would <BR>return the<=
BR>&gt;=20
value of the most recent peak. n =3D2 would return the value of the <BR>2nd=
=20
most<BR>&gt; recent peak. Caveat: this function is based on Zig-Zag indicat=
or=20
<BR>and may<BR>&gt; look into the=20
future.<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXAMPLE=20
peak(close,5,1)<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt;&nbsp;&nbsp; As DT correc=
tly=20
pointed out, the last turn in the series is <BR>always open to<BR>&gt; chan=
ge.=20
tonight's peak may show a turn yesterday. if the market <BR>corrects<BR>&gt=
;=20
prior to your threshold being met (1.2%) then that peak will simply<BR>&gt;=
=20
disappear. For this reason testing with zig/peak/trough is very=20
<BR>dangerous.<BR>&gt; to see how peak works drop zigzag on your price=20
plot<BR>&gt; <BR>&gt;&nbsp;&nbsp; Jayson<BR>&gt; <BR>&gt;&nbsp;&nbsp;=20
-----Original Message-----<BR>&gt;&nbsp;&nbsp; From: Esteban=20
[mailto:ygroups@x...]<BR>&gt;&nbsp;&nbsp; Sent: Thursday, October 31, 2002 =
3:26=20
PM<BR>&gt;&nbsp;&nbsp; To: amibroker@xxxx<BR>&gt;&nbsp;&nbsp; Subject: Re:=
=20
[amibroker] peak - trough with variable<BR>&gt; <BR>&gt; <BR>&gt;&nbsp;&nbs=
p;=20
Jayson,<BR>&gt; <BR>&gt;&nbsp;&nbsp; LastValue function works great!&nbsp; =
My=20
formula now works.<BR>&gt; <BR>&gt;&nbsp;&nbsp; I'm still unclear, however,=
on=20
how the peak function works.<BR>&gt; <BR>&gt;&nbsp;&nbsp; Please correct my=
=20
following understanding:<BR>&gt;&nbsp;&nbsp; Peak(H,1.2,1)&nbsp; At each ba=
r,=20
this formula looks ahead to find a <BR>retracement<BR>&gt; of a least 1.2% =
from=20
that current bar's high and verifies that <BR>there are no<BR>&gt; higher h=
ighs=20
within the retracement period. If it doesn't find this<BR>&gt; condition, i=
t=20
uses the last peak value.<BR>&gt; <BR>&gt;&nbsp;&nbsp; What would the formu=
la do=20
if it used Close in place of High? If <BR>the<BR>&gt; forward retracement w=
as in=20
place at 1.2% from the current bar <BR>close, would<BR>&gt; it the peak be =
the=20
high of the current bar, or the close? Or do I <BR>have it<BR>&gt; complete=
ly=20
wrong?<BR>&gt; <BR>&gt;&nbsp;&nbsp; &lt;&lt;Jayson said:<BR>&gt;&nbsp;&nbsp=
;=20
&lt;&lt;you want the peak of peakvalue. since peakvalue is a high you <BR>s=
hould=20
ask<BR>&gt; for peak(peakvalue......<BR>&gt;&nbsp;&nbsp;&nbsp;=20
&lt;&lt;Peak(peakvalue,LastValue(MinRetracement),1) ;<BR>&gt;=20
<BR>&gt;&nbsp;&nbsp; I don't understand this concept of peak of peak value.=
I=20
used:<BR>&gt;&nbsp;&nbsp; MinRetracement =3D 6/C * 100 ;<BR>&gt;&nbsp;&nbsp=
;=20
PeakValue =3DPeak(H,LastValue(MinRetracement),1) ;<BR>&gt; <BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ----- Original Message=20
-----<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; From:=20
Jayson<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; To:=20
amibroker@xxxx<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Sent: Thursday, October 31, =
2002=20
12:45 AM<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Subject: RE: [amibroker] peak - tr=
ough=20
with variable<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
Esteban,<BR>&gt; <BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I'm wanting to f=
ind=20
the last peak based on a fixed number of <BR>points,<BR>&gt; rather than=20
percentage. So I set a variable to the fixed points <BR>value I want<BR>&gt=
;=20
divided by the high * 100 to give me a percentage to use in the peak<BR>&gt=
;=20
formula. But I get an error. Maybe the function needs a&nbsp; value not=20
<BR>subject<BR>&gt; to fluctuation for&nbsp; its underlying calculations. I=
s=20
there a way I <BR>can use<BR>&gt; this function with a fixed number of=20
points?<BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; MinRetracement =3D 6/C * 1=
00 ;=20
This gives a value of 1.2 percent <BR>when C<BR>&gt; =3D500.<BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; PeakValue =3D Peak(H,1.2,1) ; This finds t=
he=20
peaks like I want, <BR>when price<BR>&gt; is in the range of 500.<BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; PeakValue Peak(H,MinRetracement,1) ; Gives=
an=20
error.<BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; you want the peak of peakva=
lue.=20
since peakvalue is a high you <BR>should ask<BR>&gt; for peak(peakvalue....=
..=20
your change&nbsp; setting must be constant so <BR>ask for<BR>&gt; the lastv=
alue=20
of minretracement....<BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; try......<BR=
>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; MinRetracement =3D 6/C * 100 ;<BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; PeakValue =3D Peak(H,1.2,1) ;<BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Peak(peakvalue,LastValue(MinRetracement),1=
)=20
;<BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jayson<BR>&gt; <BR>&gt;=20
<BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
Yahoo! Groups=20
Sponsor<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
ADVERTISEMENT<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Post AmiQuote-related messages ONLY to:=20
amiquote@xxxx<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; (Web page: <A=20
href=3D"http://groups.yahoo.com/group/amiquote/messages/)">http://groups.ya=
hoo.com/group/amiquote/messages/)</A><BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Check group FAQ at:<BR>&gt; <A=20
href=3D"http://groups.yahoo.com/group/amibroker/files/groupfaq.html";>http:/=
/groups.yahoo.com/group/amibroker/files/groupfaq.html</A><BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Your use of Yahoo! Groups is subject to th=
e=20
Yahoo! Terms of <BR>Service.<BR>&gt; <BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nb=
sp;=20
Post AmiQuote-related messages ONLY to:=20
amiquote@xxxx<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; (Web page: <A=20
href=3D"http://groups.yahoo.com/group/amiquote/messages/)">http://groups.ya=
hoo.com/group/amiquote/messages/)</A><BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Check group FAQ at:<BR>&gt; <A=20
href=3D"http://groups.yahoo.com/group/amibroker/files/groupfaq.html";>http:/=
/groups.yahoo.com/group/amibroker/files/groupfaq.html</A><BR>&gt;=20
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Your use of Yahoo! Groups is subject to th=
e=20
Yahoo! Terms of <BR>Service.<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt;&nbsp;&nbsp;=
Post=20
AmiQuote-related messages ONLY to: amiquote@xxxx<BR>&gt;&nbsp;&nbsp; (Web p=
age:=20
<A=20
href=3D"http://groups.yahoo.com/group/amiquote/messages/)">http://groups.ya=
hoo.com/group/amiquote/messages/)</A><BR>&gt;=20
<BR>&gt;&nbsp;&nbsp; Check group FAQ at:<BR>&gt; <A=20
href=3D"http://groups.yahoo.com/group/amibroker/files/groupfaq.html";>http:/=
/groups.yahoo.com/group/amibroker/files/groupfaq.html</A><BR>&gt;=20
<BR>&gt;&nbsp;&nbsp; Your use of Yahoo! Groups is subject to the Yahoo! Ter=
ms of=20
<BR>Service.<BR>&gt; <BR>&gt; <BR>&gt;&nbsp;&nbsp; Post AmiQuote-related=20
messages ONLY to: amiquote@xxxx<BR>&gt;&nbsp;&nbsp; (Web page: <A=20
href=3D"http://groups.yahoo.com/group/amiquote/messages/)">http://groups.ya=
hoo.com/group/amiquote/messages/)</A><BR>&gt;=20
<BR>&gt;&nbsp;&nbsp; Check group FAQ at:<BR>&gt; <A=20
href=3D"http://groups.yahoo.com/group/amibroker/files/groupfaq.html";>http:/=
/groups.yahoo.com/group/amibroker/files/groupfaq.html</A><BR>&gt;=20
<BR>&gt;&nbsp;&nbsp; Your use of Yahoo! Groups is subject to the Yahoo! Ter=
ms of=20
<BR>Service.<BR>&gt; <BR>&gt; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
Yahoo! Groups=20
Sponsor<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;=20
ADVERTISEMENT<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Post AmiQuote-rel=
ated=20
messages ONLY to: amiquote@xxxx<BR>&gt; (Web page: <A=20
href=3D"http://groups.yahoo.com/group/amiquote/messages/)">http://groups.ya=
hoo.com/group/amiquote/messages/)</A><BR>&gt;=20
<BR>&gt; Check group FAQ at:<BR>&gt; <A=20
href=3D"http://groups.yahoo.com/group/amibroker/files/groupfaq.html";>http:/=
/groups.yahoo.com/group/amibroker/files/groupfaq.html</A><BR>&gt;=20
<BR>&gt; Your use of Yahoo! Groups is subject to the Yahoo! Terms of=20
Service.<BR><BR></TT><BR><BR><TT>Post=20
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx <BR>(Web page: =
<A=20
href=3D"http://groups.yahoo.com/group/amiquote/messages/)">http://groups.ya=
hoo.com/group/amiquote/messages/)</A><BR><BR>Check=20
group FAQ at: <A=20
href=3D"http://groups.yahoo.com/group/amibroker/files/groupfaq.html";>http:/=
/groups.yahoo.com/group/amibroker/files/groupfaq.html</A></TT>=20
<BR><BR><TT>Your use of Yahoo! Groups is subject to the <A=20
href=3D"http://docs.yahoo.com/info/terms/";>Yahoo! Terms of Service</A>.</TT=
>=20
<BR></BODY></HTML>

------=_NextPart_001_05F6_01C28195.6275E940--

Attachment: Description: ""