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

Re: [amibroker] DMI Cross then wait for ADXR > 25



PureBytes Links

Trading Reference Links

Doc,

WRT your original query the two conditions are as follows:

BC1=CROSS(PDI(8),MDI(8));

BC2=BARSSINCE(BC1)<=10 AND CROSS(ADXR(8),25);

buy=BC2;


My apologies to the group for digressing from the original question but here
is one situation that needs to be coded into such a system. Welles Wilder
did indicate the level of 25 as a significant point for trend following
systems. He also mentioned in the same place that when ADX dips below both
the DI lines then it is time to stop following a trend following system. So
if for instance you have a situation where ADx has dipped below both PDI and
MDI but is above 25  or ADX crosses 25 but is below both PDI and MDI, then
what action will your system take? Maybe if there is enough interest in the
subject then the thread can be moved to the AB-TS board which is the
appropriate place for it.


Regards


Rakesh



On 1/30/07, Edward Pottasch <empottasch@xxxxxxxxx> wrote:
>
>  hi James,
>
> well yeah  I'm not sure how to interpret the "second signal" because it
> does not say explicitly whether ADXR should cross 25. In that case it
> could be coded like:
>
> // buy entry rules
> period = 8;
> ADXR = ( ADX( period ) + Ref( ADX( period ), -1 * period ) )/2;
>
> Signal1 = Cross(PDI( period),MDI( period ));
> Signal2 = Cross(ADXR,25);
>
> *Buy* = Signal2 *AND* BarsSince(Signal1) <= 10;
> *BuyPrice* = *Close*;
>
> // chart
> SetChartOptions(0, *chartShowDates*);
> Plot(*C*,"C",*colorWhite*,64);
> PlotShapes(IIf(*Buy*,*shapeUpArrow*,0),*colorWhite*, layer = 0, yposition
> = *BuyPrice*, offset = 0 );
>
>
>
>
>
> ----- Original Message -----
> *From:* James <jamesmemphis@xxxxxxxxx>
> *To:* amibroker@xxxxxxxxxxxxxxx
> *Sent:* Tuesday, January 30, 2007 1:07 PM
> *Subject:* Re: [amibroker] DMI Cross then wait for ADXR > 25
>
>   Are you sure about this? This appears to me that you would buy when the
> ADX crosses provided the ADXR has been > 25 for less than 10 days. Which
> means the ADX could be 26 THEN the ADx could cross it's signal line creating
> the buy. Seems like what Alex is looking for is more like:
>
> Buy = Cross(ADX,25) AND PDI( period) > MDI( period ) AND BarsSince(PDI(
> period) > MDI( period ))<=10.
>
> Am I mistaken?
>
> ----- Original Message ----
> From: Edward Pottasch <empottasch@xxxxxxxxx>
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Tuesday, January 30, 2007 4:44:25 AM
> Subject: Re: [amibroker] DMI Cross then wait for ADXR > 25
>
>  can be done as follows:
>
>
> // buy entry rules
> period = 8;
> ADXR = ( ADX( period ) + Ref( ADX( period ), -1 * period ) )/2;
> //ADXR = ADX( period);
>
> *Buy* = Cross(PDI( period),MDI( period )) A*ND* BarsSince(ADXR > 25) <= 10;
>
> *BuyPrice* = *Close*;
>
> // chart
> SetChartOptions(0, *chartShowDates*);
> Plot(*C*,"C",*colorWhite*,64);
> PlotShapes(IIf(*Buy*,*shapeUpArrow*,0),*colorWhite*, layer = 0, yposition
> = *BuyPrice*, offset = 0 );
>
>
>
>
>
>
>
> ----- Original Message -----
> *From:* dralexchambers <dralexchambers@xxxxxxxxx>
> *To:* amibroker@xxxxxxxxx ps.com <amibroker@xxxxxxxxxxxxxxx>
> *Sent:* Tuesday, January 30, 2007 11:15 AM
> *Subject:* [amibroker] DMI Cross then wait for ADXR > 25
>
>  Hi,
>
> The system I am backtesting has the following buy rules:
>
> +DI Cross over -DI (8)
>
> this is signal day 1
>
> the second signal must come after the first:
>
> ADXR > 25
>
> The buy price is the close of this second signal.
>
> The point to note is that the second signal may come 1 or a maximum
> of 10 days after the first signal. After 10 days, the entry is
> invalid.
>
> How would I code this in AFL?
>
> Thanks - alex
>
>
>
> ------------------------------
> It's here! Your new message!
> Get new email alerts<http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/>with the free Yahoo!
> Toolbar.<http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/>
>
> 
>

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.12/655 - Release Date: 1/28/2007 1:12 PM