PureBytes Links
Trading Reference Links
|
Giuseppe
My line Cond = sum(H>ref(H,-1), 5) >=3; was an example of using >=
with the sum as someone posted that they could not be used together.
Going back to your original question and my original answer modified
because of a type error, although you would get the same answer.
"How do I code 3 or more consecutive High ?
H>Ref(H,-1) && Ref(H,-1)>Ref(H,-2) && Ref(H,-2)>Ref(H,-3) etc..."
Cond = sum(H>ref(H,-1), 3) ==3; // would provide same result as Cond =
sum(H>ref(H,-1), 3) >=3;
is correct for finding 3 consecutive higher highs
If you want to find this in the past then use barssince function
WhenCond = barssince(Cond);
You will find there are generally always many methods to find the same
thing and we all use things in the way we are comfortable with
On Wed, 16 Mar 2005 23:38:24 -0000, ami_trader <ami_trader@xxxxxxxxx> wrote:
>
>
> > correct it should have been ==3 as there were only 3 bars
> considered,
> > but the result would have been the same.
> >
> > You can use (I do)
> > Cond = sum(H>ref(H,-1), 5) >=3;
>
> Graham
> 1. with this script if I have 5 bar with 3 (or more) NO consecutive
> High it return true and it isn't correct for me.
>
> 2. with SUM function I'm limited to the fixed number (5 in this
> scenario) In fact if I have 7 consecutive Hight it doesn't work
> because he count the fixed period (5).
>
> I hope my explanation is good because my english is poor.
>
> ---
> Giuseppe
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
--
Cheers
Graham
http://e-wire.net.au/~eb_kavan/
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|