[amibroker] Re: simple lower lows

2009-03-12 Thread murthysuresh
why do you want to loop. you have a good idea going in your example. --- In amibroker@yahoogroups.com, jim fenster wrote: > > > If I wanted to buy for example when you make three lower lows. How do I write > this without doing it the long way? You know like Buy= ref(l,-1) etc. Im not lazy or an

[amibroker] Re: simple lower lows

2009-03-12 Thread Mike
Buy = Sum(Low < Ref(Low, -1), 3) == 3; Mike --- In amibroker@yahoogroups.com, jim fenster wrote: > > > If I wanted to buy for example when you make three lower lows. How do I write > this without doing it the long way? You know like Buy= ref(l,-1) etc. Im not lazy or anything. Im just trying t

[amibroker] Re: simple lower lows

2009-03-14 Thread Mike
Sorry Radek, but it is you that is mistaken. If you want to compare 3 events using Sum, then you must use a lookback of 3. The lookback includes the current bar. Run the following Plot to see the difference. My solution lines up with every 3rd lower low (green arrow). Your solution lines up wit

[amibroker] Re: simple lower lows

2009-03-14 Thread Mike
You should use PeriodsBack, not PeriodsBack - 1. Also, you should define PeriodsBack before using it in the Sum operation. See message 136157. Mike --- In amibroker@yahoogroups.com, Radek Simcik wrote: > > Hi Jim, > > I am learning too but this is what I find the best. > > LowsGoDown = 0; >

Re: [amibroker] Re: simple lower lows

2009-03-13 Thread reinsley
Straight to pearls of AFL. Thank you for the question and the answer... Mike a écrit : > > > Buy = Sum(Low < Ref(Low, -1), 3) == 3; > > Mike > > --- In amibroker@yahoogroups.com , > jim fenster wrote: > > > > > > If I wanted to buy for example when yo

Re: [amibroker] Re: simple lower lows

2009-03-13 Thread jim fenster
wow really? OK great Ill give it a try.  Thanks. Jim --- On Thu, 3/12/09, Mike wrote: From: Mike Subject: [amibroker] Re: simple lower lows To: amibroker@yahoogroups.com Date: Thursday, March 12, 2009, 4:10 PM Buy = Sum(Low < Ref(Low, -1), 3) == 3; Mike ---

Re: [amibroker] Re: simple lower lows

2009-03-14 Thread Radek Simcik
This is not correct. If you want 3 consecutive lows you need to have a code like Buy = Sum(Low < Ref(Low, -1), *2*) == *2*; The comparison Low < Ref(Low, -1) counts for one lower low. Radek On Fri, Mar 13, 2009 at 7:10 AM, Mike wrote: > Buy = Sum(Low < Ref(Low, -1), 3) == 3; > > Mike > > >

Re: [amibroker] Re: simple lower lows

2009-03-14 Thread Brenton Hill
Jim For three lower lows you can also use ThreeLowerLows = HHV(L-Ref(L,-1),3)<0; Brenton Mike wrote: You should use PeriodsBack, not PeriodsBack - 1. Also, you should define PeriodsBack before using it in the Sum operation. See message 136157. Mike --- In amibroker@yahoogroups.com

Re: [amibroker] Re: simple lower lows

2009-03-15 Thread Radek Simcik
Hi Mike, yes you're completely right. I was interested in lower lows with in 3 periods only in my system and I applied it incorrectly to Jim's question. Thank you for nice piece of code! Radek On Sun, Mar 15, 2009 at 12:07 PM, Mike wrote: > Sorry Radek, but it is you that is mistaken. > > I