Apr 7, 2016 | chart patterns, MACD, options
In this article I detailed one relatively “simple” approach to using the MACD indicator to identify potentially bullish opportunities. In this piece we will look at one to actually put those signals to use.
The Limited Risk Call Option
One possibility upon generating a bullish signal as described in the last article is to buy shares of the stock/ETF/index/etc in question. Not a thing wrong with that. But there is a less expensive alternative.
Figure 1 reproduces Figure 1 from the last piece showing ticker XLF. Let’s look at the signal generated on 2/12/16.
One alternative that I like is to use the “Percent to Double” routine at
www.OptionsAnalysis.com to find an inexpensive call option that has lot of upside potential. The input screen with a few key input selections highlighted appears in Figure 1a (if it looks intimidating please note that a reusable set of criteria can be captured in a “Saved Wizard”, which appear towards the lower right of of Figure 1a. Once a set of criteria is saved it can be reused by simply clicking on the Wizard name and clicking “Load”.)
NOTE: My own personal preference is to consider options that have at least 45 days left until expiration (as time decay can become a very negative factor as option expiration draws closer).
Figure 1a – Percent to Double
Figure 1b displays the output screen.
NOTE: For my own purposes I like to see a Delta of at least 40 for the option I might consider buying (nothing “scientific” here. It is just that the lower the Delta the further out-of-the-money the option strike price is. I prefer to buy a strike price that is not too far from the current price of the stock; hence I look for a Delta of 40 or higher). With XLF trading at $20.49, in Figure 1b I have highlighted the 2nd choice on the list – the April 21 call – which has a delta of 43.
So a trader now has two alternatives:
*Buy 2 Apr 21 strike price XLF calls for $70 apiece ($140 total cost; 86 total deltas)
*Buy 86 shares of XLF at $20.49 apiece ($1,760 total cost, 86 total deltas)
Figure 1c displays the particulars for buying a 2-lot of the April 21 call for a total cost of $140.
By 3/18 the shares had gained 11% and the Apr 21 call had gained 143%. See Figure 1d.
Summary
Obviously not every trade works out as well as this one. Still, the key things to remember are:
*The option trade cost $140 instead of $1760
*The worst case scenario was a loss of $140.
Something to think about.
Chief Market Analyst at JayOnTheMarkets.com and TradingExpert Pro client
Mar 30, 2016 | indicators, MACD
One danger of getting “way to into” the financial markets is that you can find yourself progressing into some needlessly complicated stuff (“Hi, my name is Jay”). I mean it is only natural to wonder “hey, what if I divided this indicator value by that indicator value” and such. But once you start finding yourself taking an exponential moving average of a regression line with a variable lag time, well, you can find yourself “a tad far afield.” (Trust me on this one). Which leads us directly to:
Jay’sTradingMaxim #44: Every once in awhile it pays to remember that the end goal is simply to make money. The more easily the better.
So today let’s go back to a simple “basic approach.”
The Bullish MACD Divergence
We will define an “asset” as any stock, ETF, commodity, index, etc. that can be traded on an exchange (and for my purposes, there should be a liquid market for options on that asset).
Step 1. An asset price falls to a new 20-day low and the MACD value is less than 0. Note the MACD value on this date.
Step 2. Not less than one week but not more than 2 months later:
*Price closes below its closing level in Step 1
*The MACD indicator is above its level at the time of Step 1
Step 3. The next time the daily MACD indicator “ticks higher” a buy alert is triggered
Can it really be that simple? The Good News is “Yes, it can.” The Bad News is that “It isn’t always.” To put it another way, like a lot of trading methods it can generate a surprising abundance of useful trading signals. However, there is no guarantee that any given signal will turn out to be timely. In other words:
This method gives you a good guideline for when to get in, but:
*It may be early at times (i.e., price will move lower still before advancing)
*It will at times be flat out wrong
*You still have to decide when to exit the bullish position.
*Call options are useful with this approach as it allows you to risk a limited amount of capital.
Examples
Figures 1 through 4 highlight some recent examples using this method. Note that the charts show only entry points. Exit points are “a separate topic”.

Figure 1 – Ticker XLF (Courtesy TradingExpert Pro)

Figure 2 – Ticker WMT (Courtesy TradingExpert)

Figure 3 – Ticker AAPL (Courtesy TradingExpert)

Figure 4 – Ticker GDX (Courtesy TradingExpert)
As you can see, some signals were quite timely while others were quite early. For the record, I started getting bullish on gold and gold stocks early in 2016 based in part on the multiple alerts that appear in Figure 4.
Chief Market Analyst at JayOnTheMarkets.com and TradingExpert Pro client
Mar 30, 2016 | group sector rotation, Reports, swing trading, trading strategies
In your WinWay TradingExpert or TradingExpert Pro package, look for the icon for Reports and open it. The Market Log is toward the bottom of the list on the left.
Trading and investing becomes clearer when you’re armed with this snapshot of the market and SP 500 stocks every day.
– AI rating on the market and how long it has been in place
– AI rating on all Sp 500 stocks percentage showing up ratings vs down ratings
– Bullish vs bearish levels on the market on multiple techncial indicators
– Bullish vs bearish percentage of SP 500 groups trending up vs down and the change from prior day
– Bullish vs bearish levels summary for all the SP 500 stocks on multiple indicators

Mar 29, 2016 | EDS code, Expert Design Studio, indicators
Here is some code for use in AIQ based on Markos Katsanos’s article in this issue, “Trading The Loonie.” The code and EDS file can be downloaded from www.TradersEdgeSystems.com/traderstips.htm.
The code I am providing contains both the divergence indicator and a long-only trading system for the NASDAQ 100 list of stocks. Along with fx trading online, I wanted to try the divergence idea and the author’s entry rules on the NASDAQ 100 stocks. The stocks are traded long using the author’s entry rules with two of the parameters adjusted as shown at the top of the code file. The exit has been changed completely to use a profit protect (protect 50% of profits once a 20% profit is reached), a stop-loss (protect 75% of capital), and a time-stop exit (exit after 21 days). I used the NASDAQ 100 index (NDX) in place of the crude oil futures. The assumption is that since the stocks on the list are all in the NDX, they would generally be correlated to the index. The author’s entry rule filters out those with a negative correlation to the index. Note that I changed the minimum correlation from a -0.4 to 0.0. In addition, I found that increasing the minimum divergence from 20 to 2,000 increased the Sharpe ratio and decreased the maximum drawdown without affecting the annualized return.
Figure 6 shows the equity curve versus the NASDAQ 100 index for the period 1/5/2000 to 10/14/2015. Figure 7 shows the metrics for this same test period. The system clearly outperformed the index.

FIGURE 6: AIQ. Here is a sample equity curve for the modified divergence system versus the NASDAQ 100 index for the period 1/5/2000 to 10/14/2015.

FIGURE 7: AIQ. Here are the metrics for the modified system and the test settings.
!TRADING THE LOONIE
!Author: Markos Katsanos, TASC December 2015
!coded by: Richard Denning 10/17/15
!www.TradersEdgeSystems.com
!Set parameters:
Define Len 20. !Default is 20
Define F1 2. !Default is 2
Define F2 4. !Default is 4
IDX is "NDX". !NASDAQ 100 index
IDXsLen is 40. !Default is 40
minDIVERG is 2000. !Default is 20
minROC is 0. !Default is 0
minCorrel is 0.0. !Default is -0.4
!Close percent relative to BB band width for stock:
Variance is Variance([close],Len).
StdDev is Sqrt(Variance).
SMA is simpleavg([close],Len).
stkBB is 1+([close]-SMA+F1*StdDev)/(F2*StdDev).
!Close percent relative to BB band width for index:
IDXc is tickerUDF(IDX,[close]).
VarianceIdx is Variance(IDXc,Len).
StdDevIDX is Sqrt(Variance).
SMAidx is simpleavg(IDXc,Len).
idxBB is 1+(IDXc-SMAidx+F1*StdDevIDX)/(F2*StdDevIDX).
DIVERG is (idxBB-stkBB)/stkBB*100. !PLOT AS CUSTOM INDICATOR
DIVERG1 is valresult(DIVERG,1).
ROC2 is ([close]/val([close],2)-1)*100.
ROC3 is ([close]/val([close],3)-1)*100.
ROC3idx is tickerUDF(IDX,ROC3).
IDXsma is simpleavg(IDXc,IDXsLen).
IDXsma2 is valresult(IDXsma,2).
HHVdiverg is highresult(DIVERG,3).
Setup1 if highresult(DIVERG,3) > minDIVERG.
Setup2 if DIVERG < valresult(DIVERG,1).
Setup3 if ([close]/val([close],2)-1)*100 > minROC.
Setup4 if IDXsma > valresult(IDXsma,2).
Setup5 if pCorrel > minCorrel.
Buy if Setup1 and
Setup2 and
Setup3 and
Setup4 and
Setup5.
BuyAlt if Buy.
LongExit1 if MACD<sigMACD and valrule(MACD>sigMACD,1) and
Stoch > 85.
LongExit2 if lowresult(DIVERG,3)<-20 and ROC3idx<-0.4.
LongExit3 if [close]<loval([close],15,1) and pCorrel<minCorrel.
LongExit if LongExit1 or LongExit2 or LongExit3.
AlterLongExit if {position days} >=21 or [close] <= (1-0.25)*{position entry price}.
!Code to Calculate Pearson's R [for entry]:
! PeriodtoTest is the number of lookback days.
! IndexTkr is the Instrument that you which to compare your list to.
PeriodToTest is Len.
IndexTkr is IDX.
ChgTkr is ([open] / val([open],PeriodToTest)-1)*100.
ChgIdx is TickerUDF(IndexTkr,ChgTkr).
Alpha is ChgTkr - ChgIdx.
ValUDF is (([close]-[open])/[open]) * 100.
ValIndex is TickerUDF(IndexTkr, ValUDF).
ValTkr is ValUDF.
SumXSquared is Sum(Power(ValIndex,2), PeriodToTest).
SumX is Sum(ValIndex, PeriodToTest).
SumYSquared is Sum(Power(ValTkr,2), PeriodToTest).
SumY is Sum(ValTkr, PeriodToTest).
SumXY is Sum(ValTkr*ValIndex, PeriodToTest).
SP is SumXY - ( (SumX * SumY) / PeriodToTest ).
SSx is SumXSquared - ( (SumX * SumX) / PeriodToTest ).
SSy is SumYSquared - ( (SumY * SumY) / PeriodToTest ).
!Pearson's R and Pearson's Coefficient of Determination:
pCorrel is SP/SQRT(SSX*SSY).
!Code to Calculate Pearson's R [for exit]:
! PeriodtoTest is the number of lookback days.
! IndexTkr is the Instrument that you which to compare your list to.
PeriodToTestX is 3*Len.
IndexTkrX is IDX.
ChgTkrX is ([open] / val([open],PeriodToTestX)-1)*100.
ChgIdxX is TickerUDF(IndexTkrX,ChgTkrX).
AlphaX is ChgTkrX - ChgIdxX.
ValUDFX is (([close]-[open])/[open]) * 100.
ValIndexX is TickerUDF(IndexTkrX, ValUDFX).
ValTkrX is ValUDFX.
SumXSquaredX is Sum(Power(ValIndexX,2), PeriodToTestX).
SumXX is Sum(ValIndexX, PeriodToTestX).
SumYSquaredX is Sum(Power(ValTkrX,2), PeriodToTestX).
SumYX is Sum(ValTkrX, PeriodToTestX).
SumXYX is Sum(ValTkrX*ValIndexX, PeriodToTestX).
SPX is SumXYX - ( (SumXX * SumYX) / PeriodToTestX).
SSxX is SumXSquaredX - ( (SumXX * SumXX) / PeriodToTestX ).
SSyX is SumYSquaredX - ( (SumYX * SumYX) / PeriodToTestX ).
!Pearson's R and Pearson's Coefficient of Determination:
pCorrelX is SPX/SQRT(SSXX*SSYX).
!MACD code:
S is 12.
L is 25.
X is 9.
ShortMACDMA is expavg([Close],S).
LongMACDMA is expavg([Close],L).
MACD is ShortMACDMA-LongMACDMA.
SigMACD is expavg(MACD,X).
!Stochastic
StochLen is 30.
Stoch is 100 * (([Close]-LoVal([Low],StochLen)) /
(HiVal([High],StochLen) - LoVal([Low],StochLen))).
List if 1.
—Richard Denning
info@TradersEdgeSystems.com
Mar 29, 2016 | EDS code, trading strategies
The TradingExpert code based on Ken Calhoun’s article in the March 2016 issue of Stocks and Commodities, “ADX Breakouts,” is provided at below.
Since I mainly work with daily bar strategies, I wanted to test the ADX concept from the article on a daily bar trading system. So I set up a system that buys after a stock has based around the 200-day simple moving average (Basing200). Basing200 is coded in the system as:
- The stock closing above the 200-SMA only 19 bars or less out of the last 100 bars, and
- The stock closing greater than two bars above the 200-SMA in the last 10 bars.
For exits, I used the following built-in exits: a capital-protect exit set at 80% and a profit-protect exit set at 80% once profit reaches 5% or more.
I ran this system on the NASDAQ 100 list of stocks in the EDS backtester over the period 12/31/1999 to 1/11/2016. I then ran a second test on the system using the ADX filter (ADX must be greater than 40 at the time of the signal to buy). I used the same list of stocks, exits, and test period.
Figure 8 shows the first test without the filter: 883 trades, 1.84% average profit per trade, 1.51 reward/risk. Figure 9 shows the second test with the filter: 151 trades, 2.12% average profit per trade, 1.66 reward/risk.

FIGURE 8: WITHOUT FILTER. Here are the EDS test results for the example system without the ADX filter.
FIGURE 9: AIQ, WITH FILTER. Here are the EDS test results for the example system with the ADX filter.
Although all of the key metrics are better with the filter, there is a significant reduction in the number of trades. In fact, 151 trades would not be sufficient for a trading system over this long test period. If one wanted to use the filter, then the list of stocks would need to be increased to about 2,000 stocks.
!ADX BREAKOUTS
!Author: Ken Calhoun, TASC March 2016
!Coded by: Richard Denning, 1/11/2016
!www.TradersEdgeSystems.com
!NOTE; THIS SAMPLE SYSTEM IS FOR
!DAILY BAR TESTING OF ADX FILTER ONLY
SMA200 is simpleavg([close],200).
HD is hasdatafor(250).
Above200 if ( [close] > SMA200 ) .
Basing200 if CountOf(Above200,10) >2
and CountOf(Above200,100) <20 .="" and="" basing200="" buy="" hd="" if="">200.
ADXhi if [ADX] >= 40.
BuyADX if Buy and ADXhi.