PureBytes Links
Trading Reference Links
|
Thank you, but why change the + to - in the shorting routine and leave
the long routine unchanged? I tried it and it did not yield the right
result.
Dennis
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> just using the first line as example
> DLS1 = Ref(L,-1)<LLV(L,20)-2 AND L>Ref(L,-1) ;
> should this be
> DLS1 = Ref(L,-1)<LLV(L,20) + 2 AND L>Ref(L,-1) ;
>
> and have you forgotten this line?
>
> DLs= L>LLV(L,20)+1;
>
> On 5/27/05, 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
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Cheers
> Graham
> http://e-wire.net.au/~eb_kavan/
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/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/
|