PureBytes Links
Trading Reference Links
|
Graham,
I don't understand why either my original formula
or your suggestion work the way they do.
The intent is to get the HHV of the range starting
at (-peak1_bars +2) and scanning a range of 5 bars....
I tried your suggestion...
<SPAN
>Price_PriorPeak1 =
<SPAN lang=EN-AU
>ValueWhen<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>(<FONT
face=Arial>Peak1_Bars<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>, <FONT
face="Courier New" color=blue><SPAN lang=EN-AU
>HHV<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red><SPAN lang=EN-AU
>H<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>,period)
);
<SPAN
lang=EN-AU >it
returns the value of the last peak ( not prior) ...
My formula
<SPAN
>Price_PriorPeak1 = <FONT
color=blue>HHV(<SPAN
>Ref(<SPAN
>High,-Peak1_Bars+<SPAN
>2),<SPAN
>5);<FONT face="Courier New"
size=1>
<SPAN
>returns the
value 2 bars after my signal (because of the offset of 2 I have
placed)
Hope someone else jumps in
Ara
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
<A title=gkavanagh@xxxxxxxxxxxxx
href="">Graham
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, May 08, 2003 12:09
AM
Subject: RE: [amibroker] HHV
<SPAN
>Try
<SPAN
>
<SPAN
>Price_PriorPeak1 =
<SPAN lang=EN-AU
>ValueWhen<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>(<FONT
face=Arial>Peak1_Bars<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>, <FONT
face="Courier New" color=blue><SPAN lang=EN-AU
>HHV<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red><SPAN lang=EN-AU
>H<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>,period) ); //assumes
Peak1_bars is binary, if not the Peak1_bars==StochasticValue
<SPAN
lang=EN-AU
>
<SPAN
lang=EN-AU >I
have used similar to find HHV at a condition point, here is part of that
code
<SPAN
lang=EN-AU
>
<SPAN
lang=EN-AU
>SupTurn =
<SPAN lang=EN-AU
>Cross<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>(myMACD,mySignal);
<SPAN lang=EN-AU
>for<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>( i = <FONT
face="Courier New" color=fuchsia><SPAN lang=EN-AU
>1<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>; i <= numline; i++
)
<SPAN
lang=EN-AU
>{
<SPAN
lang=EN-AU
>SupLevel =
<SPAN lang=EN-AU
>LastValue<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue><SPAN lang=EN-AU
>ValueWhen<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>(SupTurn,<FONT
face="Courier New" color=blue><SPAN lang=EN-AU
>LLV<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red><SPAN lang=EN-AU
>L<FONT
face="Courier New" color=black><SPAN lang=EN-AU
>,period),i));
<SPAN
>
<FONT face="Times New Roman" color=teal
size=3><SPAN
>Cheers,Graham
<FONT
face="Times New Roman" color=#339966 size=2><SPAN
><A
href=""><SPAN
>http://groups.msn.com/ASXShareTrading
<FONT
face="Times New Roman" color=#339966 size=2><SPAN
><A
href=""><SPAN
>http://groups.msn.com/FMSAustralia
<SPAN
>-----Original
Message-----From: Ara
Kaloustian [mailto:ara1@xxxxxxxxxx] <SPAN
>Sent: Thursday, 8 May 2003 2:35
PMTo: Amibroker<SPAN
>Subject: [amibroker]
HHV
<FONT face="Times New Roman"
size=2>
<SPAN
>Using
<SPAN
>Price_PriorPeak1 = <FONT
color=blue>HHV(<SPAN
>Ref(<SPAN
>High,-Peak1_Bars+<FONT
color=fuchsia>2),<FONT
color=fuchsia><SPAN
>5);<FONT face="Courier New"
size=1>
<SPAN
>Peak1_Bars is derived from the
stochastic peak and I'm trying to correlate that with price
peak.
<SPAN
>I am trying to find the highest
value of High starting at bar (Peak1_Bars - 2) to (Peak1_Bars +
3).
<SPAN
>The above code is returning the
value at the starting point of the range (Peak1_Bars - 2).
<SPAN
>
<SPAN
>Anyone see a problem with this
code?
<SPAN
>
<SPAN
>Thanks
<SPAN
>Ara
<SPAN
>
<SPAN
>
<FONT face="Times New Roman"
size=2><SPAN
><FONT
face="Courier New">Send BUG REPORTS to bugs@xxxxxxxxxxxxx<FONT
face="Courier New"><FONT
face="Courier New">Send SUGGESTIONS to
suggest@xxxxxxxxxxxxx<FONT
face="Courier New">-----------------------------------------<FONT
face="Courier New">Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx (Web
page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)<FONT
face="Courier New">--------------------------------------------<FONT
face="Courier New">Check group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to
the Yahoo! Terms of
Service.
Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------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.
Yahoo! Groups Sponsor
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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.
|