PureBytes Links
Trading Reference Links
|
I ran it against Biotech and got 75% return in Bear Mkt period but a
negative return during Bull Mkt :-(. Anyway - I wasn't trying to
come up with a profitable strategy so much as learning how to play
around with Buy/Sell rules. I firmly believe that Buy/Sell rules are
50% of value in any trading system. I tried 12-14 variations of
Buy/Sell rules in my in-sample period (Wireless Sector (100+ stocks
or so) in the Bear Mkt) to come up with the 'best' one for that
period. I would run one variation and see where my biggest
losses/gains were. See the charts and try another variation to
reduce losses/drawdowns and increase gains...and then try again. It
was a good learning experience. Also, I beleive I can come up with
better rules than the ones posted...but I just don't have the time.
There's a wealth of info in the AFL library and - if - you mix 'n
match and play with the Buy/Sell rules - you can come up with some
interesting results. It helps me learn AFL coding and makes me
understand the thought process behind various indicators.
Taking baby steps......... :-)
[P.S - last night I re-read Thom DeMark's bk and he mentions that the
REI indicator has -60 and +60 as its oversold and overbought levels.
Thomasz has listed it as -45 and +45 which is how I plotted and
tested it. You may want to change the plot line code to '-60'
and '+60'...to be more accurate with the bk....specially if you are
scanning]
--- In amibroker@xxxxxxxxxxxxxxx, "areehoi" <hoierman@xxxx> wrote:
> Dickie,
> Again, thanks for your conributions. Keep them coming. I ran your
> REI as an exploration and got some interesting results. Haven't
tried
> it in backtesting mode but your results sound most interesting.
>
> Dick H.
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Dickie Paria" <babui@xxxx> wrote:
> > Its amazing what results you can get by playing around with
Buy/Sell
> > rules. I was reading Thom DeMark's bk last night and came upon
the
> > Range Expansion Index indicator. This morning - I saw that REI
was
> > already coded into AFL library by Thomasz Janeckzo. I simply
took
> > the REI code and 'played' around with Buy/Sell rules during lunch
> > hour. Here's the results:
> > My settings were 'Long' only, $16 comm, 50% MARGIN, $10k equity
and 1
> > day delay in Buy and Sell.
> > I only tested the most volatile sector: Wireless (pulled from
YAHOO
> > Finance).
> > Bear Mkt test : 6/14/2000 - 6/13/2002 - only 7 trades for a 9%
> > profit. This is when the wireless sector was down by about 80% -
90%
> > or so - I think.
> > Bull Mkt test: 6/14/2002 - 6/13/2004 - 170 trades with a 216%
profit.
> > Range Bound Mkt - 6/14/2004 - 6/13/2005 - 90 trades with a 18%
profit.
> > Here's the AFL code
> > ********************************************8
> > /*
> > ** Tom DeMark's Range Expansion Index
> > ** AFL Implementation by Tomasz Janeczko
> > */
> >
> >
> > HighMom = H - Ref( H, -2 );
> > LowMom = L - Ref( L, -2 );
> >
> > Cond1 = ( H >= Ref( L,-5) OR H >= Ref( L, -6 ) );
> > Cond2 = ( Ref( H, -2 ) >= Ref( C, -7 ) OR Ref( H, -2 ) >= Ref(
C, -
> > 8 ) );
> > Cond3 = ( L <= Ref( H, -5 ) OR L <= Ref( H, -6) );
> > Cond4 = ( Ref( L, -2 ) <= Ref( C, -7 ) OR Ref( L, -2 ) <= Ref(
C, -
> > 8 ) );
> >
> > Cond = ( Cond1 OR Cond2 ) AND ( Cond3 OR Cond4 );
> >
> > Num = IIf( Cond, HighMom + LowMom, 0 );
> > Den = abs( HighMom ) + abs( LowMom );
> >
> > TDREI = 100 * Sum( Num, 5 )/Sum( Den, 5 ) ;
> >
> > /*
> > ** Tom DeMark's Range Expansion Index
> > ** AFL Plot and Buy/Sell Rules by Dickie Paria
> > */
> >
> >
> > Plot( TDREI, "TDREI", colorRed, styleThick );
> > Plot (0,"",colorSeaGreen,styleNoLabel);
> >
> > Plot (-45,"",colorBlue,styleNoLabel); // shows a blue line
through -45
> > Plot (45,"",colorBlue,styleNoLabel); // shows a blue line through
45
> >
> > Graph0 = TDREI;
> >
> > RAD_TO_DEG = 180/3.1415926; // radians to degrees
> > LinRegAngleTDREI = RAD_TO_DEG * atan( LinRegSlope( TDREI, 3 ) );
> >
> > Buy = EMA(Avg, 50) > EMA(Avg, 100) AND LinRegAngleTDREI > 30 AND
> > TDREI >= -45 AND TDREI < 0 ;
> > Sell = LinRegAngleTDREI < -20 OR (TDREI <= 45 AND TDREI > 0) ;
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/
|