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

A Great Trading System



PureBytes Links

Trading Reference Links

Sharing a Great System-

In the spirit of trying to get others to share their codes with the
Amibroker community, here is a program that has worked well for me. Since I
know nothing about coding and programming, it was coded for me by Tomasz,
based on the concepts of Dr. Alexander Elder. 

In Elder's system, he begins by analyzing WEEKLY data, using the slope of
the MACD-Histogram to identify market tide. The slope is defined as the
relationship between the latest two bars. When the slope is up, trade long;
when slope is down, go short.

In his system, a single uptick or downtick of the WEEKLY MACD-H indicates a
change of trend. Of course, best buy signals result from upturns that occur
below the centerline, but if they occur above the centerline, this is still
a buy signal. Same is true for downturns above and below the centerline,
which trigger sell signals. The formula is:

/* Nate_Gurucommentary_3.afl */
macdhist = macd( 12, 26 ) - signal( 12, 26, 9 );

/* 13 week exponential moving average */
ema13week = ema( close, 13 );

/* calculate 1 week macdhistogram change */
macdchange = macdhist - Ref( macdhist, -1 );

/* calculate 1 week slope */
emaslope = ema13week - Ref( ema13week, -1 );

buy = emaslope > 0 AND macdchange >0;
sell = emaslope < 0 AND macdchange < 0; 

WriteIF( buy, "Buying opportunity", 
WriteIF( sell, "Selling opportunity", "No valid signals" ) );

buy = ExRem( buy, sell );
sell = ExRem( sell, buy );

Once you find a stock where the trend of the weekly MACD-H has changed, say
up, then you turn to the DAILY chart for that stock and look for trades in
the same (up) direction. I use a Stochastic to do this, and when the
WEEKLY trend MACD-H is up, I take only buy signals from the DAILY oscillator.

As Elder teaches, when you enter a trade, the purchase price is set 1 tick
above the current day's high. In this way, on the next day, that is, the
day your buy order will be executed, if the stock continues to move upward,
you will be STOPPED IN; if the stock does not continue to move up, your buy
price will not be hit and the order will not be filled.

Whenever I enter a position, I ALWAYS place a stop loss. This can be
determined in a number of ways, and I will be glad to explain what I use to
any who are interested- but it is outside the point of this message.

If I have taken a long position, I will stay with that position until the
WEEKLY trend, using the above formula, reverses, or I have been stopped
out. If trading more actively or aggressively, I would exit the position if
the Stochastic turns down from above the 70% line.

Elder's trading system is essentially buy on dips in uptrends, sell on
rallies in downtrends. In 25 years of trading, it is the safest system I
have found, and I am happy to share it with everyone.

Hopefully, others of you will be inclined to share systems which work for
you. I would ask that if you are willing to share, please post your
formulas in a form that someone like me- with no programming skills- can
cut and paste into Amibroker.

Nate Berger