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

[amibroker] Re: An effective stopping methodology - 3BSMA and powerSAR stops



PureBytes Links

Trading Reference Links

Wilder is a very famous guy.  If an indicator is from him, I would  
give it serious consideration. I have not used or studied CSI.  What 
I know about CSI is from the Technical Analysis A to Z book at 
metastock.com site.

In my experience the main indicators I find most useful are 1) Moving 
Averages 2) Momentum and 3) Stochastics.    The indicators only 
indicate, they do not signal.  One has to build an expert system of 
these indications to get an optimal signal out of it.  A Neural 
Network is theoretically superior to an expert system, but what it is 
doing is over-optimizing and there is a real danger in 
overoptimizing.  When you overoptimize, what works in the past 
doesn't work in the future.  When you think of artificial 
intelligence, you tend to think of self-learning and changing and 
optimizing as time goes on.  

Whether or not a system is secret, the key issue for anyone 
considering trading a system is how well it has performed on data the 
system has not been optimized on -- that is, out-of-sample data.  So, 
I don't think it is prudent to optimize the paramaters for these 
indicators.  Rather, I would fix and use the smallest period which is 
practical from pocket book size point of view for these indicators so 
that they are more responsive to changes in the market and it is also 
easy on your pocket book from drawdown point of view.  This should be 
the main consideration for selecting the period for the indicators, 
not the UPI.  I learned this the hard way.

However, Optimizing the parameters for Money and Risk Management 
(MaxOpenPos based on UPI),(PositionScore based on RSW) does makes 
sense, because here we are dealing not with any indications but with 
random outcomes.

Unlike gambling, where the outcomes are known and probabilities 
constant and equal with a 50/50 win/loss ratio, in trading we have a 
multitude of random outcomes (UNKNOWN, UPREDICTABLE WITH 100% 
CERTAINITY) with undetermined (NON-CONSTANT, UNEQUAL) probability of 
winning. The outcome of a single trade is completely random and 
independent of the preceding trade.  The maximal loss is a 
nondescreasing step function, with random amplitude leaps occurring 
at random moments.  So, there is no real evidence to suppose that the 
maximal loss and maximal drawdown achieved will persist in the future 
which makes it necessary to protect ourselves against those rare 
events which might bankrupt us (worst case scenario) and so we look 
for an optimal outcome WHICH IS AN OUTCOME WHICH WILL NEVER BANKRUPT 
US.  It is like designing a building to withstand an earthquake or a 
hurricane or a sunami in which case if it can withstand those rare 
events, it is an optimal building.  In such cases, an MCS to 
determine MDD or Maximum Stress and thereby MaxRisk (optimalf%)would 
be immensely valuable.

Thanks for listening.

rgds, Pal

--- In amibroker@xxxxxxxxxxxxxxx, "john gibb" <jgibb1@xxxx> wrote:
> Hi Pal,
> 
> that WAS helpful...
> 
> Do you have an opinion on Wilder's Commodity Selection Index, 
which, like
> the Random Walk Index, combines price(via an 'averaged' ADX) and
> volatility(via ATR) (as well as margin requirement, and 
commissions)? (It
> looks interesting, but in his first book, he speaks of it only for
> commodities, which I don't trade.)
> 
> BTW, it was kind of funny when I went to tradingsolutions.com...a 
Java chat
> session(with a sales rep) automatically opened!
> 
> thanks
> 
> -john
> 
> 
> ----- Original Message ----- 
> From: "palsanand" <palsanand@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Sunday, December 14, 2003 9:47 PM
> Subject: [amibroker] Re: An effective stopping methodology - 3BSMA 
and
> powerSAR stops
> 
> 
> > I was hoping somebody like you would have converted TradeStation 
code
> > into AFL.  Actually I use TradingSolutions code downloaded from 
their
> > site.  I found AB and TradingSolutions to be killer combo.  
Ideally,
> > I would like all my systems to be in both of these platforms.
> > TradeStation code seems to be the ideal one to use to convert it 
to
> > AFL, though.
> >
> > Here's what experts do with ADX ( I don't have the full S& C 
article,
> > only excerpts)
> >
> > How The Pros Use Average Directional Index
> >
> > ------------------------------------------------------------------
----
> > ----------
> > by Barbara Star, Ph.D.
> > ------------------------------------------------------------------
----
> > ----------
> > Here's how technicians Charles LeBeau, Paul Rabbitt, and Linda
> > Bradford Raschke integrate the average directional index into 
their
> > trading plans.
> >
> > ------------------------------------------------------------------
----
> > ----------
> >
> > How would you like to look over the shoulders of professional 
traders
> > using one of your favorite indicators? Here's your chance. I spoke
> > with three well-known traders who put their own money at risk 
daily.
> > I asked them to show me what they do with the average directional
> > index (ADX), one of the longest-lived and most popular trend
> > indicators around.
> >
> >
> >
> >
> >
> >
> >
> > FIGURE 1:  RABBITT TEMPLATE, XOI OIL AND GAS INDEX. Paul Rabbitt's
> > screen template shows both the overall price action and the
> > indicators at the same time. The original template consists of a
> > black background, white price bars, and yellow trendlines. Those
> > colors were changed for this article to provide better contrast.
> > I asked Charles LeBeau, Paul Rabbitt, and Linda Raschke how they
> > integrate ADX into their own trading analysis and trading tactics.
> > Here, largely in their own words, these traders explain the 
thinking
> > that guides their decision-making. Hopefully, some of their
> > strategies might make you think about how this indicator can 
improve
> > your trading.
> > PAUL RABBITT
> >
> > Paul Rabbitt is a well-known quantitative strategist. During his 
20-
> > year affiliation with the Oppenheimer Co., he created and ran 
their
> > quantitative department. He also developed the "Q" stock ranking
> > system, a 12-factor stock risk/return model. He was a senior
> > portfolio strategist when he left the firm in 1998 to form his own
> > company. Currently, he advises institutional clients and provides
> > sector and industry forecasts. Rabbitt's analyses and investments
> > include stocks, bonds, various financial indices, and Spyder 
sectors.
> > Market comments and quantitative rankings on individual stocks are
> > available on his Website. (For the URL see "Related resources" at 
the
> > end of this article.)
> >
> > Rabbitt uses a 14-unit ADX with end-of-day data as a rough gauge 
of
> > momentum. "I use a very simplistic interpretation of ADX. If I 
have a
> > rising ADX, but it is only at the 15 or 20 level, I consider it a
> > weak momentum situation. If it is above 30, I consider it a 
stronger
> > momentum situation. Even if ADX changes direction, as long as it
> > remains above 30, I regard it as a momentum situation. And the 
higher
> > the level, the greater the strength of the momentum. I don' t try 
to
> > refine ADX too much," he comments.
> >
> > Entries and exits: Given his background, Rabbitt relies on
> > fundamentals, such as earnings announcements, earnings surprises, 
or
> > company developments to form the basis for selecting buy or sell
> > candidates. Then he looks at his technical tools. ADX helps 
determine
> > entry and exit points on preselected securities. "ADX is the
> > accelerator/decelerator in the trading process. ADX does not 
dictate
> > whether I stay in or out of a trade," he goes on to say. "ADX only
> > postpones a sale or accelerates a sale or postpones a purchase or
> > accelerates a purchase.
> >
> > "My goal is to invest rather than trade, so I try to slow my 
activity
> > as much as I can and stay in situations as long as I can," he
> > explains. "What I am trying to do is create what I call tax-
efficient
> > investment calls. I am trying to create long-term capital gains."
> >
> >
> > ------------------------------------------------------------------
----
> > ----------
> > Barbara Star, Ph.D., university professor and part-time trader,
> > provides individual instruction and consultation to those 
interested
> > in technical analysis.  She leads a MetaStock users group and is a
> > past vice president of the Market Analysts of Southern California.
> >
> > The best time to enter a trade with ADX/DI/DMI/RWI/VHF/TII type
> > indicators is when it generates the signal, but if the signal is
> > several weeks into a trend, watchout because most trends don't 
last
> > that long.  Random Walk Index (RWI) considered the modern day ADX
> > calculates trend using 2 variables: price and volatility.
> > Essentially, this indicator will tell you if the price move is
> > significant relative to the current daily range.  But, I find 
these
> > indicators a bit difficult to interpret.
> >
> > Instead, I use Squelch functions to detect cyclic or trending
> > mutually exclusive situations and accordingly modify my stopping
> > methodology, specifically a 3BSMA stop (next session onwards after
> > entry) in cyclic/trending reversal situations coupled with an 
initial
> > (mental) ATR based stop on day of entry.  I use a 3BSMA stop
> > exclusively in cyclic situations.  Once a clear trend is evdent,
> > indicated by Squelch functions etc., I switch my ATR/3BSMA stop 
over
> > to a powerSAR stop which I also use for continuation of trend
> > situations exclusively.
> >
> > Hope this helps.  Sorry, couldn't be of further help.
> >
> > rgds, Pal
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "john gibb" <jgibb1@xxxx> wrote:
> > > Hi Pal,
> > >
> > > Can you share the AFL for the Ehler's Squelch function...i 
found the
> > > TradeStation code here
> > > http://trader.online.pl/ELZ/t-pb-Squelch_Indicator.html
> > >
> > > but hopefully you or someone else has converted it?
> > >
> > > BTW, have you used any other trend-or-not indicators like 
ADX/DMI?
> > If so,
> > > how did they compare to Squelch?
> > >
> > > thanks
> > >
> > > -john
> > > ----- Original Message ----- 
> > > From: "palsanand" <palsanand@xxxx>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Saturday, December 13, 2003 5:11 PM
> > > Subject: [amibroker] An effective stopping methodology - 3BSMA 
and
> > powerSAR
> > > stops
> > >
> > >
> > > > Hi All,
> > > >
> > > > I have been searching for an effective stopping methodology 
for a
> > > > very long time (since I began trading).  I experimented with
> > several,
> > > > like all kinds of MA based stops, Gann's Rule of Eights stop, 
ATR
> > > > based stops etc., I finally may have found a good one.  It is
> > based
> > > > on the theory that there are essentially two types of markets:
> > > > Trending and Trading Range.  An instrument does not start a 
new
> > trend
> > > > immediately after ending the previous trend.  It might go 
into a
> > > > consolidation phase (Trading Range) before starting a new 
trend.
> > The
> > > > problem is to time this start of a new trend.  Sometimes we 
have
> > to
> > > > wait for a long time indeed, thus if we enter the market too
> > soon, we
> > > > get whipsawed.  To solve this problem, I came out with the
> > > > following:  Use a "mental stop" on day of entry at a 
reasonable
> > > > distance from your entry point.  Either an ATR based stop or a
> > pivot
> > > > point support/resistance based stop would suffice and exit 
only
> > after
> > > > 20 minutes has passed since your mental stop is exceeded and 
you
> > are
> > > > still losing.  Use a 3BSMA stop during the initial stages 
(from
> > next
> > > > session after entry when the start of a new trend is still 
not yet
> > > > confirmed) in accordance with the principle: Cut your losses
> > short.
> > > >
> > > > Plot(MA(C,3),"MA3",colorWhite,1);
> > > >
> > > > Once, a new trend has started (confirmed by LinRegReveral
> > Indicator
> > > > and/or Zig-Zag trend indicator) and powerSAR has also 
confirmed
> > the
> > > > new trend, use the following stop in accordance with the
> > principle:
> > > > Let your profits run.
> > > >
> > > > Plot(scPowerSar(0.02,0.01,0.2),"PowerSAR",-16,8+16);
> > > >
> > > > (You need AB's dll's to use this function)
> > > >
> > > > SAR is the Stop and Reverse system developed by Welles Wilder.
> > This
> > > > system indicates where one should exit a trade and 
simultaneously
> > > > reverse positions.  It may also be coded to provide a stop for
> > > > tomorrow's trading action.  This function does not work with
> > > > Equivolume chart.
> > > >
> > > > This provides a systematic way to set a stop order.  The 
stops are
> > > > changed daily and are adjusted to suit the market's 
conditions.
> > It
> > > > also keeps you constantly in the market.  When one gets 
stopped
> > out,
> > > > you are also to initiate a trade in the opposite direction (In
> > > > reality, you would already may have gotten a reversal signal 
and
> > may
> > > > be already trading it using a 3BSMA stop).  This is generally
> > used by
> > > > futures and forex traders.  Stock traders could of course 
short
> > the
> > > > stock however, one could also just buy stock and sell it 
without
> > > > shorting it.  Then when the next buy signal occurs, jump in 
again.
> > > > This can be quite useful during trending markets however, it 
is
> > > > practically useless in trendless conditions (I use Dr. John F.
> > Ehlers
> > > > Squelch functions to distinguish between trending and trading
> > ranges)
> > > > or when the price is consolidating.  One can get whip-sawed 
and
> > make
> > > > several losing trades under these trendless conditions.
> > > >
> > > > This function is inherently a trend-following study.  It 
increases
> > > > the stop level each successive day until the 10th day that the
> > market
> > > > is still trending.  At this point, it raises the stop level
> > > > proportionally daily.  This is due to the observed fact that 
10-
> > day
> > > > runs are extremely rare.  These long runs do occur however 
they
> > only
> > > > occur around 5% of the time.  So this works magnificiently in
> > trends
> > > > and miserably in congestion or consolidation periods, but 
works
> > well
> > > > when combined with a 3BSMA stop during the initial stages 
(when
> > the
> > > > start of the new trend is not yet confirmed and you want a 
tight
> > stop
> > > > just in case the new trend did not start.  Doesn't mean that 
you
> > were
> > > > wrong in trading it, just that sometimes it takes a long time 
for
> > a
> > > > new trend to develop and most people don't have the guts to 
buy
> > when
> > > > everybody else is selling and sell when everybody else is 
buying
> > and
> > > > that is one of the reason most traders lose and ofcourse they 
may
> > > > also lack patience and also adequate capitalization, money-
> > management
> > > > (PositionSize, MaxOpenPos, MaxRisk, PositionScore etc.,))
> > > >
> > > > Any feedback appreciated.  TIA.
> > > >
> > > > rgds, Pal
> > > >
> > > >
> > > >
> > > > Send BUG REPORTS to bugs@xxxx
> > > > Send SUGGESTIONS to suggest@xxxx
> > > > -----------------------------------------
> > > > Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx
> > > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > > --------------------------------------------
> > > > Check group FAQ at:
> > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > >
> > > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> > > >
> > > >
> > > >
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > --------------------------------------------
> > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> >
> > Your use of Yahoo! Groups is subject to 
http://docs.yahoo.com/info/terms/
> >
> >
> >


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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/