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

Re: [amibroker] Re: Modified Dave Landry Scan



PureBytes Links

Trading Reference Links

Hi Dennis,
 
What was the original Landry name for the scan?  Did you omit ADX because you were in TC2000 originally?  I ask because I've already coded a number of Dave Landry's setups. 
 
What your TC code says is not that today's low is lower than yesterday's low, just the reverse -- it's greater than yesterday's low. 
 
The piece of afl to do what your TC2000 code says is:   Ref(L,-1) < Ref(LLV(L,20),-2) AND L > Ref(L,-1); 
 
Peace and Justice   ---   Patrick
----- Original Message -----
Sent: Saturday, June 04, 2005 2:38 PM
Subject: [amibroker] Re: Modified Dave Landry Scan

The simple scan looks for recent (not today) 20 day high/lows and this
scan
has a minimum price criteria of $15 and a minimum 50-day average
volume
criteria of 100k. Below is the code written as a Personal Criteria
Formule
in TC2000's language. It's pretty strait forward, H=
High...L=Low...MAXH=Maxhigh...MINL=MINLow...

Example, I tried to duplicate this TC2005 formula...
(L1 < MINL20.2 AND L > L1)
This means:  Yesterday's Low is Less Than the Low of the past 20 days
as of
2 days ago AND Today's Low is Less Than Yesterday's Low.
L1= Yesterday's Low
MINL20.2= the Lowest Low of the past 20 days as of 2 days ago
L= totday's Low
L1=Yesterday's Low

with this AFL formula...
Ref(L,-1)<LLV(L,20)-2 AND L>Ref(L,-1) ;

Please help...

Dennis


--- In amibroker@xxxxxxxxxxxxxxx, "Dennis And Lisa"
<dennisandlisa@xxxx> wrote:
> Hi everyone...this scan is the Dave Landry Pull Back Scan, which
> attempts to catch pull backs coming off of 20 day highs or 20 day
> lows. It only works for Long Positions, and fails to
> work for Short Positions. Can someone please take a look at  the
> "PullBack Scan" secion of the following formula to see what I am
doing
> wrong?
>
> "DLL" thru "DLL8" are the Long Criteria, which work just fine, but
> "DLS1" thru "DLS8" do not initialize. These atr the Short Criteria.
>
> thanks
> Dennis
>
> ------------------------------------------------
---------------------
>
> NumColumns = 6;
>
> Period = 14;
>
>
> // Determines trend direction using DMI indicators
> PDIFilter = PDI(period) > MDI(period);
> MDIFilter = MDI(period) > PDI(period);
>
> // PULLBACK SCAN
>
> DLL1 = Ref(H,-1)>HHV(H,20)-2 AND H<Ref(H,-1) ;
> DLL2 = Ref(H,-2)>HHV(H,20)-3 AND H<Ref(H,-2) ;
> DLL3 = Ref(H,-3)>HHV(H,20)-4 AND H<Ref(H,-3) ;
> DLL4 = Ref(H,-4)>HHV(H,20)-5 AND H<Ref(H,-4) ;
> DLL5 = Ref(H,-5)>HHV(H,20)-6 AND H<Ref(H,-5) ;
> DLL6 = Ref(H,-6)>HHV(H,20)-7 AND H<Ref(H,-6) ;
> DLL7 = Ref(H,-7)>HHV(H,20)-8 AND H<Ref(H,-7) ;
> DLL8 = Ref(H,-8)>HHV(H,20)-9 AND H<Ref(H,-8) ; 
> DLL= H<HHV(H,20)-1;
>
> // THIS SECTION FAILS TO WORK....PLEASE HELP
> DLS1 = Ref(L,-1)<LLV(L,20)-2 AND L>Ref(L,-1) ;
> DLS2 = Ref(L,-2)<LLV(L,20)-3 AND L>Ref(L,-2) ;
> DLS3 = Ref(L,-3)<LLV(L,20)-4 AND L>Ref(L,-3) ;
> DLS4 = Ref(L,-4)<LLV(L,20)-5 AND L>Ref(L,-4) ;
> DLS5 = Ref(L,-5)<LLV(L,20)-6 AND L>Ref(L,-5) ;
> DLS6 = Ref(L,-6)<LLV(L,20)-7 AND L>Ref(L,-6) ;
> DLS7 = Ref(L,-7)<LLV(L,20)-8 AND L>Ref(L,-7) ;
> DLS8 = Ref(L,-8)<LLV(L,20)-9 AND L>Ref(L,-8) ;
> // END OF SECTON THAT NEEDS TROUBLESHOOTING
>
> // New 1 month low has occurred in the last 8 days?
> //NewHighs   = IIf(HHV(H,8) >= HHV(H,20), 1, 0);
> //NewLows    = LLV(L,8) <= LLV(L,20);
>
> // Are moving averages lined up correctly?
> BullishMAs = IIf(MA(C,10) >= EMA(C,20) AND EMA(C,20) >= EMA(C,30),
1,
> 0);
> BearishMAs = IIf(MA(C,10) <= EMA(C,20) AND EMA(C,20) <= EMA(C,30),
1,
> 0);
>
> Column0     = ADX(period);
> Column0Name = "ADX";
>
> Column1     = IIf(PDIFilter AND (DLL AND(DLL1 OR DLL2 OR DLL3 OR
DLL4
> OR DLL5 OR DLL6 OR DLL7 OR DLL8)) AND C>15 AND LLV(V,50)>100000 AND
> BullishMAs, 1, 0);
> Column1Name = "Buy Signal";
>
> Column2     = IIf(Column1 == 1, H + .125, 0);
> Column2Name = "Buy Stop";
>
> Column3     = IIf(MDIFilter AND ( DLS1 OR DLS2 OR DLS3 OR DLS4 OR
DLS5
> OR DLS6 OR DLS7 OR DLS8) AND C>15 AND LLV(V,50)>100000 AND
BearishMAs,
> 1, 0);
> Column3Name = "Sell Signal";
>
> Column4     = IIf(Column3 == 1, L - .125, 0);
> Column4Name = "Sell Stop";
>
> Column5     = HHV(H,20)-LLV(L,20);
> Column5Name = "10/20 Value";
>
> // Filter based on ADX > 30 (trending) and if buy or sell has
> triggered
> Filter = ADX(period) >= 30 AND (Column1 OR Column3);
> Buy  = ADX(period) >=30 AND Column1;
> Sell = ADX(period) >=30 AND Column3;




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





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