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

[amibroker] Re: A Scan for Stocks Making A Breakout From Base



PureBytes Links

Trading Reference Links

Hi Dick - nice explanation.  I need to read up on Welles Wilder's 
ADX.  I was never very partial to it - thinking - that by the time 
you got a signal from ADX that a trend has formed - you have already 
lost the best part of the trend.  Maybe I'm wrong - but I have to 
borrow some bks from the lib and check it.
So - you guys have a group in Dallas to discuss this sort of stuff.  
Thats nice.  Wish I knew of folks who would like to get together in 
Long Island or NYC.....share ideas.
Will take a look at your code again...when I get a break from 
work....which may not be for sometime.......plus I got some ideas in 
my head that I would like to test..........on money flow and all.  
Need to check out Steve's cleanup of my FVE code.....Aahh!!  so much 
to do - so little time..... :-)

--- In amibroker@xxxxxxxxxxxxxxx, "areehoi" <hoierman@xxxx> wrote:
> Dickie,
> Glad you ask about the PDI and MDI indicators.  They are a part of 
the
> ADX (Average Directional Movement Index) developed by Wells Wilder. 
It
> is an oscillator that fluctuates between 0 and 100.  It does not
> determine Bullish or Bearish but rather the strength of the current
> trend. You will find it in the AFL formulas in the AmiBroker 
library.
>  The ADX is actually derived from two other indicators developed by
> Wells Wilder.  They are the Positive Directional Indicator (+DI or
> PDI) and the Negative Directional Indicator (-DI or MDI). These are
> built in indicators for AmiBroker.  In most activity (TA) buy and 
sell
> signals are generated when one crosses the other or is above or 
below.
>  I've been taught for Longs never take a position unless the PDI has
> crossed or is above the MDI.  The opposite for shorts.  We have a
> Amibroker users group here in Dallas that consist of AmiBroker, 
Trade
> Station and MetaStock users.  We have discussed these indicators at
> length and the consensus is to make sure the PDI has crossed or 
above
> theMDI (for longs). So, I have included it in most of the formulas I
> use.  Hope this clarifies.
> 
> Dick H. 
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Dickie Paria" <babui@xxxx> wrote:
> > Took a quick glance at the code.  What exactly is PDI and MDI in 
the 
> > Buy/Sell rules ?!!
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "areehoi" <hoierman@xxxx> wrote:
> > > Dickie,
> > > Here's another Breakout exporation/scan you may wish to look at 
that
> > > gets fairly good results.
> > > /* Breakout based on MetaStock & TC 2000 formulas*/
> > > // get 25-day average volume and compare today's volume
> > > V25 = MA(V, 25);
> > > Cond1=(Close>1.06*L)AND(V>V/V25);
> > > Cond2=((HHV(C,25)-LLV(C,25))/MA(H,25)-MA(L,25)*25)*100;
> > > Buy = Cond1 AND Cond2 AND (PDI (14)>MDI(14))AND C> Ref(C,-1);
> > > Sell = (PDI (14)<MDI(14)); 
> > > Filter = C <30 AND C >2 AND Volume > 100000;
> > > Result = WriteIf(Buy,"Buy","Sell");
> > > AddTextColumn(Result,"Trade",
> > > formatChar,IIf(Buy,colorDarkGreen,colorRed ),
> > > IIf(Sell,colorLime,colorPink));
> > > AddColumn( Close, "Close", 1.2, IIf( ROC(C, 1 ) >= 0,
> > > colorDarkGreen,colorRed ),50 );
> > > AddColumn(Ref(Close,-1),"Y-Close",1.2, IIf(
> > > ROC(Ref(C,-1),1)>=0,colorDarkGreen, colorRed ),50 );
> > > AddColumn( Volume, "Volume", 10.0, IIf( ROC(V, 1 ) >=
> > > 0,colorDarkGreen, colorRed ) );
> > > AddColumn( ROC( Close, 1 ), "ROC(1)", 1.2, IIf( ROC(C, 1 ) >=
> > > 0,colorDarkGreen, colorRed));
> > > Buy = ExRem(Buy,Sell);
> > > Sell = ExRem(Sell,Buy);
> > > 
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Dickie Paria" <babui@xxxx> 
wrote:
> > > > Buy = LinRegSlope( C, 10 ) < Ref(C, -10 ) *0.6/100 AND
> > > > LinRegSlope( C, 10 ) > -Ref( C, -10 ) * 0.3/100 AND Close > 
Open 
> > AND 
> > > > Low >= Ref(High, -1) AND Volume > Ref(Volume, -1);
> > > > 
> > > > Short = LinRegSlope( C, 10 ) < Ref(C, -10 ) *0.6/100 AND
> > > > LinRegSlope( C, 10 ) > -Ref( C, -10 ) * 0.3/100 AND Close < 
Open 
> > AND 
> > > > High <= Ref(Low, -1) AND Volume > Ref(Volume, -1);
> > > > 
> > > > **************************************************
> > > > 
> > > > The above is a scan for picking stocks that are making a 
breakout 
> > > > from base (long or short).  Actually - you can use it for 
> > intraday, 
> > > > forex, futures, options whatever.  There are some who believe 
> > that a 
> > > > breakout signal is more valid if the price base is relatively 
> > long.  
> > > > In that case - change the '10' in the code to whatever number 
you 
> > > > want - lets say - '120'.  If you want to backtest then simply 
add 
> > > > a 'Sell' and/or 'Cover' rule of your choice.  To get you 
started -
> >  
> > > > here's a simple sell/cover rule
> > > > 
> > > > Sell = Close < EMA(Close, 5);
> > > > Cover = Close > EMA(Close, 5);
> > > > 
> > > > I don't believe a breakout signal by itself is profitable - 
else, 
> > > > everybody and their mother would be doing it.  But combine 
with 
> > your 
> > > > favorite indicators and you may get a profitable trading 
> > strategy.  
> > > > For an idea of how to incorporate a 'price base' in the 'Buy' 
> > rule 
> > > > with 2 indicators - look at a previous post of mine 
> > > > titled 'Revelation Trading System' (posted about a week ago 
on 
> > this 
> > > > forum).




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/