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

Re: [amibroker] peak - trough with variable



PureBytes Links

Trading Reference Links


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:
<FONT 
color=#0000ff>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...... 

 <FONT 
face="MS Sans Serif"><<Peak(<FONT 
color=#282828>peakvalue,<FONT 
color=#0000ff>LastValue(<FONT 
color=#282828>MinRetracement),<FONT 
color=#ff00ff>1) 
;
<FONT face="MS Sans Serif" 
color=#282828> 
I don't understand 
this concept of peak of peak value. I 
used:
<FONT 
size=2>MinRetracement = <FONT 
color=#ff00ff>6/<FONT 
color=#000000>C * <FONT 
color=#ff00ff>100<FONT face=Arial 
size=2> ;


PeakValue 
=Peak(H<FONT 
color=#282828>,LastValue<FONT 
color=#282828>(MinRetracement<FONT 
color=#282828>),1<FONT 
color=#282828>) 
;
 
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
<A title=jcasavant@xxxx 
href="">Jayson 
To: <A title=amibroker@xxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Thursday, October 31, 2002 12:45 
AM
Subject: RE: [amibroker] peak - trough 
with variable

 
<SPAN 
class=266273605-31102002>Esteban,
<SPAN 
class=266273605-31102002> 
 
I'm wanting to find the last 
peak based on a fixed number of points, rather than percentage. So Iset 
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 = <FONT 
color=#ff00ff>6/C * 100 ; This gives 
a value of 1.2 percent when C =500.


PeakValue = <FONT 
color=#0000ff>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.<SPAN 
class=266273605-31102002> <FONT 
face="MS Sans Serif">
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....
<SPAN 
class=266273605-31102002> 
<SPAN 
class=266273605-31102002>try......
<SPAN 
class=266273605-31102002> 
<FONT 
size=2>
MinRetracement = 6<FONT 
color=#282828>/C 
* 100<FONT 
face=Arial size=2> ;
PeakValue = Peak<FONT 
color=#282828>(H<FONT 
face=Arial>,<FONT 
color=#ff00ff>1.2,<FONT 
color=#ff00ff>1) ;<FONT 
color=#0000ff>
Peak(<FONT 
color=#282828>peakvalue,<FONT 
color=#0000ff>LastValue(<FONT 
color=#282828>MinRetracement),<FONT 
color=#ff00ff>1) 
;
 jayson
<SPAN 
class=266273605-31102002> 



Yahoo! Groups 
Sponsor





<FONT face=arial 
size=-2>ADVERTISEMENT<A 
href="" 
target=_blank><IMG height=250 alt="" 
src="" 
width=300 border=0 NOSEND="1">

<IMG height=1 alt="" 
src="" 
width=1 NOSEND="1">Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 
Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.