0% found this document useful (0 votes)
749 views176 pages

Indicator Manual

This document provides an overview and pricing for Sunny J. Harris' trading indicators, functions, and strategies. It includes screenshots and brief descriptions of indicators like the Dynamic Moving Average, Exit Strategies, Pennant Finder, and PHW (Profit Harvesting Wave). The document emphasizes that the tools are for educational purposes and require adapting to individual trading styles and instruments. It also provides contact information for Sunny Harris and notes that a free 7-day trial is available.

Uploaded by

World New
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
749 views176 pages

Indicator Manual

This document provides an overview and pricing for Sunny J. Harris' trading indicators, functions, and strategies. It includes screenshots and brief descriptions of indicators like the Dynamic Moving Average, Exit Strategies, Pennant Finder, and PHW (Profit Harvesting Wave). The document emphasizes that the tools are for educational purposes and require adapting to individual trading styles and instruments. It also provides contact information for Sunny Harris and notes that a free 7-day trial is available.

Uploaded by

World New
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 176

USERS’ MANUAL

Sunny J. Harris’
Indicators, Functions & Strategies
Last Update: 20230101

These Indicators are for TradeStation or MultiCharts.


Sorry, I do not have them for other platforms. Yet.

This manual is a continual work in progress. It is by no means finished. If you come across something
you need to know which is missing from the document, call me and I’ll get to that part right away.
-Sunny
Introduction
Quick Reference to Sunny Harris Indicators, Functions and Studies.
Sunny Harris (me) has been trading since 1981. It’s my job. It’s what I do. In addition, I write books about
trading (not a very lucrative endeavor, but a labor of love.) And, I do private consulting with new traders
who want to learn the business, and seasoned traders who want to get better. And I program
EasyLanguage and PowerLanguage.

Note that there are many hyperlinks in this document. You can hover over the hyperlinks (usually blue
words) and then by clicking on the link you jump to that page.

For more comprehensive understanding of Sunny’s technology and philosophy, we have a consulting
program available in person, by phone or via the Internet. (http:/www.moneymentor.com) Please call
me at (760) 908-3070 or on Skype at sunnyjharris for further information. Or, of course, you can reach
me at sunny@moneymentor.com. Reading my fourth book, “Getting Started in Trading,” followed by
my second book, “Trading 102—Getting Down to Business,” (in that order) will help you to understand
my philosophy and the thinking behind many of these indicators. Reading my 6th book, “TradeStation
Made Easy!” will teach you even more, including how to program your own indicators and strategies.

The indicators and strategies in this book are the same ones (exactly) that I use in my own daily trading.
I use them all, but not all on one chart. I have several screens and many charts on each. When you
purchase my products, I teach you to use them just like I do. I help you install them, and I send you
updates at no charge, forever.

All indicators, functions, showme’s, paintbars signals and strategies are offered strictly for educational
purposes only. They are available by one-time license only. They are not for sale. You are only charged
the one-time fee, no recurring charges. No fitness for purpose is implied, implicitly or explicitly. By using
these studies, you are indicating your agreement to the license agreement set forth in the appendix of
this document and/or in the Readme.txt file on the diskette or CD that contains the studies) you have
licensed. Please carefully read the Disclaimer that follows.

Consulting/Mentoring time cannot be returned or refunded. Once I have taught you something, I
cannot take it back. You can’t unlearn something. Also, software is not returnable. Once I send it to you
by email it is in your possession and I can never get it back. Please do not ask for a refund.

© 1993-2021 Sunny Harris Enterprises

1547 Mission Meadows Dr. Skype sunnyjharris


Oceanside, CA 92057 www.moneymentor.com

Phone 760.908.3070  Fax 760.903.2260 sunny@moneymentor.com


Next
No matter whose indicators and systems you are using, you will have to adapt them to the particular
instrument (symbol) and time-frame (5-min, 15-min, 60-min, daily …) you are interested in.

You cannot expect my indicators to “work” right out of the box, until and unless you tailor them to suit
your situation. Don’t worry though, I will assist you in this process.

Before you begin to install the software, you will need to download it from the email I will send you.

After it is downloaded to your computer, you must undertake to install the software.

In the email I also give you your j_Key password, which is unique to you. It is generally the first input
value in any of my indicators.

Next, you need to adjust the software to the rhythm of the market. You do that by testing different
time-frames. As I say in my talks, the S&P generally trades on a 15-minute chart while the bonds trade
on a 45-minute chart, stocks trade on daily charts. You must find the natural rhythm of your trading
instrument.

Clearly, when you find that my indicator shows you the correct buys and sells (the ones you expect),
you will have identified the rhythm of the market in question.

Then, after finding the correct time-frame, you will need to optimize the stops and profit protection to
maximize your returns. You will do this with the “sjh_ExitStrategies” strategy, or by setting your exits
by hand. If you have licensed my “sjh_ExitStrategies”, then run a full optimization, with all the
parameters maximized to find the best range of situations.

Those are the basics. Now, onto the full documentation.


Before We Begin
Let’s take a look at all Sunny’s Indicators. In each box, the top chart is from TradeStation while the chart
below it is from MultiCharts.

NOTE: Prices are subject to change without notice.

Pricing Overview With Pictures


Starting below and on the following pages are screen captures of my indicators. Yes, they are small, but
I’m limited by page size.

If you like any of them, I can always give you a FREE 7-day trial, which comes with a FREE 20-minute
consult to help you install them, get them on your chart, and show you exactly how I use them in my
own trading.

See below for charts and prices:


Dynamic Moving Average for
Charting

Created to avoid most of the problems with


Whipsaw, this sophisticated mathematical
formula is unparalleled by any other in the
industry. It’s a moving average that corrects
itself as the market speeds up and slows
down. (…more ) ..................................... $995.00

Dynamic Moving Average for


RadarScreen

Created to highlight the positions of the DMA


Indicator, this tabular view instantly pinpoints
“gold on top” or “purple on top” and the
values of the difference between the two
lines. Makes it easy to sort for values already
in progress versus values currently in
congestion phase. (…more )........................ $995.00
Dynamic Moving Average Histogram

Created to highlight the crossovers of the


DMA by showing green on top and red on the
bottom, this indicator also makes it easy to
spot divergence between price and the
indicator, allowing for early entry and exits.
(…more ) ............................................... $995.00

NOTE: You can package any two or more for a


discounted price. Please call (760) 908-3070
for pricing.

Dynamic Moving Average Strategy

Created to catch trends and avoid whipsaws,


this strategy can be automated if you wish,
after you optimize the parameters to your
desired settings, for the symbol and
timeframe of your choosing. (…more )
............................................................ $2,995.00
EXIT BY:
Exit Strategies
• Share or Position
Ever wished you could optimize all of • Profit Target
TradeStation’s exit techniques in one place? • StopLoss Amount
This is the answer. In addition to the standard • BreakEven Floor
TS exits, this signal also provides several more • Dollar Trailing Amount
designed by Sunny. (…more ) • Percent Trailing Floor Amount
• Percent Trailing Percent
............................................................ $2,060.00 • Exit On Close
• Standard Deviation
• Next Open
• Next Profitable Bar
• Trend Change
• After “n” Bars
• Time of Day

Ultimate-F Compounding
Spreadsheet

Using concepts originated by Ralph Vince as a


stepping off place, and adding Sunny’s PhD
Mathematics, this software compounds
profits dramatically without the high risk of
ruin encountered in Vince’s work. (…more )

............................................................ $2,995.00
Dynamic Moving Average Crossover
Marker

See at a glance on which bar the DMA turns


from buy to sell, or sell to buy. The exact bar is
painted a different color, and is made wider.
(…more ) .................................................. $195.00

Pennant Finder

Some people like to trade breakouts, rather


than moving averages. This indicator was
designed for a client who preferred to trade
breakouts. The indicator marks areas of
congestion with little triangles that show the
top value and bottom value to use for
breakouts. (…more ) ............................... $695.00
PHW

This is Sunny's main research tool. “I use it for


marking yellow dots on all significant turning
points.” Then the indicator calculates: the
date range of the symbol; Buy and Hold; the
number of ideal trades; the ideal profit; and
the PHW profit (which is 60% of the ideal)
(…more ) .................................................. $695.00

PHW for RadarScreen

The beauty of this indicator, only for


RadarScreen, is that you can sort by the PHW
value, ordering from greatest to least, and
find the instruments (stocks, futures, ...) that
have the highest PHW. A high PHW means
that the instrument has lots of up and down
moves in it. Lots of pivots. With pivots, you
can make profit from trading. Without pivots,
you might as well just buy-and-hold. (…more )

............................................................... $695.00
SunnyBands

With the power of the proprietary


DynamicMovingAverage (DMA) behind it,
these bands are formed by variable Average
True Ranges distant from each separate DMA.
Unlike Bollinger Bands, these bands pinpoint
turning points as price drops back within the
bands. With the SunnyBands comes free
personal instruction in how to trade with
them. (…more ) .................................... $1,995.00

PBTouching SunnyBands

Want to see at a glance whether a bar is


touching, or outside of, the SunnyBands? This
PaintBar makes it abundantly clear. (…more )

............................................................... $695.00
SunnyBars

Want to see at a glance how volume affects


price action? This indicator makes higher
volume bars wider, and low volume bars
narrower. At a glance you can see where the
high volume moves are.(…more ) .......... $795.00

RedLiteGreenLite

This indicator is for RadarScreen. The cells


turn red if price is below the moving averages
and green if price is above the moving
averages. There are 3 moving averages (of any
type selected) and any length. If all 3 cells are
red, that gives a red light for shorting.
Likewise, if all 3 cells are green, that gives a
green light for longs. (…more ) ............... $695.00

CPC Index

This is programmed as a signal, but is actually


more of an indicator. You add it to other
signals to form a strategy, and CPC prints out
Sunny's proprietary calculation which allows
one to compare any system to all others.
Instantly know your CPC Index and you'll
know whether a system is tradeable or not.
(…more ) .................................................. $495.00
PaintBar Rollovers and Expirations

Ever worry that you might enter a trade for


the wrong front-month? Ever worry about
which Thursday is roll-over and which Friday is
expiration Friday? Never fear, a PaintBar's
here.
The magenta bars are all on Expiration
Friday. With a simple input you can also
highlight the Roll-Over Thursdays (shown here
in green). (…more ).......................................... $195.00

Label Days of Week

By putting a letter on each bar, you can easily


see what day of the week any bar is. This is
especially valuable when looking at intraday
charts and determining whether there is
certain activity on particular days. It’s subtle,
but powerful. (…more ) .......................... $245.00

Paint Days of Week

Similar to the indicator above, this one paints


each day of the week a different color. Makes
visual inspection a breeze. (…more ) ..... $245.00

Paint Day Sessions

The Day-Session bars are colored blue in this


chart, while the Extended-Session bars are
green. This makes life a lot easier for me,
when I can tell which session I'm in—at a
glance. (…more )...................................... $245.00
sjh_RSI

This indicator has several facets.

• It uses the ORIGINAL Welles Wilder


formula (TS does not)
• It prints the value of the RSI on the
last bar of the chart
• It colors the RSI red, blue and green,
depending on overbought & oversold
conditions
• It sets the OB & OS conditions to
40/60
• It draws the midline at 50 (…more )
....................................................... $295.00

sjh_SmoothRSI

This indicator (shown on the chart along with


a standard RSI) smoothes the RSI with Sunny’s
DMA. This gives much less volatile readings
and far less crossovers (…more )........... $295.00

ShowMe Closes Above 200 MAV

Want a quick way to see if prices are greater


or less than a certain moving average? Here it
is! For instance, industrial pundits often talk
about price touching the 200 day moving
average. This ShowMe places dots on the
applicable bars. (…more ) ..................... $195.00

What Time Is It?

This little routine simply places the price and


time of the last bar, to the right of the last bar
itself. I find it helpful when I’m wondering if
my datafeed is still working. (…more ) . $195.00
sjh_Smoothed ADX

The Smoothed ADX does what it says: It


smoothes out the jagged lines to help
eliminate whipsaw. In the picture to the right
you see the standard ADX in red, the
smoothed ADX in purple. (…more ) ...... $295.00
CHAPTER 1: Introduction
Indicators and Functions developed by Sunny J. Harris for her own trading have been made available to
qualified individuals for their own education and study. This document is sketchy and incomplete. To
really learn how to use Sunny’s indicators it would be best to discuss them with her either over the
phone, internet or in person. Check the current prices on www.moneymentor.com.

What’s Available?
This is the list of indicators, showmes, paintbars and functions available through Sunny’s website:
www.moneymentor.com. At this time, all of these indicators are for TradeStation or MultiCharts only.
I am developing indicators for Genesis Navigator, Ninja Trader and MetaStock, but they are not
available yet. Keep coming back; I’ll get there one of these days.

To view pictures of each of these indicators, click on the hyperlinked name of the indicator below.

1. sjh_I_ADXSmoothed (Smoothing ADX with Sunny’s DMA Function


2. sjh_I_AllAverages (optimizable averages)
3. sjh_I_ATRTrailing (AverageTrueRange TrailingP
4. sjh_I_BidAskDiff (a RadarScreen indicator showing the difference between the Bid &
Ask)
5. sjh_BingTicks (plays a sound for each tick of the market. I use it to gauge market
activity and volume.)
6. sjh_I_BuyHold Profit
7. sjh_I_Candles (multiple indicators each highlighting candle patterns, sold as one)
8. sjh_SM_CurrentPrice (places a dot at the far right, at the current price. Turns blue for
upticks and red for downticks and changes colors in the Night Session
9. sjh_I_CPC Index (calculates Sunny’s single system performance measurement)
10. sjh_PB_DaySessions (paints the day session bars a different color)
11. sjh_DaysOfWeek (paints any day of the week a different color)
12. sjh_I_DMA (Dynamic Moving Average) Indicator
13. sjh_S_DMA (Dynamic Moving Average) Strategy
14. sjh_DMA Hist (Dynamic Moving Average Histogram) Indicator
15. sjh_S_Exits (optimizable Exits Strategies)
16. sjh_ExpirationFriday (paints the 2nd Thursday and 3rd Friday a different color)
17. sjh_I_Pennants (identifies areas of congestion) for charting & RadarScreen
18. sjh_I_PHW (Potential Hourly Wage) Indicator for charting & RadarScreen
19. sjh_PrintStatistics (prints the significant stats, from the Performance Report, in the
PrintLog, so you don’t have the Performance Report hovering over your plot area.
20. sjh_RedLiteGreenLite (for RadarScreen)
21. sjh_I_SunnyBands (DMA + ATRs on either side)
22. sjh_SunnyBars (Bars with more volume are painted wider; and open, high, low close
are differentiated by colors)
23. sjh_UltimateF (proprietary spreadsheet which calculates the number of contracts to
place for the next trade based on Sunny’s UltimateF compounding theories—for
maximizing profits on a profitable system.)
24. sjh_WhatTimeIsIt (plots/prints the time of the current bar in progress)

For pictures of each of these indicators, read on. Each indicator has its own section, which explains the
inputs and shows a chart with the indicator on it.
CHAPTER 2: Sunny Harris’ Dynamic Average
There are other indicators by other vendors, that call themselves Dynamic or Adaptive. Marc Jurik has
one; Perry Kaufman has one. And there is one in TradeStation’s standard list of indicators. But none of
them works like mine. I invite you to try them all and compare. You will soon see by the evidence, that
mine has some sophisticated mathematics in the algorithm that allows it to move out of the way of
most whipsaw activity. And it’s the whipsaw that eats up all of most traders’ profits.

Dynamic Moving Average Indicator


NAME: sjh_DynamicAvg$$_7

INPUTS:
j_Key(0), //your passkey value
j_Vendor(“TS”) //TradeStation (“TS”) or MultiCharts (“MC”)
j_Price1(C), //OHLC for fast avg
j_Price2(C), //OHLC for slow avg
j_L1(8), //length of fast mav
j_L2(13), //length of slow mav
j_T1(0.25), //scaling factor for fast DMA
j_T2(0.25), //scaling factor for slow DMA
j_ATR_Len(14) //Average True Range Length
j_Precision(2) //Number of Decimal Points to use in calculations
j_Color1(14), //color of 1st plot line
j_Color2(12), //color of 2nd plot line
j_Thick1(3), //thickness of fast plot line
j_Thick2(3) //thickness of slow plot line
;
Explanation of Inputs:
j_Key a password value given to you on trial or purchase of the indicator

j_Vendor TradeStation (“TS”) or MultiCharts (“MC”)

j_Price1 Use O, H, L, or C for Open, High, Low or Close. You can use any of these price values
to calculate the fast line of the Dynamic Moving Average.

j_Price2 Use O, H, L, or C for Open, High, Low or Close. You can use any of these price values
to calculate the slow line of the Dynamic Moving Average.

j_L1 Length for the fast dynamic moving average

j_L2 Length for the slow dynamic moving average

j_T1 Scaling factor for the fast moving average (Optimize values from 0.1 to 0.4)

j_T2 Scaling factor for the slow moving average (Optimize values from 0.1 to 0.4)

j_Color1 Color value for the fast moving average (See Appendix A)
j_Color2 Color value for the slow moving average (See Appendix A)

j_Thick1 Thickness of the fast moving average line (0-6, see Appendix A)

j_Thick2 Thickness of the slow moving average line (0-6, see Appendix A;

j_LRLength Number of bars to use in calculating LinearRegression Line (Angle)

When it comes to the Strategy form of this indicator, not all values for the inputs are optimizable. For
instance, you wouldn’t want to optimize the thickness of the lines or the color values. It wouldn’t make
sense. For more information on the Strategy format, see Chapter 3.

To insert the indicator on your chart, follow these steps:


Go to the top menu bar and click on Studies. Then pull-down to Add Study.

Figure 2.1—Insert  Indicator (TS 9)

Figure 2.1a—Insert  Indicator (TS 10)

Select the DynamicMovingAverage from the list of available indicators. See Figure 2.2.

The name of my DynamicMovingAverage in the list is sjh_DynamicAvg$$_7.


Figure 2.2—Insert  sjh_DynamicAvg$$_7

Next you need to set the Input Values to the proper values. See Figure 2.3.

The values I use most of the time are shown in Figure 2.3. Set them accordingly the first time. You can
venture out from there depending on your choice of symbol and time period.
Figure 2.3—DynamicMovingAverage Input Values

On the E-Mini S&P, daily bars, here’s what the indicator should look like. (Figure 2.4)
Figure 2.4—DynamicMovingAverage on a chart

Figure 2.4a—DynamicMovingAverage version 11 on a chart (notice labels)


Figure 2.4b—DynamicMovingAverage on a MultiCharts window
Figure—DynamicMovingAverage on a MetaStock chart

Notice the sophistocation of the mathematics in this indicator! It beautifully stays away from most of
the choppiness in the market. When the market is in whipsaw mode, generally the indicator refuses to
cross back and forth, as most indicators do.

For comparison, let’s take a look at TradeStation’s built-in Adaptive Moving Average. In Figure 2.5 it is
shown with the same 8 and 13 input values as my DMA.

I don’t see any great utility in it. Do you?


Figure 2.5—TradeStation’s Adaptive Moving Average

Furthermore, if you put my PHW yellow dots on the charts to mark the ideal buys and sells, you’ll see
that TradeStation’s AMA misses most of the ideal turning points. We’ll leave PHW dots for a later
chapter.

Figure 2.6—Jurik Adaptive Moving Average in Cyan

Notice in Figure 2.6 that the Jurik moving average follows price very closely. This one results in many
more crossovers and whipsaw. The blue and read averages on Figure 2.6 are Exponential MAV and
Simple MAV respectively.
Figure 2.7—Kaufman’s Adaptive Moving Average

Compare the moving average in Figure 2.7 to my moving average in Figure 2.4. They are not the same.
In fact, to see an enlarged area comparing the two moving averages, take a look at Figure 2.8.

Figure 2.8—Kaufman’s AMA and my AMA in one picture

Notice that Kaufman’s average still has more whipsaw than mine does.

Now on to the Strategy manifestation of this moving average. After examining the Strategy of this
format, we will go on to my DMA Histogram and SunnyBands, which are still more forms of my DMA.

And, here is my SunnyDynamicMovingAverage on a MultiCharts window. They are nearly identical:


Figure2.9—DMA on MultiCharts

How I Trade With This Indicator


My DMA (Dynamic Moving Average) was the mainstay of all my trading for many, many years. I would
go long when the gold line crossed on top and go short when the purple line crossed on top. Gold means
long and purple means short. This worked very well, and still does, but there are many periods of
indecision where symbols are in trading ranges, and these periods usually lose money, even though the
DMA far surpasses other moving averages in its smoothness.

That’s why I eventually invented my SunnyBands indicator. With SunnyBands I can trade the channels
easily, though still using the DMA for overall direction.
CHAPTER 2a: Dynamic Average for RadarScreen
RadarScreen is a different animal from Charting. A chart is obvious: it’s a picture, usually with lines,
showing price and indicators. RadarScreen, however, is like a spreadsheet. It is a collection of rows and
columns showing numbers instead of lines. It is a matrix, not a picture.

Dynamic Moving Average Indicator


for RadarScreen
NAME: sjh_DynamicAvg$$_R7

INPUTS:
j_Key(0 {CHG THIS}),
j_Indic(""),
j_Price1(C),
j_Price2(C), //OHLC
j_L1(8), //fastma
j_L2(13), //slowma
j_T1(0.25),
j_T2(0.25), //factor
j_Color1(14), //color of 1st plot line
j_Color2(12), //color of 2nd plot line
j_Thick1(3),
j_Thick2(3), //thickness of plot line
j_LRLength(3) //Length of Bars to Calculate LinearRegression Line
;
Explanation of Inputs:
j_Key a password value given to you on trial or purchase of the indicator

j_Indic another password key given to you by Sunny

j_Price1 Use O, H, L, or C for Open, High, Low or Close. You can use any of these price
values to calculate the fast line of the Dynamic Moving Average.

j_Price2 Use O, H, L, or C for Open, High, Low or Close. You can use any of these price
values to calculate the slow line of the Dynamic Moving Average.

j_L1 Length for the fast moving average

j_L2 Length for the slow moving average

j_T1 Scaling factor for the fast moving average (Optimize values from 0.1 to 0.4)

j_T2 Scaling factor for the slow moving average (Optimize values from 0.1 to 0.4)

j_Color1 Color value for the fast moving average (See Appendix A)

j_Color2 Color value for the slow moving average (See Appendix A)
j_Thick1 Thickness of the fast moving average line (0-6, see Appendix A)

j_Thick2 Thickness of the slow moving average line (0-6, see Appendix A;

j_LRLength Number of bars to use in calculating LinearRegression Line (Angle)

Figure 2A.1—RadarScreen showing DynamicMovingAverage_R

While my DMA for charting draws lines, the RadarScreen version writes numbers in rows and columns
and it colors the cells to give you rapid access to all the information.

When the fastDMA is on top, the sjh_DMA1 cell is colored gold (DarkBrown); while the slowDMA is on
top, the sjh_DMA2 cell is colored purple (DarkMagenta).

Notice in the figure above that in the first row the sjh_DMA2 cell is colored purple. You can tell at a
glance that the 1-minute eMini is short while the other time frames are each long (with the gold colored
cells under sjh_DMA1).

There is more information in the RadarScreen as well. The Diff column tells the difference between the
purple line and the gold line. If the number is positive the cell is colored green; if the number is negative,
the cell is colored red. Again, at a glance information.

The Angle column tells you the angle of the LinearRegression line of the last “n” bars, where n is
specified with the j_LRLength input parameter. I use this to tell me at a glance whether the DMA is
travelling sideways (flat) or is directional. Again, green cells show a positive angle while red cells show
a negative angle. Further, if the cell is gold, that means the angle is essentially flat.

I also use this RadarScreen to tell me quickly when all timeframes are pointing in the same direction. In
Figure 2A.1 the 5-min, 15-min, 30-min and daily are all in a long configuration, while only the 1-min is
saying short. This usually portends a strong move in the direction of the DMA, in this case long.

With all this information, it’s pretty easy to tell that with DMA1 on top (gold) and Angle in a green cell,
that it’s time to take long trades.
CHAPTER 3: DynamicMovingAverage Strategies
The simplest version of the strategy is simply to use the SDMA Indicator crossovers as signals to buy or
sell. In this form it is very simple to use. All you need to do is tailor the lengths and scaling factors to
produce the results you are looking for. You do this through optimizations.

I have found that the markets change over time. The market does not behave now as it did 10 years
ago. To this end, I re-run optimizations on a regular basis to “tune up” the parameters. There is no fixed
schedule on which to do this, but I would suggest running optimizations fairly often if you are using
short timeframe bars. For instance, if you use weekly bars, you probably should optimize every few
months or so, while if you are using 1-minute bars you should optimize as often as weekly.

Hint: you can’t make more profit than the ideal for any particular symbol. It is a good idea to use my
PHW Indicator to learn what the ideal profit is before embarking on optimizing the strategy.

There are several versions of the SDMA strategy with differing inputs. I have created conditions in some
of them that allow trades only to happen if price moves beyond the signal bar plus/minus a specified
amount and others that only take trades if the angle of movement is beyond a specified value. These
versions have name changes and version variations to signify which they are.

Inserting a Strategy on a Chart


Obviously, first you must have a chart, of whatever symbol you are studying, and whatever time
compression you wish. I suggest starting with 10 years of historical data on a daily chart.

A Strategy is simply rules to buy and sell, based on underlying indicator(s). A Strategy can be based on
one or several or many indicators and other conditions.

In the case of my DynamicMovingAverage Strategy (SDMA), it is built simply on buying the upward
crossover of the fast and slow lines, and selling the downward crossover.

Many strategies can be added together to form a more complex strategy. For instance, I immediately
recommend adding my ExitStrategies to the DynamicMovingAverage (SDMA). And, if you want to trade
like I do, consider using the DMA and my SunnyBands together. I can teach you that.

So, here we go on inserting the first strategy.


Steps to Insert the Strategy

Figure 3.1—Insert  Strategy

1. Insert  Strategy (Figure 3.1)


2. Select the strategy (Figure 3.2)
3. Click OK
Figure 3.2—Choose the strategy

You must now setup the initial input parameters for the strategy. It makes good sense to set the inputs
for the strategy to the same values as you used for the indicator. That way you can see visually where
the crossover points are.

Input Values
The values I start with are:

INPUTS:
j_Key(31), // a password value given to you on trial or license
j_P1(4), // 1=open, 2=high, 3=low, 4=close for fast moving average
j_P2(4), // 1=open, 2=high, 3=low, 4=close for slow moving average
j_L1(8), // length of fast moving average
j_L2(13), // length of slow moving average
j_T1(0.25), // scaling factor for fast mav
j_T2(0.25); // scaling factor for fast mav
j_Precision(2), // Number of decimals of precision for calculations
j_Indic(“00”), // Password Key given by Sunny
j_Epsilon(0.01), // epsilon amount to add for stop entry
j_NbrBars(4) // number of bars to look back for Highest or Lowest

and are shown below in Figure 3.3:

Since you can’t plot a chart from within a strategy, there are no inputs for color or thickness.

Figure 3.3: Set Input Parameters

Other than that, the inputs have the same meaning as in the indicator back in Chapter 2.

At this point, you will want to optimize ‘til your heart’s content. Remember to use my theory of how to
optimize without over-optimizing, finding alligators and islands for the clustering effects of good
optimization. If you didn’t attend one of my talks on this subject, the read my article at
www.moneymentor.com under the Articles link. It’s currently the second article in the list. It is entitled
“The Clustering Effects of Good Optimization.” Several years ago it appeared in one of the international
trading magazines. It’s about time to publish it again.

On the subject of optimizing this particular strategy, here are some things to consider.

1. It doesn’t make any sense to try to optimize the password value. Leave it the value I gave you.
2. Only the values P1 and P2 make any sense for Open, High, Low and Close. Don’t try any decimal
values.
3. For the lengths of the moving averages (L1 and L2), it doesn’t make any sense to use a larger
value for the fast moving average than for the slow moving average. Results would be
backwards. So, always use smaller values for the fast moving average.
4. For the T-factor values (T1 and T2), always use decimal values between 0 and 1. Find the best
fit for your application, but stay in that range. I always use 0.25.
5. When optimizing, remember that the number of tests you will run is equal to the number of
tests for each variable, multiplied times each other. So, if you use 8 choices for Length1 and 8
choices for Length2 you will run 64 tests. If you use 8 choices for Length1 and 8 choices for
Length2 and 8 choices for T1 and 8 choices for T2 it will be ( 8 * 8 * 8 * 8 ) = 4,096 tests. You
can very quickly get up into the millions of tests, which is untenable. If that happens, simply
select the Genetic option, right under the Exhaustive selection under Method.

Figure 3.4: Genetic Testing option

After selecting the values to optimize, next click the Optimize button. (Figure 3.5) Then the tests will
start running. This is where I always say “let ‘er rip!”

While they are running, don’t edit any of the related functions, indicators or strategies with the
optimization running in the background. If you do, it will stop running the tests.
Figure 3.5: Click the Optimize Button

After you click the Optimize button, this is what I call “let ‘er rip!” While the tests are running, go do
something else. Leave the computer alone to do its work.
Figure 3.6: View  Strategy Optimization Report

Also, as soon as the optimization finishes, before you do anything else, go to View  Strategy
Optimization Report, (Figure 3.6), and save the report. Otherwise, it will disappear and all the time you
waited and all the work you did will be gone. It disappears very quickly, so do this step first thing.

To interpret and analyze your results refer to my article “The Clustering Effects of Good Optimization.”
The next figure shows the DMA Strategy on a chart, with its associated indicator. Notice that a Strategy
shows buys and sells, while an indicator does not. You cannot optimize an indicator; optimization only
makes sense on a strategy.

Figure 3.7: DMA Strategy on a Chart of the E-Mini S&P

The next figure shows the Strategy Performance Report that is associated with the strategy on Figure
3.7. It is very long, so I’ve only presented part of it here.

Note that I have not optimized the inputs for this example. I have simply used the same values I have
been using with this strategy since 1991. You can work with it and optimize it and come up with your
own results.
Figure 3.8: Strategy Performance Report

Latest Version of Dynamic Moving Average Strategy


The latest version of the DMA Strategy has some new components in it. The inputs address setting
filters for the DMA, so that the trade is not taken until certain conditions become true.

Here are the inputs for version 11.02, also referred to as DMABufferAngle :

INPUTS:
j_Key(2047), // your password key
j_P1(4), {OHLC = 1234} // 1=open, 2=high, 3=low, 4=close for fast
moving average
j_P2(4), {OHLC = 1234} // 1=open, 2=high, 3=low, 4=close for fast
moving average
L1(8), // length of fast moving average
L2(13), // length of slow moving average
j_T1(0.25), // scaling factor for fast mav
j_T2(0.25), // scaling factor for fast mav
j_Precision(2), // Number of decimals of precision for
calculations
j_AngLen(10), // Nbr of bars for Angle Line
j_AngleAbove(2), // Angle must be more than this to take trade
j_BufferAbove(4), //only trade if crossover is > this buffer above
j_BufferBelow(4) //only trade if crossover is > this buffer below
;

These values are essentially the same as the previously listed inputs with the exception of the last 4
input values. These new input values are to allow you to force the market to move in your direction
before you take the trade. This can be very valuable in choppy markets, where you might just want to
stay in the same position you were originally in until the market actually starts to trend.

The values j_AngLen and j_AngleAbove are specific to the Angle drawn on the last n number of bars on
the chart. The values j_BufferAbove and j_BufferBelow are specific to forcing a buffer around price that
must be exceeded before taking the trade.

j_AngLen is the number of bars on which to calculate the angle of the line. j_AngleAbove is the number
of the angle which must be exceeded before taking the trade. For instance, if you want to use the last
10 bars to draw a line, and you want it to slope more than 2 degrees before you consider the trade,
then you would specify j_AngLen = 10 and j_AngleAbove = 2.

j_BufferAbove is the size of the buffer, in percent, which must be exceeded on an upward move before
allowing the move. Correspondingly, j_BufferBelow is the percentage size of the downward move
which must be exceeded before allowing the trade.

And in the newest version


In the newest version of the DynamicAverageBufferAngle Strategy I have added one more input. This
value, called j_UseOpenOrClose allows you to choose whether the buy or sell order is executed on the
Close of This Bar, or on the Open of the Next Bar.

To select Open of Next Bar, set the input value to 0 (zero).

To select Close of This Bar, set the input value to 1.

This was a user request and consequent modification.

And in another newer version


In the latest version (12.05Buffer) I have simplified the inputs and decision making so that it only takes
a trade if price goes beyond a multiplier (which you input) times a tick beyond the signal value. So, if
the signal to buy ES is given at 1305.00, and you specify the multiplier to be 1, the strategy will wait until
price exceeds 1305.00 by one tick before it places the order.
In this version you would want to optimize the above standard inputs as well as the multiplier value
(which should be an integer).

Yet newer still (version 13.02.27)


In this version of the Dynamic Average Histogram I have added an input (j_Data2(0)) that has two
possibilities for its value. If you use 0 (zero) that means there is no second data symbol on the chart; if
it is 1 (one) that signifies that there is a second symbol or second timeframe on the chart. For instance,
I use a 1-minute chart overlaid with a 5-minute chart.

I like to see things at a glance, so I wanted to quickly visualize how the Histogram of the 1-minute chart
compares to the Histogram of the 5-minute chart. Are they in agreement, or are they in divergence?
So, now if the input value is 1, that tells me that both symbols are on the chart and to plot two
histograms.

You can have them on two subgraphs or overlaid on one subgraph just by clicking and dragging the
indicator.

Plotted below in Figure 3.9 is a chart of the two ES symbols with the Histograms in two subgraphs.

Figure 3.9: Double Histogram in Two Subgraphs

Notice that for the top subgraph I have used magenta and darkcyan for the indicator’s colors, while on
the bottom subgraph I am using red and darkgreen. That way, when I overlay them (in the next figure)
I can quickly tell them apart. So, now let’s look at a chart where they are overlaid. See Figure 3.10 below.
Figure 3.10 Double Histogram in One Subgraph

This is a handy new embellishment for me. It shows me when both the 1-minute and 5-minute (or any
timeframes of your choosing) are in agreement.

Keep in mind that selecting 0 (zero) for this input tells me that there is no second datastream and turns
off the feature.
CHAPTER 4: Dynamic Moving Average Histogram
Once upon a time, a student of mine asked me to make my DynamicMovingAverage easier to read. He
said that he couldn’t see the crossovers. So, I programmed the histogram version of the indicator so
that he could readily see where the DMA crossed over zero line. To make it even more obvious, I turned
the portion of the line that was greater than zero to green, and the portion below zero to red. That way,
he could easily read the crossovers.

That’s how the DMAHistogram indicator was born.

It turns out that the Histogram is actually more useful that just reading crossovers. If you will look closely
at the indicator in Figure 4.1 and ask yourself my favorite question (“What is true?”), you will find that
there are other things to read in this indicator.

Figure 4.1: DMAHistogram Indicator

In this figure (4.1) I have left the DynamicMovingAverage on the chart so you can compare it to the
Histogram version. It is much simpler to read red and green.

Additionally, I provided inputs with which you can add any of the available averages to the
DMAHistogram. There are times you might wish to adjust your trading to not only the crossovers of the
DMA, but to the DMAHistogram’s crossover of its own moving average. So, by adjusting the values of
the j_WhichAverage input from 1 to 6, you can choose different moving averages as follows:
j_Which =
1 Harmonic Mean
2 Simple Moving Average
3 Exponential Moving Average
4 Weighted Moving Average
5 Sunny's Dynamic Moving Average
6 sjh_Solar09 Proprietary Average
7 MACD

The j_Avg value has two purposes. If you set it to 0, then the average is not plotted. If you set it to any
other positive number, that number is used as the length of the moving average.

Figure 4.2: Moving Average of the DMAHistogram turned on


Figure 4.3 DMAHistogram on MultiCharts

If this isn’t enough, you can add a horizontal line at the zero value, so you can’t possibly miss the
crossover. It looks like Figure 4.3 with the zero horizontal line.

Figure 4.4: DMA Histogram with Zero Line


Now, you might notice some more true things about the DMAHistogram. To make it a lot easier, I have
put a vertical dotted line marker at every significant high and low turning point. Notice how well the
turning points of the market match most of the turns in the histogram.

Figure 4.5: DMA Histogram with turning points marked by Vertical Lines
Example Uses:

1. You can use this indicator to show divergence.


2. You can use this indicator to show crossovers of the zero line, when the red line turns to green
and vice versa.
3. You can use this indicator to show early crossovers, as when the yellow line is on top of the
colored line showing a bearish situation and when the yellow line is on the bottom of the
colored line showing a bullish situation.
4. You can tell weak moves from strong moves using the value of the moving average, with high
values showing strong moves.

Yet newer still (version 13.02.27)


In this version of the Dynamic Average Histogram I have added an input (j_Data2(0)) that has two
possibilities for its value. If you use 0 (zero) that means there is no second data symbol on the chart; if
it is 1 (one) that signifies that there is a second symbol or second timeframe on the chart. For instance,
I use a 1-minute chart overlaid with a 5-minute chart.

I like to see things at a glance, so I wanted to quickly visualize how the Histogram of the 1-minute chart
compares to the Histogram of the 5-minute chart. Are they in agreement, or are they in divergence?
So, now if the input value is 1, that tells me that both symbols are on the chart and to plot two
histograms.

You can have them on two subgraphs or overlaid on one subgraph just by clicking and dragging the
indicator.

Plotted below in Figure 4.6 is a chart of the two ES symbols with the Histograms in two subgraphs.
Figure 4.6: Double Histogram in Two Subgraphs

Notice that for the top subgraph I have used magenta and darkcyan for the indicator’s colors, while on
the bottom subgraph I am using red and darkgreen. That way, when I overlay them (in the next figure)
I can quickly tell them apart. So, now let’s look at a chart where they are overlaid. See Figure 4.7 below.

Figure 4.7 Double Histogram in One Subgraph


This is a handy new embellishment for me. It shows me when both the 1-minute and 5-minute (or any
timeframes of your choosing) are in agreement.

Keep in mind that selecting 0 (zero) for this input tells me that there is no second datastream and turns
off the feature.
CHAPTER 4A: Dynamic Moving Average for
RadarScreen
Another client asked me to make the output of the histogram available in RadarScreen, which would
permit sorting and ordering stocks to find the best trading opportunities. What a great idea! So, here’s
what the indicator looks like on RadarScreen.

Figure 4A.1—RadarScreen DMA_H indicator

This one bears some explanation. You are already accustomed to looking at the Gold and Purple lines
of the DMA, which are displayed numerically in the first two columns of the “sjh_R_DMA_21.04.03”
indicator above. The next two columns of this indicator

xxxxxxxxxxxxxxxxxxxxxxxxxxx
CHAPTER 5A: DynamicMovingAverage Function
This function is able to be used to create your own indicators and strategies based on the math in my
DynamicMovingAverage.

These are the inputs:

• j_Key( 2047 ), // your password


• j_Vendor( "TS" ), // TS means TradeStation; MC means MultiCharts
• j_Price1( C ), // C is for close, but you can use ANY input
• j_Price2( C ), // C is for close, but you can use ANY input
• j_L1( 8 ), // Length of first DMA average (seed value)
• j_L2( 13 ), // Length of second DMA average (seed value)
• j_T1( 0.25 ), // Smoothing factor for first line (I just leave it at 0.25)
• j_T2( .25 ), // Smoothing factor for second line (I just leave it at 0.25)
• j_SmoothLength( 9 ), // Over how many bars to smooth the indicator
• j_Indic( " " ), // Reserved for later use
• j_Precision( 4 ) // How many decimals of precision to round to

;
CHAPTER 5: SunnyBands Indicator
The SunnyBands Indicator is another off shoot of my DynamicMovingAverage (DMA) indicator. This
one was designed to allow me to investigate the Excursions from the DMA, both favorable and adverse.
The “bands” are Average True Ranges away from the DMA.

I found by research, testing, and lots of looking at charts, that the best settings for the SunnyBands
bands, is 1.2 ATRs and 2.0 ATRs. You can change the values to anything you find works for you, through
the inputs.

These bands are NOT like Bollinger Bands. In Bollinger Bands, John uses Standard Deviations away
from a moving average. Standard Deviations tell the market where is “should” go; ATRs (which I use)
ask the market where it has been and is going. And the moving average is the one with the most
whipsaw. My DMA is smooth and dances seamlessly with the market.

With my indicator, two things are unique. Primarily, the DMA is unlike anyone else’s moving average.
My DMA calculates its own lengths dynamically within the program. Then, on top of that, the market
moves about as much as it usually moves, which led me to use Average True Range to measure how
much it usually moves.

NOTES
:
1. As of 10/22/2021 I have added features to allow for Commentary and WalkForward features
in SunnyBands. These features allow you to see the information for any bar you click on with
Commentary turned on.
2. As of 7/6/2011 I added code to print some very important values (to my personal trading) on
the right-hand edge of the chart. These new features are shown below in the section called
Addendum.
3. As of 7/15/2011 I added the ability to choose colors for the Bands themselves. I found that I
like to overlay 1-minute bands and 5-minute bands and needed to be able to differentiate
them. So, I’ve added 2 inputs: j_TopColor and j_BotColor. See Figure 5.1.
Figure 5.1—SunnyBands without Commentary turned on

Figure 5.2—SunnyBands with Commentary turned on

Notice in the Commentary window to the right of the chart that the text changes color depending on
circumstances. For instance, the word Close is darkgreen if the current price is up from the previous
price and red if it is down.

The UIB (Upper Inner Band) is the teal color of the chart band, and likewise for the outer bands which
are darkgreen.

The MidAngle turns color like Close: it’s red if the angle is down and darkgreen if the angle is up.

The DMAGold line is gold and the DMAPurple is purple.

I love to make things visually pleasing and informative, and this is my latest effort.

In the Figures above, I have set the number of Average True Ranges for the inner bands equal to 1.2.
and the ATRs for the InnerBands to 2.0. That means, roughly, that a point is plotted one point two (1.2)
times the range of the average last n number of bars away from the DMA and 2.0 times the range for
the Outer Bands.

Basically, if the range of the last n (let’s say 9) bars was 5 points, then the band would be plotted 6 points
above and 6 points (1.2 * 5 = 6) below the value of the DynamicMovingAverage for the inner bands.

More specifically, with varying inputs you can plot a different amount of ATRs above the fast-moving
average than the amount of ATRs below the slow-moving average. This makes sense because the
market usually moves downward faster and farther than it moves upward. That’s why I have allowed
for different values for the upper and lower bands.

Putting the SunnyBands on a Chart


As before, to place this indicator on your chart, simply go to Insert  Indicator and locate the indicator
named sjh_I_SunnyBands. Click OK. Then go to Format  Analysis Techniques and set the inputs
values as shown in Figure 5.3. From time to time, I make alterations to my indicators, enhancing them
and improving them. If these numbers don’t exactly match your indicator, then it maybe you have a
newer and improved version.
Figure 5.3—Inputs to SunnyBands

Figure 5.1 shows SunnyBands on a TradeStation window. Also, Figure 5.4a shows SunnyBands, but with
a black background.
Figure 5.4—SunnyBands on a Black Background

The next figure (Figure 5.5) shows two SunnyBands charts overlaid on one chart. This chart shows 1-
minute bars and 5-minute bars (hidden) so you can see the interplay of the two. Notice that the 5-
minute Bands are colored DarkCyan, and that the 5-minute DMA is Magenta and DarkGreen. Notice
how the inner SunnyBands follow the outer SunnyBands in much the same way that price follows the
single SunnyBands. Again, we watch for values hitting the upper bands and then moving to the opposite
bands.

Figure 5.4—Overlaid SunnyBands (1-min and 5-min)


Figure 5.4a—SunnyBands in MultiCharts
Figure 5.5 Format SunnyBands

This indicator essentially has the same inputs as the DynamicMovingAverage, although it does have a
few extras. Next, I’ll show you the inputs.
Input Values for the SunnyBands
(version 7)
INPUTS:
j_Key(1348), //Password Key
Price1(C), //Price for Fast DMA (O, H, L, C)
Price2(C), //Price for Slow DMA (O, H, L, C)
j_L1(8), //Length of Fast DMA
j_L2(13), //Length of Slow DMA
j_T1(0.25), //Smoothing Factor for Slow DMA line
j_T2(0.25), //Smoothing Factor for Slow DMA line
j_Color1(14), //Color of Fast DMA
j_Color2(12), //Color of Slow DMA
j_ATR(14), //Length of Average True Range
j_m1(1.5), //Number of ATRs above
j_m2(1.5), //Number of ATRs below
j_TopThick(3), //Thickness of Upper Band Line
j_TopColor(DarkGray), //Color of Upper Band
j_BotThick(3), //Thickness of Lower Band Line
j_BotColor(DarkGray), //Color of Lower Band
j_DMAFastThick(2), //Thickness of Fast DMA Line
j_DMASlowThick(2), //Thickness of Slow DMA Line
j_Indic("") //Password for SunnyBands Future use

Indicators can’t be optimized, but for finding the best fits with this indicator you should experiment
with different values for j_L1 and j_L2 as well as j_T1 and j_T2. The other important values for
experimenting are j_ATR (try values from 5 to 15), and j_m1 and j_m2. Just look for the best visual fit.

Input Values for the SunnyBands (version 11)


INPUTS:
j_Key(2047), //user’s password key
j_Vendor("TS"), //”TS”=TradeStation; “MC”=MultiCharts
Price1(C), //Open, High, Low or Close
Price2(C), //Open, High, Low or Close
j_L1(8), //Length of Fast DMA
j_L2(13), //Length of Slow DMA
j_T1(0.25), //Smoothing Factor for Fast DMA line
j_T2(0.25), //Smoothing Factor for Slow DMA line
j_Color1(14), //Color of Fast DMA
j_Color2(12), //Color of Slow DMA
j_ATR(14), //Length of Average True Range
j_UpperBand1(1.2), //Number of ATRs above for first band
j_LowerBand1(1.2), //Number of ATRs below for first band
j_UpperBand2(2), //Number of ATRs above for second band
jj_m1Thick(2), //Thickness of 2nd Band upper
j_LowerBand2(2), //Number of ATRs below for second band
jj_m2Thick(2), //Thickness of 2nd Band lower
j_TopThick(3), //Thickness of Upper Band Line
j_TopColor(black), //Color of Upper Band
j_BotThick(3), //Thickness of Lower Band Line
j_BotColor(black), //Color of Bottom Bnad
j_DMAFastThick(2), //Thickness of Fast DMA Lines
j_DMASlowThick(2), //Thickness of Slow DMA Lines
j_Indic(""), //Password of Future Use
j_Precision(2), //How many decimal places to use in calculations,
j_LRLength(5), //How many bars to average linear regression angle?
j_SwitchForexCommission(false),
//reserved for future use
o_jKey(0), //Output variable
j_SwitchOff(1 {1=TextOn}),
//Switch Text On or Off
j_DisplaceText(1) //Integer Value to Increase or Decrease Time
Forward/Back to place texts
;

Inputs for Version


15.01.08 of SunnyBands
INPUTS:
j_Key(2047), //user’s password key
j_Vendor("TS"), //”TS”=TradeStation; “MC”=MultiCharts
Price1(C), //Open, High, Low or Close
Price2(C), //Open, High, Low or Close
j_L1(8), //Length of Fast DMA
j_L2(13), //Length of Slow DMA
j_T1(0.25), //Smoothing Factor for Fast DMA line
j_T2(0.25), //Smoothing Factor for Slow DMA line
j_Color1(14), //Color of Fast DMA
j_Color2(12), //Color of Slow DMA
j_ATR(14), //Length of Average True Range
j_UpperInnerBand(1.2), //Number of ATRs above for first band
j_LowerInnerBand(1.2), //Number of ATRs below for first band
j_UpperOuterBand(2), //Number of ATRs above for second band
jj_m1Thick(2), //Thickness of 2nd Band upper
jj_m1Color(green), //Color of Upper Outer Band
j_LowerOuterBand(2), //Number of ATRs below for second band
jj_m2Thick(2), //Thickness of 2nd Band lower
jj_m2Color(green), //Color of Lower Outer Band
j_TopThick(3), //Thickness of Upper Band Line
j_TopColor(cyan), //Color of Upper Band
j_BotThick(3), //Thickness of Lower Band Line
j_BotColor(cyan), //Color of Bottom Band
j_DMAFastThick(2), //Thickness of Fast DMA Lines
j_DMASlowThick(2), //Thickness of Slow DMA Lines
j_Indic("0000"), //Password of Future Use
j_Precision(2), //How many decimal places to use in
calculations,
j_LRLength(5), //How many bars to average linear regression angle
j_SwitchForexCommission(false),
//reserved for future use
o_jKey(0), //Output variable
j_SwitchOff(1 {1=TextOn}),
//Switch Text On or Off
j_DisplaceText(1) //Integer Value to Increase or Decrease Time
Forward/Back to place texts
j_TurnOnCurrentPrice(0), //Shows the value of the current price and its
level if 1, otherwise do not show
j_BarsDisplace(1), //How many bars to the right to displace text if
number is positive, to the left if negative
j_Printing(0), //Print diagnostics in the EasyLanguage Output
Bar if 1, otherwise no printing
j_TextColor(black) //Color to make the “Diff” text (should be
opposite of the background color; you can’t
see black text on a black background)
;
Inputs for Version 22.11.09 of SunnyBands
Inputs:
Int j_Key (2047),
String j_Vendor ("TS"),
Double Price1 (Close),
Double Price2 (Close),
Int Use_MidLine (01), // New MidLine filter
Double j_L1 (08),
Double j_L2 (13),
Double j_T1 (0.25),
Double j_T2 (0.25),
Int j_Color1 (DarkBrown), //Color of Gold DMA Line
Int j_Color2 (DarkMagenta), //Color of Purple DMA
Line
Int j_ATR_Len (09),
Double j_UpperInnerBandMult (1.2),
Int jj_uibThick (01),
Int jj_uibColor (DarkCyan),
Double j_LowerInnerBandMult (1.2),
Int jj_libThick (01),
Int jj_libColor (DarkCyan),
Double j_UpperOuterBandMult (2.0),
Int jj_uobThick (02),
Int jj_uobColor (DarkGreen),
Double j_LowerOuterbandMult (2.0),
Int jj_lobThick (02),
Int jj_lobColor (DarkGreen),
Int j_DMAFastThick (02), //Thickness of Fast DMA
Lines
Int j_DMASlowThick (02), //Thickness of Slow DMA
Lines
Int j_Precision (04), //How many decimal
places to use in calculations,
Int j_SmoothLength (03), //Length for Smoothing
Function
Int j_LRLength (03), //How many bars to
average linear regression angle?
Bool j_SwitchForexCommission (FALSE),
//Switch on the Forex Commission Band?
Int j_SwitchOff (00 {01=TextOn 02=File 03=DMA}),
//Switch Text On or Off
// 1=On, 0=Off, 2=Print to File (text at end of chart), 3=Leave
Purple/Gold only
Int j_TurnOnCurrentPrice (00), //1=On, 0=Off
Int j_BarsDisplace (02),
//Number of Bars to Displace CurrentPrice Text
Int j_Printing (00), //1=on, 0=off, 2=file
(Printing values in Print Log)
Int j_TextColor (Black), //write misc text in
this color

Bool InputDefsInCmtry (FALSE),


String Error_Sound ("C:\OME_Files\mySounds\ahooga.wav"),
// Need a fully qualifed path, filename and extension.
String Error_Note
("If you hear this sound then CHECK THE PRINT LOG")
;

Inputs:
Bool doReport (FALSE),
String File_Path ("C:\OME_Files\"),
String File_Name ("SS_Stats"),
String File_Ext (".csv")
;

Analyzing the SunnyBands


Notice, back in Figure 5.1, that price rarely moves outside of the SunnyBands, either top or bottom. We
can also pretty much say that price will follow the band line, in the extreme, until it “changes its mind”
and decides to go in the other direction. A reversal generally comes when price moves away from the
band and crosses back over the SunnyBand. In the case of a short signal, the green/blue bars become
red and fall back within the upper band (UOB). In the case of a long signal, the red bars become green
and sneak back up within the lower bands (LOB).

I have many students who swear by this indicator. Here are a few examples:

"Nice Bands! This morning I did a couple of quick MES buys and sells. Then I bought into an upward
moving ES [signaled by the DMA_H]. Followed it to the top [SunnyBand]. Closed. Sold short at the top
[SunnyBand.] Followed it to the bottom [SunnyBand]. A $4,000 account (what I had moved to the
Futures account) returned about $2,000. Doesn’t get any better than that!". - Don M.

"I made $5,772 on the first day of my free trial of SunnyBands. It told me exactly where the turns were,
even with the high volatility today. You are one of the very few people that allows test drives. It's
nothing short of amazing!" -Aaron R.

Example Uses:

1. You can use this indicator to show the typical movement of the market. Generally, the
market will stay within 1.5 ATRs of the DMA. When the market is making an out-of-the-
ordinary move it moves beyond the grey lines.
2. You can use this indicator to show crossovers of price with the bands, to find extreme
movements. When price is above the DMA it can be bullish; when price is below the DMA
is can be bearish.
3. You can use this indicator to show when price crosses below the lower band and then
returns back through the lower band, it can be bullish. Likewise, when price crosses above
the upper band and then returns back through the upper band, it can be bearish. I use the
bands in this instance as profit taking stops.
4. As long as price remains in the lower half of the band it can be considered bearish. When
price then crosses over the midline it could be used as a stop. Likewise, as long as price
remains in the upper half of the band it can be considered bullish. When price comes back
down and crosses over the midline it could be used as a stop.
Addendum
The newest feature (as of 7/6/2011) in SunnyBands is a feature to print the values of the bands on the
far right-hand edge of the chart. In order to see these values, you must leave blank space at the end of
the chart. I put 15 extra bars of space on my chart. You do this by going through the Format  Window
 Space to the Right command sequence.

Figure 5.7—New SunnyBands (version 11)

The chart in Figure 5.75 below is the main configuration I use for my own trading. On this chart you can
see (1) the PaintBar Indicator (DaySessions) that highlights the day session a different color from the
night session, (2) the Pennants showing breakout areas and congestion, (3) the SunnyBands which are
green and cyan, on either side of the SunnyDynamicMovingAverage (SDMA), which is purple and gold.
I also use my indicator DayDividers, which draws the dashed vertical lines that appear at each end of
the chart and my PHW indicator1 which draws yellow circles on the ideal turning points. You can change
the times of their trigger through input values, but I have them set to the open and close of the day
session. It makes it easier for me to read my charts.

1 PHW dots are on the ideal turning points, which can only be determined AFTER THE FACT. One cannot determine whether a turn has happened

until after it actually occurs. Thus, these dots, while a great help to keep you honest about where you should be trading, do not give trading signals
before the turn actually happens.
Figure 5.75—My Default Trading Screen

The newest addition to the SunnyBands is the text written to the right of the data. In order to view this
text you must first allow for Space to the Right. Having done that, you will see either “Gold on Top” or
“Purple on Top” in green or red respectively, to the right of the last closing price. This tells you at a
glance what position the DMA is in. It is especially helpful when the lines are close together. The next
new feature is in three parts: “Top = “, “Diff = “ and “Bot = “. These texts are followed by numbers telling
you the value of the top band, the spread between the two bands, and the value of the bottom band,
all as of the last bar on the chart.

Since price tends to revert to the mean, the “Diff” value is very important to me. It tells me how many
points are possible in a move that goes from the top band back down to the bottom band, or from the
bottom band up to the top band. And, if price is moving strongly, and thus not likely to move beyond
the midline, then half of the Diff is a potential move. Keep this in mind when choosing the timeframe
of your trading chart.

If you think of any features you’d like to see, just email me your suggestions.

NOTE: One thing I have noticed about TradeStation’s calculations, in the course of watching charts form
tick-by-tick: a smoothing such as my DMA is not smooth unless refreshed often.

For instance, the next figure shows the SunnyBands & DMA after the accumulation of many ticks
without refreshing.
Figure 5.8—Without Refreshing

Figure 5.8—After Refreshing

It’s slight, but you can see that in Figure 5.5 the Bands “wiggle” at the right hand edge, but after
refreshing (Figure 5.6) the Bands are again smooth. It is more evident on the lower Band.

How I Trade
with This Indicator
For ideas on how to trade with SunnyBands, please see the next chapter.
Notes from User Sessions
This indicator is the Dynamic Moving Average with bands above and bands below the moving averages,
placed at n Average True Ranges above and below the averages. For the inner band, n = 1.2; for the
outer band, n = 2.0.

These bands are far superior to Bollinger Bands or Keltner Channels, which are calculated on Standard
Deviations and ATRs largely because they are based on my proprietary DMA.

I don't look for these bands to "squeeze." Rather, I look for price to ride the band for a while and then
move away from it.

The top band is calculated from the gold average, while the bottom band is calculated from the purple
average. Next, here's the crowning glory: In my own trading I use a 1-minute chart and a 5-minute chart
overlaid on a single chart. I make it so the 5-minute chart is in a hidden subgraph. Then I put SunnyBands
on Data1 and SunnyBands on Data2, so that I can see the 1-minute SunnyBands forming within the 5-
minute SunnyBands. It's like seeing the interaction of larger and smaller waves. It's a little challenging
to see, but if you look closely you'll see Gray SunnyBands inside of DarkCyan SunnyBands.

The 1-minute DMA is gold and purple, while the 5-minute DMA is green and red. Notice what happens
when the 1-min SunnyBand touches the 5-min SunnyBand! Now, don't get these confused with
Bollinger Bands. Mine use ATR (Average True Range) which tells where the market is actually going, not
Standard Deviation which tells where the market "should" go.

AND mine uses my proprietary DMA (Dynamic Moving Average) which avoids much of the whipsaw--
unlike an Exponential Moving Average, which whips all over the place.

Figure 5.9—SunnyBands
Figure 5.10—Bollinger Bands

Figure 5.11—Keltner Channel

Figure 5.12—Keltner Channel vs SunnyBands (Keltner = dotted lines)

Notice in figures 5.9 thru 5.12 how SunnyBands hugs price and the other indicators do not. SunnyBands
gives a clear picture of when to go short and when to go long. The others don’t.
CHAPTER 5A: SunnyBands Strategy Ideas
TRADING IN THE FINANCIAL MARKETS INVOLVES A RISK OF LOSS. THIS DOCUMENTATION AND OTHER CONTENT PRODUCED
BY MONEYMENTOR ARE FOR INFORMATIONAL OR EDUCATIONAL PURPOSES ONLY AND DO NOT CONSTITUTE TRADING OR
INVESTMENT RECOMMENDATIONS OR ADVICE.

The SunnyBands Indicator, as depicted above, can be used as a strategy. However, I have not as yet
been able to code the strategy rules into an automated strategy, but I’m working on it. To use it like I
use it, you have to put on your thinking cap and follow a set of rules. And, you must watch the market
as it ticks and forms bars. There is much to be said for the “intuition” that comes from learning how the
market moves by watching it, especially with the SunnyBands on the chart, over many, many weeks,
months or years. You’ll “see” things after you have spent considerable time with the indicator. My
students are always coming up with new and different observations on how to use SunnyBands.

If you want to play basketball and consistently shoot the ball into the hoop, you must practice. It isn’t
automated, it is learned from a long time of practicing. If you want to be a downhill skier, you have to
practice. You can’t even stand up the first time you get on the skis. It takes time. So, it is with
SunnyBands. I have traded with SunnyBands for 35 years of my 42-year career. It and my
DMA_Histogram are the only things I use to determine when to place trades.

NOTES:
As of 6/20/2012 I have added code to print some very important values (for my personal trading
methods). The inner SunnyBand (1.2 ATRs by default) (default color = dark teal) is called the Inner
SunnyBand. There is now code to delineate this band and give its value, both top and bottom. The outer
SunnyBand is called the Outer SunnyBand (2.0 ATRs by default) and is colored dark green by default.
Its values are also printed on the chart. I use these values as stops and limit entries in my own trading.

How I Trade SunnyBands


Remember that all I say is for your education only. I am not suggesting that you trade like I do. I am not
suggesting that my trading method will ever make a profit, or not make a loss. Trading is not for
everyone. You can and will lose money. If you do trade, only do so with money you can afford to lose.
That said, here is what I do.

To begin with, I trade a chart with 1-minute bars, overlayed with 5-minute bars. I showed you how to
do that in the previous chapter, “Chapter 5, SunnyBands Indicator.” I watch the wave within the wave
of the two SunnyBands indicators. This wave within a wave is a fractal. You might Google “fractal.”

NOTE: TradeStation has a “bug” which does not allow for these overlaid indicators to be scaled properly
when using Chart Dragging. In that case, I use two separate charts, one 1-minute and the other 5-
minutes.

NOTE: If you want to use the overlay of 2 charts, they must both be on the same scale.
First, I put the PaintBar “sjh_PB_DaySession” on my chart. That way I can easily see which session I’m
in. By default, Session 1 (or the day session) bars are colored blue for up bars and red for down bars. In
the after-hours (or night) session, the bars are colored green for up bars and magenta for down bars.
In telling you how I trade in the text that follows, I will refer to up bars as blue/green and down bars as
red/magenta.

Next, I put the “BingTicks” indicator on my chart. BingTicks (see Chapter 18) plays a small sound file
(.wav) with every change in the market. It can be very noisy, but it tells me what the market is doing
and how fast. In the input parameters I specify a high-pitched sound for the UP sound, a low-pitched
sound for the DOWN sound, and for the SIDEWAYS sound I usually choose “Click.wav.” So, I have
binging and bonging going on all day long.

When the sounds come very close together, and are mostly all binging, I know the market is moving
very fast upward. Similarly, when the sounds are predominantly bongs and are coming fast, I know the
market is moving quickly downward. If the sounds are infrequent, I know that there are very few trades
taking place and that the market is therefore thinly traded. I can walk away from my monitor and still
listen to what the market is doing. What it doesn’t tell you is anything about the distance of the moves.
It doesn’t tell you anything about price.

Thirdly, I put my ShowMe indicator “sjh_SM_CurrentPrice” on the chart. This little indicator puts a dot
or a cross at the end of the chart at the current price. It focuses my attention on exactly where the
current price is. If you use the most recent version the dot turns red when price is moving down and
green when price is moving upward. I like to sit and watch the moving dot; it trains my neurology as to
price activity. This is where intuition is born. The dot is shown on the chart in Figure 5A.3; it’s darkred,
indicating that price was moving down.

The fourth thing I do is put SunnyBands on my chart. Actually, I already have 1-minute and 5-minute
bars both on the chart and I want to put on two sets of SunnyBands. I make the first set different colors
from the second set. (For instance, I use teal for the 1-minute band and cyan for the 5-minute band).
Then I click and drag the second SunnyBands (on the 5-minute chart) up to the 1-minute chart and drop
them there.

Next, I hide the 5-minute bars. To do this you go to Format  Symbol and choose Data2 (the 5-minute
bars), click on Format and then click on the Scaling tab. (See Figure 5A.1).
Figure 5A.1—Format Data Stream 2

Under that tab you click on the roller beside Sub-graph (where it probably says “1”) and pull down to
“Hidden.” See Figure 5A.2.

Now you should have a chart with 1-minute bars showing, and two sets of SunnyBands (of differing
colors). Mine looks like this: (Figure 5A.3). See below.

NOTE: Creating this chart and following this process is available in a video on YouTube at
www.YouTube.com/. Or you can search for Sunny Harris and/or TradeStation.
Figure 5a.2—Hiding the longer term bars
Figure 5a.3—Double SunnyBands on Gold Futures (1-minute & 5-minute)

Once you have your chart ready, we are ready to talk about my trading rules.

Sunny’s SunnyBands Trading Rules


Here’s what I do. Don’t trade anything with money you can’t afford to lose. All traders lose money; they
don’t always tell you about it.

1. Take Setup from 5-min (LT) Charts


2. Take Entries from 1-min Charts (Best done with overlaid charts or two separate charts).
3. Enter Long when LT chart is red/magenta & below lower Primary SunnyBand, and Short-Term
chart is also red and below lower Primary SunnyBand
4. Take Profit when Attractor is reached, or Upper Outer SunnyBand on Long-Term chart is
penetrated upward and then back downward on red bar
5. When the DMA is “long” (gold on top and purple on the bottom) the bias is to the upside.
Therefore, don’t expect a short trade to drop further than the midline.
6. If the DMA is flat, stay w the first entry of the flat period until the DMA finds a direction.
7. If I got a short signal (blue/green going up turns to red below Band) and blue/green continues
on up, reverse and go long. This will likely be strong.
8. The opposite is true for Shorts
9. Wait for it! Don’t jump ahead of trades before they form.
10. Wait for Proof (i.e., move in the expected direction)
11. There is always another trade
12. Take Your Losses FAST and let your profits ride

PRIMARY RULES

1. If flat or short, watching red bars go down to lower band. When bars turn green and pierce
lower band and go back upward, I go Long.
2. If Long or Flat, watch green bars go upward until they pierce the Upper Band, turn red and go
back downward., then I go Short.

INTERMEDIATE RULES

1. Channel Trading. If DMA is flat (AbsValue(Angle < 6.0 ), then we will be countertrend trading,
moving from band to midline and back.
2. IF same as rule 1 above, only take profits at midline.

ADVANCED RULES

1. If trading Channel, and you exited at the midline and price exceeds H of exit bar, re-enter Long.
2. If trading Channel, and you exited at the midline and price exceeds L of exit bar, re-enter Short.

These are the rules from inside the SunnyBands code:


These are the rules I gave to my programmer, at the onset of our project to automate SunnyBands into
a stand-alone system:

{=======================================================================}
{===== RULES & THOUGHTS ON USING SUNNYBANDS ============================}
{=======================================================================}
{
All these rules are "typical" and not hard and fast rules.

INITIAL:
Only one position on at a time. ie Don't buy shares and then buy again
and then sell both positions.

FIRST RULES:

Purple DMA on top means price movement is Bearish. Price is falling and
below the Top SunnyBand.

Gold DMA on top means price movement is Bullish. Price is rising and
above the Bottom SunnyBand (SBand).

SECONDLY:

LONGS:
Watch the mostly Red Candles going down. When they get below the Lower
SBand, watch for them to change to Green and rise above the Lower inner
or outer SBand. When the Green Candle penetrates the Lower Band take a
Long Position.

SHORTS:
Watch the mostly Green Candles going up. When they get up to the Upper
SBand, watch for them to change to Red and fall back below the Upper
SBand. When the Red Candle penetrates the Upper Band, take a Short
Position.

THIRDLY:
a. If you are Short and candles begin rising against your position, wait
for a Green candle to rise above the Upper SBand.
If it penetrates above, abandon your short position and go Long.
b. If you are Long and candles begin falling against your position, wait
for a Red candle to fall below the Lower SBand. If it penetrates below,
abandon your long position and go Short.

FOURTH:
a. If Short and Red Candle touched DMA and next bar is Green Candle,
reverse and go Long
b. As long as candles are below Top Band AND Below DMA, stay Short
c. Stay Short while candles are moving down and touching or below
Bottom Band
d. If Green Candle forms Above Bottom Band go Long

FIFTH:
a. Watch the slope of the DMA Lines.
1. If the lines are "flat" (LinearRegAngle of last 5 bars), then we only
"Expect" price to come up/go down to the DMA, and not all the way back to
the SBand.

===============================}

IMPORTANT NOTES
When you trade, either with real money or in simulation mode, it is a good policy to always use stops.
Stops prevent you from holding bad trades for extended periods (while you are wishing). Stops help
you to get out of losing trades quickly. The market can always “blow through” your stop if the market
is moving quickly (like in the period 8/19/15 through 8/26/15). Nevertheless, it is important to have
them, especially if you are a beginner.

REMEMBER, when using stops, to take them out of the market when you are hit, and when you open
a new trade. If you leave the stop in place and forget about it, you can have the stop hit when you are
not expecting it, at some later time. Let’s say you enter the market at 2100 and put a stop underneath
at 2090. Then, you exit the trade at 2200 for a profit and forget about the stop. Later on, you aren’t
trading at all and the market dips down to 2090 and automatically gets you short. You didn’t mean to
get short, you just forgot about the stop. So, don’t forget them!

Now let’s talk about stops.

Setting Stops with SunnyBands


I use the SunnyBands themselves to set my stops.

Let’s look at a chart to illustrate this concept. Take a peek at Figure 5a.4 below.
If I were to enter the market going long at the green bar which penetrates the Outer Bottom Band at
about 8 bars to the left of the right-hand edge, I would set the stop at the lower SunnyBand, right after
the trade was established. Once the market had passed the DMA, I would raise the stop to the “Midline”
value at the DMA (Dynamic Moving Average). If then the trade continued up above the upper band, I
would move the stop up to the upper band.

Figure 5a.4—Setting Stops


CHAPTER 5B: SUNNYBANDS FUNCTION
One of my more astute students/clients has asked for a way to access the values inside the SunnyBands
indicator so he can write his own systems around the SunnyBands. In response I’ve written this function
using NumericRef variables so the function returns not only the function value itself, but eight other
values as well. NumericRef variables all start with the letter “o” and return values from inside the
function.

Input Values for the SunnyBands Function


INPUTS:
j_Key( Numeric ), //== User’s Password
j_Vendor( String ), //== Vendor: “TS” or “MC”
Price1( Numeric ), //== O, H, L, C
j_L1( Numeric ), //== Length for DMA Gold Line (I use 8)
j_L2( Numeric ), //== Length for DMA Purple Line (13)
j_T1( Numeric ), //== Smoothing Factor (I use 0.25)
j_T2( Numeric ), //== Smoothing Factor
j_ATR( Numeric ), //== Length of Average True Range
j_Precision( Numeric ), //== How many Decimals of Precision
oUpperInnerBand( Numericref ), //== Output of UpperInnerBand Value
oLowerInnerBand( Numericref ), //== Output of LowerInnerBand Value
oUpperOuterBand( Numericref ), //== Output of UpperOuterBand Value
oLowerOuterBand( Numericref ), //== Output of LowerOuterBand Value
oMidline( Numericref ), //== Output of DMA Midline Value
oAngle( Numericref ), //== Output of Angle of DMA
oDMAGold( Numeric ), //== Output of DMA Gold Line Value
oDMAPurple( Numeric ) //== Output of DMA Purple Line Value
;

How I Use the SunnyBands Function


Let’s say I want to use the function in a Strategy, to see if price is penetrating the SunnyBands lines. The
following is just a sample, a beginning, of what the code might look like:

INPUTS:
j_Key(3880); //=== Client's j_Key Password

VARIABLES:
oUpperInnerBand( 0 ), //=== Value of Upper Inner SunnyBand returned
oLowerInnerBand( 0 ), //=== Value of Lower Inner SunnyBand returned
oUpperOuterBand( 0 ), //=== Value of Upper Outer SunnyBand returned
oLowerOuterBand( 0 ), //=== Value of Lower Outer SunnyBand returned
oMidline( 0 ), //=== Value of Midline of DMA
oAngle( 0 ), //=== Value of LinearRegressionAngle of DMA
oDMAGold( 0 ), //=== Value of the Gold Dynamic Moving Average
oDMAPurple( 0 ) //=== Value of the Purple Dynamic Moving Average
;

Value1 = sjh_f_SunnyBands14.07.30
( 2047, "TS", C, 8, 13, 0.25, 0.25, 14, 2,
oUpperInnerBand,
oLowerInnerBand,
oUpperOuterBand,
oLowerOuterBand,
oMidline,
oAngle,
oDMAGold,
oDMAPurple
)
;

//=== IF previous bar was above SBand & this bar is below:
If C[1] > oUpperOuterBand AND C[0] < oUpperOuterBand
THEN
Buy 1 contract next bar at market;

It’s only an example, not a real system, but you should get the idea for a jumping off point.
CHAPTER 6: PHW Indicator
I initially created this indicator to show “what is possible.” I knew I couldn’t get more money out of a
chart that was possible, so what is possible? How much is the maximum amount of dollars you can
squeeze out of a particular symbol?

This indicator is called sjh_PHWIndicator$$. (Also has _R to denote RadarScreen version, and numbers
and possibly letters to denote version. i.e. sjh_PHWIndicator$$_11.07a.)

NOTE
S:
1. As of 7/4/2011 I have added two new inputs to the end of the input string. These input
variables are used to position the text written on the LastBarOnChart. These values show you
the Ideal, Buy & Hold and PHW values. Please jump down to the input descriptions to read
about these new values.
2. In order for the indicator to plot values it needs additional bars to be loaded. Read about this
above by clicking here. Otherwise, it won’t plot and you’ll call me to say it is broken. 
3. Also, remember that the input value SwingPercent should be set to larger and smaller
fractions, depending on the data compression of the chart. For instance, a daily chart might
need a value of 0.01 for the dots to show up, while a 5-minute chart might use a value like
0.0001. These values are not set in stone; you’ll need to experiment to get the dots to look
right.

Introduction
If the chart only moves in one direction, then buy-and-sell is the best approach. If the chart moves up
and down rhythmically, then it is tradable. And, if it does have a rhythm, how much is the maximum
amount of profit potentially generated by these swings? These ideas lead to my PHW Indicator.

So, I dubbed it “Potential Hourly Wage” and started calculating.

In essence, this indicator finds all the ideal pivots and marks them. Of course, it can’t mark them before
they happen, so that makes it a lagging indicator. I never meant for it to be predictive (there’s no such
thing); I use it for two things: research and confirmation.

When I’m creating an indicator I want to see how closely it matches the yellow PHW dots. When I’m
actually trading it, I want to see how close I come to the yellow PHW dots with my entries. And when
I’m doing research, I use PHW on RadarScreen to find the most tradable symbols.

The PHW Indicator with its yellow dots and calculations is shown in Figure 6.1. Notice that in addition
to plotting yellow dots, the indicator prints out the following calculations:

• Date Span for the data


• Ideal # of Trades if you caught every high and low in this percent retracement
• Ideal Profit if you caught every high and low
• PHW Profit = 40% of the Ideal Profit
• Buy & Hold Profit = amount you would have made by buying on the first day of
this data and holding ‘til the end

Along with the PHW indicator, there is another indicator, made exclusively for use with RadarScreen.
The RadarScreen version of the PHW Indicator is called sjh_PHWIndicator$_R. It is shown in Figure 6.2.

The RadarScreen indicator differs from the plotting indicator, in that nothing is plotted. The
RadarScreen indicator simply writes numbers in columns on a RadarScreen page. The
sjh_PHWIndicator$_R writes three columns of numbers that represent the ending Potential Hourly
Wage figure for the symbol in question, plus the Most Recent High and Most Recent Low.

The value of the RadarScreen version of this PHW indicator is often different from the TradeStation
charting value. This is because RadarScreen depends on you to “Load additional data for accumulative
calculations.” The more “bars back” you designate, the more time it takes RadarScreen to calculate.
Make your selections for this setting under Format Indicator. If you do not load additional bars,
RadarScreen calculates only for the LastBar. In Figure 6.2 below, I have loaded 51 bars of additional
data. The PHW calculation is in the second column from the right.

Figure 6.1a—PHW Indicator on a TradeStation window


Figure 6.1b—PHW Indicator on a MultiCharts window

Figure 6.1c—PHW Indicator on a MetaStock window


Input Values
INPUTS:
SwingPercent(0.01), //percent retracement for each swing
jEquity(0), //
0 = do not plot equity curve;
1 = plot equity curve
jBuySell(0), //
0 = calculate buys & sells;
-1 = calculate sells only;
1 = calculate buys only
jTextN(1), //default value = 1
0 = Do not plot the text values at each pivot
1 = Plot the text values at each pivot
j_Key(31), //password key given upon purchase of license
j_FirstCalcDate(1000101) //first date to begin calculations
j_LastCalcDate(1100601), //last date at which to end calculations
j_Thick(3), //thickness of the yellow dots
j_Color(Yellow), //color of the yellow dots
j_EquityColor(DarkGreen), //color of the equity curve line
j_EquityWidth(3), //width of the equity curve line
j_TextIncrement(.25), //value to increment position of next text
line
j_Position(H {O, H, L, C}) //price at which to position first line of
text
;

The next figure shows the RadarScreen output for the PHW Indicator. It is named sjh_PHWIndicator_R.

I have sorted this page by the highest PHW first. I find that very valuable in picking which stocks I want
to trade. To me, the most tradable stocks are the ones with the highest PHW, or most opportunity for
trading.

The indicator for charting and the indicator for RadarScreen are sold
separately.

Figure 6.2: RadarScreen of PHW Indicator for TradeStation


Figure 6.3—PHW on a MultiCharts Market Scanner

In writing my 6th book, “Grading the Gurus,” I use the PHW Indicator in each and every test. (And I use
FileAppend to print the results of each stock to a file on my C: drive.) Before I can know whether a
system I am testing is any good, I must know what the potential profit for each symbol is. If stock XYZ
can only make $600 in the years under question, then we can’t expect any system designer to do better
than that. Likewise, if the designer only makes $100 with his system, when the PHW is $600, it doesn’t
qualify as a very good system.

Example
Here is a chart of the 15-minute EMini (@ES) showing the PHW dots. I have set the last two inputs to
position the text conveniently on the chart. I found the values that worked best by experimentation. To
get the values below the last prices on this chart I had to set j_Position to (Low-20). To get the text
spread out and not written on top of each other I set j_TextIncrement to 3.
Figure 6.4: PHW on 15-minute chart

Figure 6.4.1—PHW on MultiCharts


The other value that is important to this chart is the SwingPercent. In this example I have it set to 0.005.
The small value is due to the fact that this is a 15-minute chart and the swings in that timeframe are
quite small.

Bars Back
To calculate the PHW Indicator, you must tell TradeStation or MultiCharts how many bars to use in the
calculations. If you calculate PHW on 50 5-minute bars you will most certainly get a different result than
if you use 50 daily bars.

And, if you want long-term PHW result on 5-minute bars, you might want to use 1000 bars for your
calculations.

To be precise, you should know how many 5-minute bars are in a trading day, or how many 15-minute
bars are in a trading day, etc. Further, if you are using daily bars on your chart, you need to know how
many trading days are in a month, or in a year.

This isn’t exactly easy.

I don’t worry about it. When I’m using the PHW Indicator on RadarScreen, all I really want to know is
how stock “A” compares to stock “B” or to all other stocks. I’m simply looking for stocks with high PHW
values to indicate that the stock is tradable. I want a stock (or future, or mutual fund) that oscillates. If
it goes only one direction for a long time, then it should be considered for investing; if it goes up and
down again and again, then you can consider trading this instrument for short and long trades.

Figure 6.5—PHW Indicator on RadarScreen

In the figure above, you can see in the yellow column that I have sorted the data from the highest PHW
to the lowest PHW. That shows me the most tradable stocks.
Figure 6.6—Load Additional Data

How I Trade With This Indicator


I do not use PHW to place trades. I use this indicator to draw the ideal dots on charts, and in the
RadarScrreen version I use the PHW values to find the most tradeable stocks/commodities. A symbol
with a high PHW is more tradable than one with a low PHW. A low PHW would indicate that the symbol
does not have lots of changes, but is rather a symbol that is a buy-and-hold candidate. Symbols with
high PHWs have lots of opportunities to go long and short.
CHAPTER 7: sjh_ExitStrategies
I used to try TradeStation’s different exit settings one at a time, and never came to any great conclusions
as to which setting really worked. Then, like my AllAverages indicator/strategy, I decided to put them
all in one place so I could run optimizations and find out what really worked. The result is this single
strategy, which you can add on to any other strategy(ies) and optimize until you find something that
works for you.

Introduction
TradeStation provides several exit settings through EasyLanguage which are activated using the Set
commands. The possibilities include:

• Setbreakeven
• Setdollartrailing
• Setexitonclose
• Setpercentrailing
• Setprofittarget
• Setstopcontract
• Setstoploss
• Setstopposition
• Setstopshare

To make life easier, I coded them all into a single strategy where they can be turned off and on by using
the inputs. As a result, you can optimize this strategy (which is really just a signal component) to find
the most optimal exit strategy. If you were to try this using TradeStation’s Set commands, it would take
you all week to find the best fit, trying one exit at a time.

Input Values

j_Key { your password value }


j_Vendor { TS=TradeStation, MC=MultiCharts,
MS=MetaStock }
ShareOrPosition { pass in 1 for per share basis, 2 for
position basis }
ProfitTargetAmt(0) { pass in 0 if you don't want a profit target,
or a number for the dollar amount of your
profit target}
StopLossAmt(0) { pass in 0 if you don't want a stop loss, a
number for the dollar amount of your StopLoss
}
BreakevenFloorAmt(0) { pass in 0 if you don't want a breakeven
stop, a number for the dollar amount of your
BreakevenFloor amount. }
DollarTrailingAmt(0) { pass in 0 if you don't want a dollar
trailing stop }
PctTrailingFloorAmt(0) { pass in 0 here and/or in next input if you
don't want a percent trailing stop }
PctTrailingPct(0) { pass in 0 here and/or in previous input if
you don't want a percent trailing stop; else
pass in 50 for 50 percent }
ExitOnClose(false) { pass in true if you want to exit the
position at the close of the day, else pass in
false. CAUTION: We recommend that you set this
to TRUE only for back-testing, if at all; in
automated execution, the exit order will NOT
be filled at the close of the day; instead,
the order can be sent into the extended
session as a limit order. }
j_StdDev(0) //if > 0 length for stddev stop amount. 1
stddev stop length x
j_NextOpen(0) //set to 1 to use Open of next bar (day)
j_NextProfit(0) //set to 1 to use Next Profitable Bars
j_TrendChange //0=false, n=number of bars to determine trend
j_LongExitAfterBars //exit long positions after n number of bars
have passed
j_ShortExitAfterBars //exit short positions after n number of bars
have passed

Components
ShareOr
Position

ShareOrPosition = 1

SetStopShare is used if you set the value of ShareOrPosition to 1.

SetStopShare is a reserved word that sets the way built-in stops calculate the exit order prices. Each
built-in stop reserved word has a parameter for the amount of profit or loss desired, SetStopShare is
simply a switch that changes the behavior of the built-in stops so that the exit order is calculated on a
per share/contract basis, otherwise the exit order is calculated on a total position basis.

SetStopShare is synonymous with SetStopContract.

If SetStopShare, SetStopContract, and SetStopPosiiton are used multiple times, even in different
strategies applied to the same chart, the last reference is controlling.

Example 1

When used with the SetStopLoss built-in exit strategy, SetStopShare sets the exit order based on a per
share/contract basis.

(If you held 1000 shares of the MSFT and set a $0.25 stop loss amount, you would exit $0.25 from your
entry price with a $250 loss. ($0.25 x 1000 shares))
Example 2

When used with a Forex symbol, such as EURUSD, a share refers to a lot (typically consisting of 100,000
units).

Buy 1 share next bar at market;


SetStopShare;
SetStopLoss(.001);

This example enters into a position of 1 lot size (100,000 units) and then attempts to exit based on a
stop loss of .001 per unit, which for this Forex symbol would be a stop loss of $100 for the lot (.001 *
100,000 units).

ShareOrPosition = 2

SetStopPosition is used if you set the value of ShareOrPosition to 2.

SetStopPosition is a reserved word that sets the way built-in stops calculate the exit order prices. Each
built-in stop command has a parameter for the amount of profit or loss desired, SetStopPosition is
simply a switch that changes the behavior of the built-in stop command so that the exit order is
calculated on a total position basis, verses a per share/ per contract basis, set by the SetStopContract
or SetStopShare switches.

SetStopPosition is the default setting for all built-in set commands.

If SetStopShare, SetStopContract, and SetStopPosition are used multiple times, even in different
strategies applied to the same chart, the last reference is controlling.

Example

When used with the SetStopLoss built-in exit strategy, SetStopPosition sets the exit order based on the
whole position number of shares basis.

(if you held 1000 shares of the MSFT and set a $250 stop loss amount, you would exit $0.25 from your
entry price with a $250 loss. ($250 / 1000 shares))

ProfitTarget
Amt
ProfitTargetAmt = 0 means “Off”
ProfitTargetAmt = any positive number is the amount of profit to set as a
target.

Setting the Profit Target is accomplished with the SetProfitTarget reserved word.

SetProfitTarget is a built-in stop reserved word that enables you to specify the amount of profit you are
looking to capture on a total position basis, or a one contract or one share basis. Within a strategy an
order to close your entire position is generated once the profit target amount has been reached.
Whether the profit target amount is based on a position or per share/contract basis is determined by
your setting to the first parameter, ShareOrPosition.

When used with an automated strategy where orders are being generated into the real-world, the
profit exit limit order is immediately sent into the market to be filled. If you lose internet connectivity,
your profit target is still active, but your strategy can longer generate additional orders.

Normally strategies generate orders on the close of the bar for execution on the next bar,
SetProfitTarget allows you to generate orders and exit on the same bar as the bar of entry, this is
especially useful when working with longer duration bars, (e.g. 30-min, 60-min, daily, weekly, monthly).

Examples

When used with the SetStopPosition reserved word, the Amount parameter sets the stop loss as a
dollar amount for the entire position based on the total number of shares or contracts in the current
open position. (if you held 500 shares of MSFT and specified $200 profit amount, you would exit $0.40
from your entry price.)

SetStopPosition;
SetProfitTarget(200);
{SetStopPosition is the default setting and is optional)

When used with the SetStopShare or SetStopContract reserved words, the Amount parameter sets the
profit as a one share or one contract amount. (if you held 500 shares of MSFT and specified $0.60 profit
amount, you would exit .60 from your entry price with a $300 profit.)

SetStopShare;
SetProfitTarget(.60);
(SetStopShare and SetStopContract are synonymous and both work for stock,
futures, options, etc.)

Orders Generated

Limit Order to Sell (Long Exit) or Limit Order to Buy to Cover (Short Exit)

StopLossAm
t
If you set StopLossAmount to 0, this stop will not be used.

The Stop Loss Amount is accomplished with the SetStopLoss reserved word.

SetStopLoss is the reserved word for setting up this input variable.

SetStopLoss is a built-in stop reserved word that enables you to specify the amount of money you are
willing to risk either on a total position basis, or a one contract or one share basis. Within a strategy an
order to close your entire position is generated once the stop loss amount has been reached. Whether
the stop loss amount is based on a position or per share/contract basis is determined by set stop
reserved words: SetStopPosition, SetStopShare, or SetStopContract
When used with an automated strategy where orders are being generated into the real-world, the stop
exit order is monitored and the order held on your computer, once the Stop Loss amount is reached, a
market order is generated and sent to be executed. If you lose internet connectivity, you no longer
have a working stop.

Normally strategies generate orders on the close of the bar for execution on the next bar, SetStopLoss
allows you to generate orders and exit on the same bar as the bar of entry, this is especially useful when
working with longer duration bars, (e.g. 30-min, 60-min, daily, weekly, monthly).

Examples

When used with the SetStopPosition reserved word, the Amount parameter sets the stop loss as a
dollar amount for the entire position based on the total number of shares or contracts in the current
open position. (if you held 500 shares of MSFT and specified $200 stop loss amount, you would exit
$0.40 from your entry price.)

SetStopPosition;
SetStopLoss(200);

When used with the SetStopShare or SetStopContract reserved words, the Amount parameter sets the
stop loss as a one share or one contract amount. (If you held 500 shares of MSFT and specified $0.60
stop loss amount, you would exit .60 from your entry price with a $300 loss.)

SetStopShare;
SetStopLoss(.60);

(SetStopShare and SetStopContract are synonymous and both work for stock, futures, options, etc.)

Orders Generated

Market Order to Sell (Long Exit) or Market Order to Buy to Cover (Short Exit)

BreakEvenFloorAm
t
If you set BreakEvenFloorAmt to 0, this setting will not be used. If you set it to a positive number, that
amount will be used for the floor amount.

SetBreakeven is the reserved work with which this input is implemented.

SetBreakEven is a built-in stop reserved word that allows you to exit a position at the breakeven point,
once a specified profit floor has been reached. The profit floor can be specified on a total position basis,
or a one contract or one share basis. Whether the profit target amount is based on a position or per
share/contract basis is determined by set stop reserved words: SetStopPosition, Setstopshare, or
Setstopcontract. SetBreakEven does not factor in commissions or slippage.
Example
s

Exit all shares or contracts in all positions at the breakeven point if the position has been up at least
$25.00 in profit at some point.

SetBreakEven(25);

Exit all shares or contracts in all positions at the breakeven point if the position has been up at least
$0.25 from the entry price.

SetStopShare;
SetBreakEven(.25);

DollarTrailingAmt
If you set DollarTrailingAmt to 0, this feature will not be used. If you set it to a positive number, that
amount will be used as the trailing dollar amount.

SetDollarTrailing is a reserved word is used to set a trailing stop to exit a position based on a specified
dollar Amount that trails the greatest position profit. A stop order is generated at the calculated price
based on the trailing Amount.

SetDollarTrailing
(Amount)
;
Amount is the greatest open position profit that you are willing to give back.

To place a dollar risk trailing stop at $5 below the greatest share price, use:

ShareOrPosition = 1 and
DollarTrailingAmt = 5

As the price rises in a long position, so does the placement of the stop. It is maintained at a stop value
$5 below the greatest share price.

PctTrailingFloorAmt
Setting PctTrailingFloorAmt = 0 or PctTrailingPct =0 causes this feature to be ignored; setting it to a
positive number less than or equal to 100 sets the percent trailing floor amount. Its corresponding
variable is PctTrailingPct, which sets the percent amount of the profit you are willing to lose.

SetPercentTrailing is a built-in stop reserved word is used to specify the amount of the maximum open
position profit you are willing to lose (as a percent) as well as the profit level that must be reached in
order for the stop to take effect. The position or contract/share is closed out when the specified
percentage of the maximum profit is lost.

SetPercentTrailing ( PctTrailingFloorAmt, PctTrailingPct );

PctTrailingFloorAmt is a numeric expression representing the amount of profit to be reached before


the stop takes effect. PctTrailingPct is the percent of the profit you are willing to lose.
Example

In order to place a percentage based trailing stop that exits a position once it has returned 15% of the
maximum equity earned after the position has made $500, you would use:

ShareOrPosition = 1 and
PctTrailingFloorAmt = 500 and
PctTrailingPct = 15

PctTrai
lingPct
See above explanation. These two parameters work together.

ExitOnClose
Set this value either to True or False. If False, then this feature is ignored. If True, then the reserved
word SetExitOnClose will be used.

SetExitOnClose is a built-in stop reserved word used to place an order to exit all shares or contracts in
all positions on the close of the last bar of the trading session on an intra-day chart.

For historical simulations, SetExitOnClose generates a market order on the bar close event of the last
intra-day bar for each day in the chart. When used in an automated strategy placing real-world orders,
SetExitOnClose generates a limit order into the post market trading session, (if one exists), otherwise a
market order is generated for the open of the next regular session day.

SetExitOnClose by default uses the closing session time specified by the custom session settings of the
chart.

j_StdDev
j_StdDev set to a number greater than 0, sets the number of standard deviations away to use as a stop.

Typically price doesn’t move more than about 2-3 standard deviations away from its average. Generally
it moves more like 1 or 2 standard deviations.

Thus, when I’m optimizing this parameter, I generally set it to test from 0 to 3 in steps of .05. That makes
for lots of tests, but it will likely find something in that range that fits.

j_NextOpen
This value allows you to exit on the open of the next bar. If you set it to 0, it is ignored; if you set it to 1,
it means true and thus take the exit.

I optimize this value from 0 to 1 by 1.


j_NextProfit
This value allows you to exit on the next profitable bar. If set to 0, this exit is ignored; if set to 1 it is true,
which means to exit as soon as there is a profit (not including this bar).

I optimize this value from 0 to 1 by 1.

j_TrendChange
This value is set to 0=false; or nbr=# of bars. Exit if the Trend Changes over the next n number of bars.
For instance, set it to 3 to exit if the trend changes over the next 3 bars.

j_LongExitAfterBars
This values is set to 0 for false, or nbr = # of bars. If a positive number, then exit after this number of
bars. For instance, set it to 5 to exit Long trades after 5 bars have passed.

j_ShortExitAfterBars
This values is set to 0 for false, or nbr = # of bars. If a positive number, then exit after this number of
bars. For instance, set it to 5 to exit Short trades after 5 bars have passed.

Example
Here is an example of some settings for the ExitsStrategies:

Figure 7.1—Sample Inputs for ExitStrategies


CHAPTER 8: CPC Index
Introduction
When I was an early trader (more than 30 years ago) I thought Net Profit was all you needed to measure
a system’s worth. Then I discovered Average Trade size, and then Profit Factor, and then ….

It went on and on. It was next to impossible to compare system A to system B. There are things to
consider like how much money it takes to make the profit. Does it take $10,000 to make $10,000 or
$50,000 to make $10,000? One is 100% profit, while the other is 20% profit. And, is the Average Trade
large enough to cover commission and slippage?

I spent many years listening to gurus and reading books and going to seminars, looking for all the
answers.

John Bollinger (of Bollinger Bands fame) said that both the Profit Factor and the Ratio of Average Win
to Average Loss must be 2.0 or greater, and that the Percent Profitable should be 50% or more. Well,
that would be a rare system indeed.

Finally, after much thinking and research, I used my mathematical brain, and combined Profit Factor,
Ratio and Percent Profitable into one equation that answered most of the problem. I found that if you
multiply all three of them together you get an index that gives you a really good idea whether a system
is tradable. I called this my “Cardinal Profitability Construct” or CPC for short.

Here’s the equation:

CPC Index = ( Percent Profitable ) * ( Profit Factor ) * (Ratio of Avg


Win to Avg Loss)

These values are easily found on the Strategy Performance Report in both TradeStation and
MultiCharts. See Figures below.
Figure 8.1 —TradeStation Performance Report

Notice in Figure 8.1 that 1.03 x .3571 x 1.85 are the inputs to the equation. The solution is thus CPC =
0.68 (truncated).

If you have read my book “Trading 102—Getting Down to Business,” you will remember my
commentary about the value of the CPC Index in Chapter 9. In short, my rule of thumb is that any system
I might consider trading must have a CPC Index of 1.2 or greater. Clearly, the system represented by the
Performance Report above does not pass this test—0.68 is well below 1.2. Nevertheless, many people
would jump into a system like the one above because it showed a Total Net Profit over $2,000. But,
more importantly, the CPC Index doesn’t pass, the Avg. Trade Net Profit is not greater than $100 and
over the long-term, this system will not work over time. The CPC Index is invaluable for independently
comparing systems.
Rather than calculate this index by hand over and over I decided to write the formula in EasyLanguage.

A little problem arose: you can’t calculate profit in an indicator. You must be in a strategy to calculate
profit. So, the CPC Index is a strategy. But, it doesn’t buy or sell anything; it just uses the profit statistics
to calculate the index and print the details in the EasyLanguage Output Window, in the Print Log. This
feature is even more valuable when using MultiCharts, because the statistics we need are in two
different locations in their output. The MultiCharts System Performance looks like this:

Figure 8.2—First page of MultiCharts Performance Summary


Figure 8.3—Second Page of MultiCharts Performance Report

InputValues
j_Key(0), // password key specific to each user
j_Vendor(""), // text value of your software vendor
j_Indic(""), // text value for this indicator specific to each user
o_jKey(0) // output value (proprietary)

None of these values is optimizable. You have to put in the values I give you when you license the
software, but none of them matters to you as a user. They are essentially identifications internal to the
software.

The output of this index is not on a chart; rather, it is printed in the EasyLanguage Output Bar, in the
area called the Print Log, at the bottom of your workspace. Here’s what it looks like:

(Enlarged)

Or

(The whole thing)


Figure 8.1—CPC Index Output

The values, from left to right, are:

• Date
• Time
• Gross Profit
• Gross Loss
• Total Net Profit (TNP)
• CPC Index
• Joe Krutsinger’s Profit to Drawdown ratio
• Mathematical Expectation
• Average Trade
• Average Win
• Average Loss
• Number of Wins
• Number of Losses
• Percent Profitable
• Profit Factor
• Ratio of Avg Win to Avg Loss

This output is convenient for another reason: you don’t have to look at the Strategy Performance
Report, which often gets in the way.

Before I leave this subject let me remind you that the Average Trade value is VERY important. Even if
you have a system that makes $20,000 in a year, you need to look at the Average Trade size. If it took
800 trades each making $25 to get to $20,000, it is an impossible system to trade in real life. A trade of
$25 theoretically is impossible to catch in real life. Slippage will kill you and you’ll never really catch that
$25.

A Clever Mathematical Concept


To disguise the simplicity of multiplying these three numbers together, I could substitute the original
values as they are calculated and then reduce the equation to its simplest form.

The components are Percent Profitable, Ratio of Avg. Win to Avg. Loss, and Profit Factor.

These in turn are defined as follows:

Percent Profitable =

Number of Winning Trades divided by Total Number of Trades.

Let’s represent this in an equation like this: P = NW / NT.


Ratio of Avg. Win to Avg. Loss
=

Average Winning Trade (W) divided by Average Losing Trade (L).

Let’s represent this in an equation like this: R = W / L.

Or

= (Gross Profit / # Winning Trades) / (Gross Loss / # Losing Trades)

= ( GP / NW ) / ( GL / NL )

Profit Factor =

Gross Profit divided by Gross Loss.

Let’s represent this in an equation like this: PF = GP / GL.

Further Obfuscation

Gross Profit is the sum of all Winning Trades

Gross Loss is the sum of all Losing Trades

Reducing the Equation

Let us now put all these equations together and do some factoring and reducing and see what the
formula looks like then.

(Nbr Wins) / (Total Nbr Trades) * (Gross Profit)/(# Winning Trades)/Avg Losing Trade * (Sum of all
Winning Trades) / (Sum of all Losing Trades)

= NW / NT * ( GP / NW ) / ( GL / NL ) * GP / GL

= ( GP2 * NL ) / (NT * GL2 )


CHAPTER 9: Pennants Finder
Introduction
Some people like to trade breakouts, rather than moving averages. This indicator was designed for a
client who preferred to trade breakouts. The indicator marks areas of congestion with little triangles
that show the top value and bottom value to use for breakouts.

Input Values
j_Key(0), // password key specific to each user
j_Indic("0"), // text value for this indicator specific to each user
TriLen(4), // length of the congestion triangle, in bars
jLines(1), // 1=draw the support & resistance lines; 0=don’t draw
them
jNums(1), // 1=write the S&R numbers on the chart; 0=don’t write
them
j_Wid(3), // Width (thickness) of the lines to be drawn
j_Above(1.01), // Factor above the High to write the numbers
j_Below(.99); // Factor below the Low to write then numbers

Here’s what the Pennants look like on a chart:

Figure 9.1—Pennants

The pennants are blue sloping lines with red horizontal lines on top of and underneath them. They are
highlighted in translucent yellow.

The corresponding nu
How I Trade With This Indicator
The way I trade this indicator is to buy (or sell) the breakouts above (or below) the little horizontal red
lines. Then, if the market comes back to the support or resistance I get out. Otherwise, I wait for the
next pennant and move the stops up (or down).

When I use this indicator in conjunction with my SunnyBands, I watch for price to come down to the
little red lines (or up to if we’re in a long situation) and hit the upper or lower SunnyBands, and I take
my profits and wait for another trade.
CHAPTER 10: Solar09
Introduction
This indicator is based on weighted moving averages. It is very simple, but powerful. It turns red when
the market is moving downward and green when the market is moving upward. That’s about all there
is to it. Like all moving averages, it is a slightly lagging indicator.

Input Values
j_Key(1234), //personal password Sunny gives you
price(Close), // which price field to use: Open, High, Low or
Close
length(21), // length of the moving average
upcolor(DarkGreen), // color to paint upward moving average
downcolor(DarkRed), // color to paint downward moving average
colorDeltaBar(1), // =0 >> off; =1>>color the bar where the moving
average changes color
j_Offset(0), // offset the moving average number of bars
j_Key(0), // password key given upon purchase of license
j_Indic("000000000") // text password for Solar09

Indicator on a Chart
Simply insert the sjh_I_Solar09 indicator on your chart, of whatever symbol, using Insert  Indicator
or Alt+C. Nothing will appear initially, until you set the proper input values, as above. Figure 10.1 shows
the indicator on a chart of the Dow.
Figure 10.1—Solar09 Indicator on Chart of Dow Jones daily

The next chart, Figure 10.2, shows the Solar09 indicator with the input value ColorDeltaBar set to a
color number. This turns on the painting of the transition bar. If ColorDeltaBar is equal to 0, the bar does
not get highlighted. If any positive number, the number specifies the color for the bar. (See Appendix A
for color values).

Figure 10.2—Solar09 Indicator with Bar set to 1 (on) which means black.

If you set the input value j_Offset to a positive number, the plot of the moving average will move back
in time that many bars. If you set j_Offset to a negative number, the plot will be moved that many bars
into the future.
CHAPTER 11: Solar09 Strategy
Most indicators can be turned into strategies. The Solar09 Indicator is no exception.

Introduction
The Solar09 Strategy is simply an interpretation of the Solar09 Indicator. This configuration simply takes
a trade when the moving average changes color.

The picture of the indicator on a chart is deceiving. It looks better than it is. The problem with the
indicator/system is that a trade can’t be placed until the next bar. The line doesn’t turn colors until after
a bar is completed. Nevertheless, it is amazingly accurate.

There are several Solar Systems (Solar03, Solar05, Solar07, and Solar09 so far). Each has a little bit
different tweak on the filters and triggers that set off the trade. While all are based on the red and green
line shown above, each Solar System has a different way of finessing the market. Some use MACD,
some ADX, some Pennant Formations, some Linear Regression, etc. You’ll have to decide for yourself,
based on your style and your favorite markets, which is best for you.

Input Values
INPUTS:
j_Key(1234), // personal password Sunny gives you
j_price(4), // you may choose Open, High, Low or Close based
on the respective values 1, 2, 3, or 4 (i.e.,
4=close)
length(21), // length of the moving average
j_Key(0), // password key given upon purchase of license
j_Indic("00000000000") // text password for Solar09

Because this is a strategy, the value for length can be optimized. The input value for j_price can also be
optimized from 1 to 4, for open, high, low or close.

The other values are not appropriate for optimization.


Examples

Figure 11.1—the Solar09 Strategy on a Chart

The best optimization for the Solar09 strategy on the @ES daily contract, for the past year, is in choosing
a fast average (length = 5) and using the Open of the bars to calculate. This is shown in Figures 11.2 and
11.3 below.

Figure 11.2—Optimized Solar09 Strategy


Figure 11.3—Solar09 Strategy Performance Report

It is left to the reader to choose their own values for their time frames and instruments.
CHAPTER 12: AllAverages Indicator
Mother is the necessity of invention, I’ve always told my kids. And that’s what led me to this indicator.
I wanted to see how each of the different types of moving averages compared to each other—profit
wise. And I got tired of having to go back and forth putting this average and then that average on my
chart, all with different names.

So, I put all the averages in one indicator, and subsequently in one strategy, to make it quick and easy
to plot any average from one place, and to test any moving average from one place and compare
profitability by optimization.

Introduction
While you can’t evaluate which average is “best” in the indicator format, you can easily look at them
and choose the one you visually prefer. And, it’s very easy when all you have to do is specify a different
number, and not add and delete differently named indicators with different parameters. In this
indicator, it’s all in one place. All you need do is choose “WhichAvg” and you can even say how many of
them to plot on the chart as long as it’s one, two or three.

I think the first time I got frustrated with all the different moving averages was when I realized I could
easily plot a 2 line moving average and look for crossovers, but I couldn’t plot a 2 line Exponential
Moving Average without putting two different indicators on the chart. That’s what got me started on
this indicator.

Input Values
INPUTS:
j_Key(2044), //jKey password
j_WhichAvg // (1 {1=H, 2=S, 3=X, 4=W, 5=DMA, 6=S9, 7=KAMA}),
// 1 = Harmonic Mean Moving Average
// 2 = Simple Moving Average
// 3 = Exponential Moving Average
// 4 = Weighted Moving Average
// 5 = Sunny’s Dynamic Moving Average
// 6 = Sunny’s Solar09 Moving Average
// 7 = Kaufman’s Adaptive Moving Average
j_Many(1), // 1, 2, or 3 moving averages
j_Item(4), // O, H, L, C = 1, 2, 3, 4
j_L1(9), // length of moving average 1
j_1Color(darkbrown), // color of average 1
j_1Thick(2), // thickness of line for average 1
j_1Style(2), // style of line for average 1 (ie: solid, dash, dot…)
j_T1(0.25), // smoothing factor for average 1 calculations
j_Precision1(5), // nbr of digits for calculations (ie 5 decimal
places)
j_L2(18), // length of moving average 2
j_2Color(darkmagenta),// color of average 2
j_2Thick(2), // thickness of line for average 2
j_2Style(2), // style of line for average 2
j_T2(0.25), // smoothing factor for average 2 calculations
j_Precision2(5), // number of decimals in calculations for average
j_L3(20), // length of moving average 2
j_3Color(darkgreen),, // color of average 1
j_3Thick(2), // thickness of line for average 1
j_3Style(2), // style of line for average 1 (ie: solid, dash,
dot…)
j_T3(0.25), // smoothing factor for average 1 calculations
j_Precision3(5), // nbr of digits for calculations (ie 5 decimal
places)
j_Displace(0), //
j_DisplaceText(5) //
;

Figure 12.1--Inputs
Examples
A chart won’t show the simplicity and flexibility of this indicator. But, here it is anyway for you to see
what three moving averages from sjhAllAverages looks like on a chart. If you’ll notice at the last bar on
the chart there is a little set of numbers. Those numbers are the lengths of each of the three moving
averages.

Figure 12.2—AllAverages with 3 simple moving averages selected


CHAPTER 13: AllAverages Strategy
Mother is the necessity of invention, I’ve always told my kids. And that’s what led me to this indicator.
I wanted to see how each of the different types of moving averages compared to each other—profit
wise.

So, I put all the averages in one indicator, and subsequently in one strategy, to make it quick and easy
to plot any average from one single place, and to test any moving average from one place and compare
profitability by optimization.

Just by optimizing on the input value you can test all six types of moving average at once.

Introduction
You could compare each type of moving average to one another by testing all the parameters, one at a
time, on each type average, one average at a time. I didn’t like this technique. It seemed far too tedious
and prone to error.

Since you can’t optimize an indicator, and since you can only tell “which is best” by measuring
profitability, I wrote a strategy that would take an input to specify which average to use, and then I
could optimize that input over all the averages to find the most profitable one.

Input Values
These are the input values for the Strategy. The indicator is essentially the same.

INPUTS:
j_L1(8),
j_L2(13),
j_NAvg1(1 {1-6;Which Avg to Use}),
{
1 Harmonic Mean
2 Simple Moving Average
3 Exponential Moving Average
4 Weighted Moving Average
5 Sunny's Dynamic Moving Average
6 sjh_Solar09 Proprietary Average
7 Kaufman's AMA (KAMA)
}

j_NAvg2(1),
j_NOHLC1(1) ,
j_NOHLC2(1) ,
j_Key(0),
j_Indic("")
;

The lengths, j_L1 and j_L2 are the lengths of the two moving averages to plot, or to test.
The input value j_NAvg1 tells me which type of average to use for the first moving average. You specify
any value from 1 to 7 to designate the average. Any other value is meaningless.

The input value j_NAvg2 tells me which type of average to use for the second moving average.

So, you see, you could choose the first line to be an Exponential Average, and the second to be a Simple
Moving Average – or any of the combinations you wish.

The input values j_NOHLC1 and j_NOHLC2 tell me what bar value to use for each of the moving average
lines. You may specify them as follows:

1 Open
2 High
3 Low
4 Close

The nice thing about making them numeric inputs is that you can optimize on them as well.

The inputs j_Key and j_Indic are for password protection. When you purchase a license to use the
software, I’ll give you these values. They are unique to you.

There are no pictures to show with this indicator. It is all about the optimization. The simple moving
average, the exponential moving average, the weighted moving average, all look just like their
counterparts in TradeStation. The whole reason for this strategy is so you can optimize to find which
type moving average works best (makes the most profit) on your particular symbol and timeframe.
Chapter 14: Color the Day & Night Sessions
This PaintBar is for coloring the day session different from the night session. This routine is called
sjh_PB_DaySession.

I like knowing, in 24-hour traded symbols, whether I am looking at the day session or the night session,
at just a glance. I don’t like to have to think about it. Typically, in the eMini, there is lower volume in the
night session. In fact, I find it is significantly lower and the moves are generally much smaller. This is
important to know. And, I like setting my Neurology to key instantly off the color variations. That’s why
I color the night sessions differently from the day sessions.

Latest Version: sjh_PB_DaySession_14.09.02

Introduction
When I’m trading, and under stress, even while following my system rules, I can get easily sidetracked
and sometimes confused. And, if the phone rings and someone redirects my thoughts, I can look back
at the computer screen and not relate to what I’m seeing.

So, my mantra is to keep it simple. Make everything obvious. And, one of the techniques is to color-
code things. For instance, I like to keep my DynamicMovingAverage purple and gold. That way,
whenever I look up, if I see purple and gold lines crossing I know it’s my DMA.

Likewise, with the availability of 24-hour trading, I can enter or exit a trade any time of the day or night.
And especially when I’m analyzing historical charts I like to make it easy to see what part of the day or
night I’m looking at.

Input Values
As with all my indicators, the parameter that will turn off and on the indicator is the j_Key value.

INPUTS:
j_Key(31), // Set to your password value given by Sunny
j_Vendor("TS"), // TS=TradeStation, MC=MultiCharts, GN=Genesis,
MS=MetaStock, NJ=NinjaTrader
j_DayColorUp(Blue), // Color Day Session Up Bars
j_DayColorDn(Red), // Color Day Session Down Bars
j_NiteColorUp(Green), // Color Night Session Up Bars
j_NiteColorDn(Magenta), // Color Night Session Down Bars
j_OpenTime(0630), // Local opening time of day session
j_CloseTime(1315) // Local closing time of day session (begin nite
session)
;

It’s pretty self-explanatory. You specify the color you want the Day Session bars to be painted. In this
example I’ve chosen Blue. Then you choose the color you want the night, or Second Session bars to be
painted. Then, with OpenTime and CloseTime you specify the times the Day Session opens and closes.
The routine assumes if it’s not the Day Session, then the rest of the bars are in the night session.

Example

Figure 14.1—PB_DaySession: Blue and Red are Day Colors

Blue and red bars are in the day session. Green and magenta bars are in the night session. The curvy
lines on the chart are from my DynamicMovingAverage (DMA).

Using this PB_DaySession helps set your Neurology to instantly key in to which session you are trading
in.
Chapter 15: SunnyBars
This is another one of those inventions born of necessity. I wanted to see how larger and diminishing
volume effected the movement of the markets.

This indicator is actually a set of PaintBars. There are three routines: sjh_SunnyBarsBodyVolume,
sjh_SunnyBarsTop, and sjh_SunnyBarsBot. The first routine paints the body of the candle, with the
width of the candle being dependent on the volume. The next two routines paint the top and bottom
wicks of the candle. To get a full SunnyBar you must put all three PaintBars on the chart.

It looks like this:

Figure 15.1—Notice that Wider SunnyBars have more volume

Notice the higher volume bars are wider than the lower volume bars.

NOTE: The symbol on the chart must be in OHLC bar configuration, not in candlesticks.

Introduction
Back in the olden days I used to favor an indicator called EquiVolume by Richard Arms. It fell out of favor
as market software became taken over by larger concerns than his, and the indicator dropped off the
common lists.
Because I couldn’t find this indicator on TradeStation, I created my own. This indicator, SunnyBars, is a
combination of candlesticks the way I see them, and the concept of making higher volume bars wider,
and lower volume bars more narrow.

NOTE: These bars must be put on a chart of OHLC bars. The indicator won’t show up on a Candlestick
chart. The candles will overwrite the SunnyBars.

Input Values
There are only two inputs to the PaintBar Indicator SunnyBarsVolume, and they are your j_Key
password key, given to you by me, and changed from time to time to protect my proprietary software,
and the length of the Average to use for the Volume.

The Bottom and Top paintbars, which paint the wicks, have another input parameter, and that is to
specify the width of the blue wicks. That value can go from 0 to 6. I like to set mine to 3.

The next figures show the input values for each of the three (3) routines necessary to completely paint
SunnyBars. Remember, SunnyBars is a combination of three PaintBars.
Figure 15.2—Inputs for SunnyBars Body Volume PaintBar
Figure 15.2—Inputs for SunnyBars Bottom and Top are the same
Figure 15.3—SunnyBars: Narrow and Wide bars denote volume

Note in the figure above, that there are two really wide bars (when compared to the rest of the bars).
The widest green bar, is just after noon and is indicative of a blow off top. The widest red bar occurs
just after 13:00, and is a blow off as well, this time on the bottom. Notice how price tends to reverse
after these really thick bars.
Chapter 16: TimeSeriesForecast & RVI
Introduction
The Time Series Forecast (TSF) indicator is based on linear regression calculations using the Least
Squares method. Linear regression is a statistical tool used to predict future market values relative to
past values. TSF attempts to "predict" the future value of a market by determining the upward or
downward bias of a trend and extending that calculation into the future. For example, if prices are
trending up, TSF attempts to logically determine the upward bias of the price relative to the current
price and extend that calculation forward. When the market price is above the indicator, the trend is
considered up. When the market price is below the indicator, the trend is considered down.
Additionally, many analysts believe when prices rise above or fall below the indicator line, prices will
likely pull back to the line. The TSF indicator also monitors the current trend to determine if a change in
direction occurred.

The Time Series Forecast indicator is similar to the Linear Regression indicator with the exception of
two significant differences. The first difference is that TSF plots its line forward (to the right of the chart)
by the number of bars specified by the j_BarsForward input. The second difference is the default Length
input value used for the TSF is much shorter because the plot line is extended forward. A larger Length
input would create a grossly exaggerated plot and would not be as reliable as a shorter-term length
when analyzing trends and price activity.

TradeStation’s built-in indicator lags price movement. My version is the inverse of TradeStation’s
indicator, and does a great job of plotting price movement in advance of movement. You will notice
that when my indicator is at a top, the market will be making a bottom. And, when my indicator is at a
bottom, the market will be making a top.

On the RVI indicator it is just the opposite. Tops show tops, and bottoms show bottoms.

Inputs
INPUTS:
j_Price(Close),
j_Length(9),
j_BarsForward(5),
j_BarPlus(7),
j_Color(blue),
j_Thick(3)
;
Figure 16.1—TimeSeries and RVI
Chapter 17: CloseLastTrade
When I am doing research into how a trading system fares, and compares to other trading systems, I
like to have all the open trades closed, as of the last bar on the chart. There might be a trade of several
thousand dollars left open otherwise, and its values would not be counted into the Performance Report
statistics.

Introduction
This is a simple routine, in the form of a Strategy. All you need to do is add it to the list of
Signals/Strategies at the end of the list. It will then close all open trades at the end of the chart.

Input Values
There are no inputs for this strategy.

Examples
Let’s say the last trade on your strategy is a buy, and that it happened a month ago (or say 20 bars ago),
and that the market had been going up ever since. Then, the Strategy Performance Report would not
report this beautiful, long, profitable trade in the statistics for your system. Instead, the trade would be
left currently open, and would not be part of the profit and stats reported.

If you included the CloseLastTrade strategy, however, in your list of Signals, as the last signal, then it
would close that final trade at the last bar on the chart, and it would now appear as part of the statistics.
CHAPTER 18: BingTicks
To some it sounds like incessant notice, but to us traders the sound of the bing and the bong of this
indicators is soothing! This little indicator does nothing except play a small .wav file with each tick of
the market. I put it on a 1-minute chart of whatever I am trading.

Introduction
Back in the olden days, when all trading was done on the floor of an exchange, using open-outcry only,
the cacophony on the floor was thrilling. You could almost hear the waves of excitement as the market
got hotter and cooled down. You could tell which way the market was going based on the din of the
floor.

Now that much of our trading takes place on computers (aka “upstairs”), the emotion of the noise has
subsided. However, there is one way to recapture that excitement and to read the level of activity based
on sound. And that is to listen to the frequency of the up and down ticks through my little sjh_BingTicks
indicator.

With each tick of the market, with every trade, sjh_BingTicks plays a small sound file from your
harddrive. I use a “bing” for up trades, and a “bonk” for down trades. So, not only do I get a sense of
frequency, I get a feel for direction. Further, I use a “click” for sideways trades.

Input Values
INPUTS:
j_Key(31),
// Play this sound when trade is up:
j_UpSound("C:\Sounds\Blip.wav"),
// Play this sound when trade is down:
j_DownSound("C:\Sounds\Bonk.wav"),
// Play this sound when trade is sideways:
j_SideSound("C:\Sounds\Click.wav"),
//Play this sound near market close:
j_ClosingSound("C:\Sounds\ClosingBell.wav"),
//Closing Time to Ring the Closing Bell:
j_ClosingTime(1313)
;

Examples
Remember to have a folder on your C:\ drive that matches your inputs, and a wave file matching each
input, otherwise no sound will play.

For instance, if in the second through fifth inputs you use “D:\Sounds\xxx.wav” then the sounds must
be located on your D:\ drive. Be sure that you name the wav file exactly as it is named on your computer.
If the file on your computer is “Blip” remember that it is different from “blip.”
In the original incarnation of this indicator, there were no inputs. I used it to simply play the sounds for
my one trading instrument, the S&P 500. But then I began trading the other futures contracts and the
Forex markets with the same “speed-trading” frequency. When that started, I needed to be able to
differentiate between which chart was binging and where the action was taking place. So, I made the
indicator flexible so I could hear one sound on the S&P and a different sound on the other markets.

I also like the “ClosingBell” to ring 2 minutes before closing time, to remind me to exit any trades I don’t
want to hold overnight. TradeStation signifies 1:13 pm as 1313.

The next picture shows the inputs for the indicator.

If you need some sound files, just go to the downloads section of MoneyMentor.com
https://www.moneymentor.com/downloads.html and pick from a few that I have made available,
which work well for trading sounds. Keep in mind if you download your own sounds, a small file works
best for fast moving markets. The sound must play very quickly and not interfere with the next sound,
because ticks come in very fast. Make sure you use small sound files. (.wav)

Figure 18.01—Format Indicator Menu Panel


I like to use different sounds for different contracts. That way I can hear when one is going down and
the other going up without even looking at the monitor. I often trade Gold and the EMini S&P. For the
Gold contract I use the following settings:

Figure 18.02—BingTicks settings for Gold contract

For the EMini contract I use these settings:

Figure 18.03—BingTicks settings for EMini contract

Notice in Figures 18.02 and 18.03 that the Closing Time is different for each contract. Gold closes at
1400 while the EMini closes at 1315. I give myself 2 minutes warning by using the settings above.
CHAPTER 19: What Time Is It?
This indicator helps me keep track of whether the market is moving fast or slowly, and whether the
server is still feeding me data or not.

Introduction
There are times when I am not totally sure whether the market is still open or not. Sometimes the
datafeed (Heaven forbid!) goes down. Sometimes my network goes down. Because of unforeseen
events like these, and to keep me always on my toes, I wrote this little indicator.

All it does is print the time and the current price of the market on the right-hand edge of my chart. It
updates with every tick of the market.

Input Values
As with all my indicators, the parameter that will turn off and on the indicator is the j_Key value.

INPUTS:
j_Key(2047),
j_Price(C),
j_TimeColor(DarkRed)
;

Examples
Here is a chart with the indicator in place. Notice the time and price at the right-hand edge of the data.
Figure 19.1—Time and Price
CHAPTER 20: ShowMe Current Price
Current Version: 11.01

Sometimes when I’m looking at several charts, back and forth, back and forth, I lose track of the
bouncing prices. So many things to see and to process! I must be on the alert for instantaneous reaction
to market conditions.

So, to make it easy for myself, I wrote a little routine to put a colored dot (larger than the little closing
price cursor) so that I could readily find the Current Price.

By default it used to be blue. But, with version 11.01 I have added the capability to have a green colored
dot for upticks and a red colored dot for downticks. (Or, you may select the up and down colors of your
choice.) Actually, I like darkgreen and darkred.

There used to be no inputs for this routine, but now that I allow you to select colors, you must tell me
which colors you like. You may use RGB colors to choose anything you wish. Oh, and it puts the current
price right beside the dot, which also changes with every tick.

I also have an input for how far away to place the dot. That’s called j_BarsDisplace.

So, here are the current inputs:

INPUT:
j_Key(2047), //Password Key Value
j_UpColor(DarkGreen), //Up Tick Color
j_DnColor(DarkRed), //Down Tick Color
j_BarsDisplace(2); //Bars away to place the dot
CHAPTER 21: Close Trades It’s Friday
There are no inputs to this routine, either. It’s either on the chart or it’s not.

The back-story on this indicator lies again in my need to be always on my toes and ready for the next
trade. In my excitement for trading, I often forget that the day is Friday, and it surprises me when the
market closes for the weekend. So, I made an indicator that writes an alert all over the screen when it’s
Friday.

Trust me, it helps.


CHAPTER 22: Candlestick Pattern Alerts
Rather than trust my recognition and memory of candlestick patterns, I wrote a set of indicators that
tell me when certain patterns appear on the chart. In fact, there are several indicators. They are:

Figure 22.1—Candlestick Routines Listing

One of the nicest features of having these indicators is that they have Alerts in them. If you have the
indicator or your chart and set Alerts On, then you will be notified each time one of these patterns
occurs.

Figure 22.2 shows three sample indicators on a chart. You’ll see the words “BBEnglf” indicating
Bullish/Bearish Engulfing pattern. Also shown are the words “EveDoji” to show an Evening Doji pattern.
The other pattern on the chart is “BearHarami” showing the Bearish Harami pattern.
Figure 22.2-Candlestick Indicators all on one chart

These routines each start with a “C_” to denote that they are referring to Candlesticks. Each routine has
as its first input, the j_Key password value. Be sure to use the value I gave you when you first licensed
the product.

Here is the list of Indicators currently available (hyperlinks for ease of use):

• sjh_C_BullEng_BearEng
• sjh_C_BullHar)BearHar
• sjh_C_Doji
• sjh_C_Hammer_HangingMan
• sjh_C_MornDoji_EveDoji
• sjh_C_PierceLine_DkCloud
• sjh_C_ShootingStar

It should be fairly apparent from the names what the routine does; BullEng stands for Bullish Engulfing,
BullHar stands for Bullish Harami. The rest are obvious.
Bullish Engulfing and Bearish Engulfing Patterns

Figure 22.3—Bullish and Bearish Engulfing Inputs

This routine is named sjh_C_BullEng_BearEng. It stands for Bullish Engulfing and Bearish Engulfing
Patterns.

The different candlestick patterns are shown in different colors on a chart. On the chart in Figure 22.2 I
have included all the patterns I have available, rather than show lots of different charts.

These are the Inputs and their descriptions:

INPUTS:
j_Key(2047), //Your individual password (given by me)
Length(14), //Length of Exponential Moving Average of Closes
j_Color(Red) //The color to make the text on the chart
;
Figure 22.4—Bullish Engulfing and Bearish Engulfing Candlestick Patterns

Figure 22.5—Bullish Engulfing Pattern and Bearish Engulfing Pattern

A reversal pattern that can be bearish or bullish, depending upon whether it appears at the end of an
uptrend (bearish engulfing pattern) or a downtrend (bullish engulfing pattern). The first day is
characterized by a small body, followed by a day whose body completely engulfs the previous day's
body.
Bullish Harami, Bearish Harami

Figure 22.6—Bullish and Bearish Harami Candlestick Patterns

These are the Inputs and their descriptions:

INPUTS:
j_Key(2047), //Your individual password (given by me)
Length(14), //Length of Exponential Moving Average of Closes
j_Color(Red) //The color to make the text on the chart
;

Figure 22.7—Harami Pattern

Figure 22.7, above, shows you what the candle pattern looks like on a chart.

A Harami is a two day pattern that has a small body day completely contained within the range of the
previous body, and is the opposite color.
Figure 22.4—Bullish Harami and Bearish Harami Candlestick Indicator

Doji

Figure 22.8—Inputs for Doji Candlestick Indicator


INPUTS:
j_Key(2047), //Your individual password (given by me)
Percent(5), //Percent multiplier for difference between open and close
j_Color(Red) //The color to make the text on the chart
;

Figure 22.9—Doji Patterns

Figure 22.10—Doji Candlestick Indicator

Dojis form when a security's open and close are virtually equal. The length of the upper and lower
shadows can vary, and the resulting candlestick looks like, either, a cross, inverted cross, or plus sign.
Dojis convey a sense of indecision or tug-of-war between buyers and sellers. Prices move above and
below the opening level during the session, but close at or near the opening level.
Hammer, Hanging Man

Figure 22.11—Hammer and Hanging Man Candlestick Patterns

These are the Inputs and their descriptions:

INPUTS:
j_Key(2047), //Your individual password (given by me)
Length(14), //Length of Exponential Moving Average of Closes
Factor(2), //Multiplier of body size
j_Color(Red) //The color to make the text on the chart
;

Figure 22.12—Hammer Pattern

Figure 22.13—Hanging Man Pattern


Figure 22.14—Hanging Man and Hammer Indicator

Hammer candlesticks form when a security moves significantly lower after the open, but rallies to close
well above the intraday low. The resulting candlestick looks like a square lollipop with a long stick. If this
candlestick forms during a decline, then it is called a Hammer.

Hanging Man candlesticks form when a security moves significantly lower after the open, but rallies to
close well above the intraday low. The resulting candlestick looks like a square lollipop with a long stick.
If this candlestick forms during an advance, then it is called a Hanging Man.
Morning and EveningStar
Doji

Figure 22.15—Inputs for the MonringDoji-Evening Doji Indicator

These are the Inputs and their descriptions:

INPUTS:
j_Key(2047), //Your individual password (given by me)
Length(14), //Length of Exponential Moving Average of Closes
Percent(5), //Multiplier of body size
j_Color(DarkCyan) //The color to make the text on the chart
;

Here’s what the candle pattern looks like:

Figure 22.16—Morning Doji Star and Evening Doji Star


Figure 22.17—Morning and Evening Doji Stars

Morning Doji Star: A three day bullish reversal pattern that is very similar to the Morning Star. The first
day is in a downtrend with a long black body. The next day opens lower with a Doji that has a small
trading range. The last day closes above the midpoint of the first day.

Evening Doji Star: A three day bearish reversal pattern similar to the Evening Star. The uptrend
continues with a large white body. The next day opens higher, trades in a small range, then closes at its
open (Doji). The next day closes below the midpoint of the body of the first day.

Pierce Line, Dark Cloud


Xxx

INPUTS:

INPUTS:

j_Key( 2047 {CHG THIS}),

Length( 9 ) ,

j_Color( DarkMagenta )

;
Piercing Line

A black candlestick followed by a white candlestick that opens lower than the black
candlestick’s low, but closes 50% or more into the black body.
Interpretation: A bottom reversal signal

Dark Cloud Cover:

A long white body followed by a black body. The following black candlestick opens
higher than the white candlestick‘: high and closes at least 50% into the white candlestick’s body.
Interpretation: A bearish reversal signal during an untrend.
Shooting Star
Marked by “SS”, the Shooting Star…..
CHAPTER 23: Day Open/High/Low Lines
Plots horizontal lines at the Open, High and Low of each day.

Figure 23.1—Day Open High Low Lines

INPUTS:
j_Key(2047),
OpenColor( Blue),
HighColor( DarkGreen),
LowColor( Red),
DataNum( 1 {DataStream Nbr} ) ,
j_TLSize(2),
j_OpenSession1(0630),
j_CloseSession1(1315),
j_OpenSession2(1500),
j_CloseSession2(0630)
;

You may specify the color and thickness of the horizontal lines over prices on the chart. In the chart in
Figure 23.1 Green designates the highest high of the day, while Red is the lowest low of the day.
Likewise, the Blue bar shows you the Opening price of the day.

Putting a line for the closing price just makes a confusing jumble. I have an indicator we fondly call the
Bouncing Ball—but it’s official name is sjh_SM_CurrentPrice. This ShowMe puts a dot on the current
price at the right hand edge, where trades are taking place.
Writing this page makes me think of another indicator I could write: sjh_SM_AllCloses, which could put
a dot on all the final closes for every day. That way you could combine these two indicators and not
make a messy chart. Glad you thought of it. Thanks.
CHAPTER 24: Days of the Week
Colors bars during each day of the week a different color. I.e. Monday is brown, Tuesday is blue,
Wednesday is green…

You may pick any color you wish through the Input values you select.

Figure 24.1—On a Daily Chart every bar is a different color

While this makes for a colorful chart, on a daily basis this isn’t the best use of this indicator. Sure, if you
memorize the colors associated with each day you can tell at a glance what day of the week it is.

But, wait for the next chart where the symbol is @ES on a 30-minute chart. In this chart you can see the
section that is Monday, the next colored section is Tuesday etc. This way it is pretty handy.

A regular chart just shows you the date on the X-Axis, but this indicator allows you to tell at a glance
what day it is. This comes in really valuable when you are trying to see patterns and to see which day
of the week is the most profitable.
Figure 24.2—On this 30-minute chart you can easily identify the days of the week

Below are the Inputs to the PaintBar indicator. You may specify any of TradeStation’s colors or

INPUTS:
j_Key(2047), //Your Password Key
j_1Color(Blue), //Monday
j_2Color(Red), //Tuesday
j_3Color(Green), //Wednesday
j_4Color(DarkBrown), //Thursday
j_5Color(Magenta), //Friday
j_6Color(Cyan), //Saturday
j_7Color(DarkGray) //Sunday
;
CHAPTER 25: Label the Days of the Week
INDICATOR NAME
: sjh_DaysOfWeek

Figure 25.1—Letters designating the day of the week

Sometimes colors just aren’t enough. So, this indicator puts a little letter on the top of each bar, with a
letter designating the day of the week.

It’s kinda hard to see in this little font, but the letter on top of each bar tells the day of the week. The
letters I’ve chosen are:

M Monday
T Tuesday
W Wednesday
H Thursday
F Friday
S Saturday
U Sunday
There is apparently some unpublished limit on the number of text characters you can put on your chart.
Notice that the first chart below is of daily bars, and it works fine. But, when you start using intraday
charts, you must limit then number of days on the chart or it won’t put the little letters on the chart.

This next chart shows an intraday chart (15-minutes) with the day labels successfully placed. However,
if I tried to plot 20 days back, no labels would appear. Hmmm.

Figure 25.2—Day of Week letters above the bars

xx
CHAPTER 26: Paint DMAV Crossover
INDICATOR NAME
: sjh_DMACrossOver

Paints the bar where the Dynamic Moving Average crosses over. More accurate than eyeballing it.

INPUTS:
j_Key(2047), //user password key
j_Vendor("MC"),//vendor: MC=MultiCharts, TS=TradeStation
j_Indic(" "), //reserved for future use
j_Price1(C), //OHLC
j_Price2(C), //OHLC
j_L1(8), //fastma
j_L2(13), //slowma
j_T1(0.25), //smoothing factor for FastMAV
j_T2(0.25), //smoothing factor for SlowMAV
j_Color1(RGB(000,102,102)), //color of FastMAV plot line
j_Color2(RGB(204,102,102)), //color of SlowMAV plot line
j_Thick1(4), //thickness of FastMAV plot line
j_Thick2(4), //thickness of SlowMAV plot line
j_Precision(2) //decimals of precision for calculations
;

Figure 26.1—ShowMe DMA Crossover points


CHAPTER 27: SunnyBands MidAngle
Plots the linear regression angle of the SunnyBands lines. The sharp peaks do a great job of pinpointing
turning points in market movement.
CHAPTER 28: Using Sunny’s Ultimate-F Spreadsheet
Ralph Vince’s seminal work on portfolio compounding is thoroughly described in his books. He has
several, and I list them in order of publication below. With each book his work becomes more and more
complex, so beware. Also, know that his work is highly mathematical in nature, and not all can
understand what he is trying to communicate.

Ralph Vince’s Books:

These books are shown in order of publication, from left to right, as Vince developed his theories. It is
also true that as the books progress the concepts become more complex. The first book, “Portfolio
Management Formulas,” does a great job of explaining with a fair amount of simplicity, his overall
concepts. It introduces optimal-f and its accompanying formulae, and the raison d’etre.

Ralph’s optimal-f concept is basically that there is a single fraction which is the best divisor for
compounding your profits. Any other number will either give you less total profits or will blow up in
your face. He explains why being on the wrong side of the bell curve, when figuring this fraction, will
result in large drawdowns and ultimate ruin. He also demonstrates the necessity for calculating the
optimal fraction that will give you the highest returns.

Importantly, Ralph states that one must remember that any attempt to compound a losing system will
not turn it into a winning system. So, you must first have a string of wins, or a hypothetical strategy that
produces a string of wins before computing your optimal-f makes any sense.

Once you have a string of winning and losing trades that results in a net winning portfolio, you can then
set out to compute your optimal-f. If you have trouble with Vince’s explanations, I can give you a lesson
in how it works. I even have a spreadsheet I’ve constructed to calculate Vince’s optimal-f.
Sunny’s Ultimate-F
Now, on to my Ultimate-F. Why and how is it different from Vince’s optimal-f? Glad you asked. The
problem with Vince’s optimal-f is that it is highly likely that you will, at some point on this greatly
compounded equity curve, hit a huge (I mean huge) drawdown that will wipe you out. Especially if you
have been taking any of the profits out of your account to live on. The chart in Figure 28.01 shows an
equity stream trading one contract at a time of the EMini S&P, never trading more than one contract.

Figure 28.01—Unit Equity Curve

Notice the Y-Axis scale on the left side of the chart. It goes from 0 to $500,000, and is scalar, not semi-
log. The top profit trading 1 unit contract with this method is about $450,000.
Figure 28.02—Ralph Vince’s optimal-f Equity Curve

Again, notice the Y-Axis scaling on the chart in figure 28.02. Again, sit is scalar, and you can see the
marked drawdown using Vince’s optimal-f method of compounding. What if you had taken some of
the profits off the table just before that last big spike and then hit a drawdown of a billion dollars?

Figure 28.03—Ultimate-F Equity Curve

The chart in figure 28.03 shows my Ultimate-F calculations at work. Notice that while the profit is
astronomically greater than trading unit contracts ($450k vs $18 million) that the drawdown is
negligible.
Figure 28.04—All Three Equity Curves Together on One Chart: Logarithmic

The chart in figure 28.04 is scaled logarithmically. It shows all three methods on one chart. It doesn’t
really have the impact of a scalar chart, as the drawdown for the optimal-f method looks acceptable in
this chart. The spike only shows when you are looking at real dollars. But, at least you can see the
dramatic difference in the end results on this chart.

Figure 28.05—All Three Equity Curves Together on One Chart: Scalar

The chart above, in figure 28.05 shows all three methods on scalar scaling. Here you can see what would
happen in real life with Ralph’s optimal-f compounding method. The only problem is that the half
million in profit from my Ultimate-F method hardly shows on a scalar chart because of the billions of
dollars from the optimal-f method.
I hope you can see the import of the three comparisons. Basically, I’m telling you that trading 1 contract
all the time doesn’t get you very far, very fast. I’m also telling you that using Ralph Vince’s optimal-f will
give you about 90% assurance that you will encounter 100% ruin. And, I’m also saying that I found the
error in Vince’s calculations, and they are implemented in my Ultimate-F spreadsheet, which avoids
most of the heavy drawdown and yet still significantly increases the return.

So, now, how do you use my Ultimate-F spreadsheet? That’s next.

Using Sunny’s Ulti mate - F Spreadsheet


There are only a few cells in this spreadsheet which are unlocked, and available for you to use. The rest
of the cells are locked so that you cannot accidentally change them and thereby ruin the proprietary
equations.

Here are the cells you will need to change:

• Column C: where you will input your trades, either actual or historical through testing. In
column C you will put each trade’s profit or loss, one trade at a time.

• Cell C7: Starting Balance. Here you put the amount of the starting balance either of your
hypothetical account, or your actual account.

• Cell E7: Trial Ultimate-F. This cell is very important. You will substitute several different values
in this cell until you come up with the best fit, and maximum results, for your string of wins and
losses. Do not use any values here that would be less than the margin requirement if you are
trading futures, or the amount to purchase shares of stock if trading equities.

• Cell E8: Minimum Number of Contracts. This cell allows you to start trading with a different
number of contracts than one. Normally, this cell would have a 1 in it. But, if you already know
that you are going to start trading with, say, 5 contracts, because you have enough in your
account to do so, you would put a 5 in this cell.

• That’s it. No other cells can be changed.

• Scroll the spreadsheet down until you get at the end of the list of trades you entered. The last
cell in Column C will contain your most recent trade. In that same row, in Column E, will be
then number of contracts to take on your next trade. In the same row, in Column G, will be the
Ultimate-F compounded equity for these trades.
Figure 28.06—Sunny’s Ultimate-F Spreadsheet

The spreadsheet in Figure 28.06 is split, because it is very long. Note that this method, for this
string of real trades, only trades one contract for a long time. After the string of trades becomes
appropriately profitable, the compounding begins. Note in column E that it goes 5, then 6, then 7
contracts. The compounding method is proprietary, but it ends up with $135,880 for the unit
trading total (1 contract at a time) and $211,170 for the compounded result. It is not huge, because
this system was minimally profitable. But, nevertheless, with Ultimate-F compounding you make
$75,290 more than with unit trading. That is, you make 50% more!

Take a look at the chart, to the right of figure 28.06. You can see the red line is the Ultimate-F
compounded results. They go along about the same for the first half of trading. Then it takes off
and the compounding makes impressive results.
CHAPTER 29: Colors and my Color Function
Sometimes I want more colors for my indicators that are possible in the standard TradeStation set of
colors. My function sjh_f_Colors can be used in Inputs or called from within your routines. The calling
sequence is:

sjh_f_Colors( j_Vendor, ColorName );

where j_Vendor is “TS” for TradeStation and “MC” for MultiCharts


and ColorName is one of the following values:

• “azure”
• “chartreuse”
• “orange”
• “burntorange”
• “goldenrod”
• “rose”
• “springgreen”
• “violet”
• “solaryellow”
• “solarteal”
• “teal2”
• “lightteal”
• “darkteal”
• “cyanish”
• “darkcyan”
• “greypink”
• “solarpinkish”
• “solartaupe”
• “brickred”
• “lightbrown”

These colors are in this order because it is the order in which I created them. The colors that start with
“solar…” are my favorite colors, with solar which relates to sun, which relates to Sunny!

Of course, the TradeStation legacy colors are always available. This function is provided free of charge
to members of my website, www.moneymentor.com. All others, it’s $45.

Let’s say you are an intermediate trader, and you are using SunnyBands. Very smart of you. Like me you
want to overlay two data streams of different timeframes, with two sets of SunnyBands. (I have a video
on my YouTube channel that teaches you how to do this.) If you lay the two SunnyBands on top of each
other without changing the colors, you’ll have a sea of unreadable indicators. So, I use darkgreen for
the faster timeframe SunnyBand’s outer band color. But I use springgreen for the outer band of the
slower time frame.
Likewise, I use darkteal for the inner bands of the faster data and solarteal for the inner bands of the
slower data.

I like the two charts overlayed. It makes trading decisions easier for me. I can, at a glance, spot where
the 1-minute SunnyBands is within the 5-minute SunnyBands. It’s all about fractals.

Just for your edification, here is what my EMini trading chart looks like.

FIGURE 29.01—Colors differentiating 2 sets of SunnyBands


APPENDIX A
Line Thicknesses
Line Thickness or Width

Figure x.x

Thickness Value Sample

6
Color Values

Numb Color TradeStation 4.0 TradeStation 2000i


er and later
1 Black Tool_Black Black
2 Blue Tool_Blue Blue
3 Cyan Tool_Cyan Cyan
4 Green Tool_Green Green
5 Magenta Tool_Magenta Magenta
6 Red Tool_Red Red
7 Yellow Tool_Yellow Yellow
8 White Tool_White White
9 Dark Blue Tool_DarkBlue DarkBlue
10 Dark Cyan Tool_DarkCyan DarkCyan
11 Dark Green Tool_DarkGreen DarkGreen
12 DarkMagenta Tool_DarkMagenta DarkMagenta
13 Dark Red Tool_DarkRed DarkRed
14 Dark Brown Tool_DarkBrown DarkBrown
15 Gray Tool_Gray Gray
16 Light Gray Tool_LightGray LightGray
Some of my favorite color values:
//===== Gold: RGB(153, 102, 000)
//===== BrightGold: RGB(255, 153, 000)
//===== Purple: RGB(102, 000, 102)
//===== Teal: RGB(000, 102, 102)
//===== Steel: RGB(102, 102, 102)
//===== DarkSteel: RGB(051, 051, 051)
//===== RichGreen: RGB(000, 102, 000)
//===== LimeGreen: RGB(102, 204, 051)
//===== ESBlue: RGB(000, 051, 255)
//===== Pink: RGB(255, 000, 153)

Some of my favorite sounds


ChampagneShort 400x75 500x75 625x75

750 1000 ahooga beep beep_01 beep_04

Boing boink bong2 burp buzz Bonk

C5x050 C5x100 C5x200 C5x400 Blip Bong2

ChampagneShort Chime Chord click clock ClosingBell

ClosingBell Corkpop ding doiipp down du_da

electric FastMarket eMiniUP eMiniDN beep_05

G4x050 G4x100 G4x200 G4x400 beep_06

G6x050 G6x100 G6x200 G6x400

goldUP goldDOWN

hiC hiE

lowC lowE

midC midE

ringin ringout Rlipp rolldown Scrape

SOUND104 SOUND105

sparkle Squatt startgun tada up


THE LIST
:
1. sjh_I_DMA (Dynamic Moving Average) Indicator
2. sjh_S_DMA (Dynamic Moving Average) Strategy
3. sjh_DMA Hist (Dynamic Moving Average Histogram) Indicator
4. SunnyBands (DMA + ATRs on either side)
5. sjh_PHW (Potential Hourly Wage) Indicator
6. sjh_Pennants (identifies areas of congestion)
7. sjh_CPC Index (calculates Sunny’s single system measure)
8. sjh_RedLiteGreenLite (for RadarScreen)
9. sjh_Exits$ (optimizable Exits Strategies)
10. sjh_AllAverages$ (optimizable averages)
11. sjh_WhatTimeIsIt (plots/prints the time of the current bar in progress)
12. sjh_DaySessions (paints the day session bars a different color)
13. sjh_ExipirationFriday (paints the 2nd Thursday and 3rd Friday a different color)
14. sjh_DaysOfWeek (paints any day of the week a different color)
15. sjh_SunnyBars (Bars with more volume are painted wider; and open, high, low close
are differentiated by colors)
16. sjh_PrintStatistics (prints the significant stats, from the Performance Report, in the
PrintLog, so you don’t have the Performance Report hovering over your plot area.
17. sjh_UltimateF (calculates the number of contracts to place for the next trade based
on Sunny’s UltimateF compounding theories)

Days of Week
DynamicMovingAverage for Charting
This picture displays the difference between my indicator and those of others. Notice the arrows
pointing to potential areas of whipsaw that other indicators generally lose money on, and my DMA
avoids.
DynamicMovingAverage for RadarScreen
Dynamic Moving Averag
e Strategy
Dynamic Moving Average Histogram
The red and green line, with the black moving average line crossing over it, is the DMAHistogram. The
chart in the upper subgraph is the standard DMA. The lower subgraph shows the DMAHistogram.
SunnyBands

The moving averages in the center are the sjh_DynamicMovingAverages, the purple and the gold
smoothed lines. The gray bands on either side show the input-specified Average True Ranges away from
the DMA. They do a magnificent job of containing the movement of the markets and thus showing the
user likely turning points.

The markets typically don’t move farther than they typically move. So, if you view market movements
by calculating Average True Range, that shows you how far the markets typically move. In my
calculations, I use 1.5 as the multiplier, to show one-and-a-half ATRs away from the DMA average.
When price gets to that extreme, and begins a turn back, that’s a perfect time to take profits, or change
the direction of your trading.

sjh_PHW
PHW stands for “Potential Hourly Wage” which was the genesis of my indicator.

This indicator shows Yellow Dots at significant turning points on the chart. It also calculates the Ideal
Profit and Loss if the program had been able to actually take those trades, and the PHW (which is 40%
of the actual) along with the Buy & Hold amount, the Ideal Number of Trades, and shows the date
ranges over the analysis in question.
sjh_Pennants
Locates areas of congestion. Notice how the market generally has extended moves after a period of
congestion.
sjh_CPC Index
In combination with a Strategy, including the CPC Strategy generates a line in the PrintLog, at the
bottom of the chart, which prints out the CPC Index and all the relevant component statistics.

sjh_RedLiteGreenLite
Works only on RadarScreen. Shows periods where three different time compressions are positioned at
this point in time. When all three are lined up, there’s a high probability of a significant move coming.
sjh_Exits
There is no picture of the Exits on a chart. The important thing to know about this Strategy is that you
can optimize several parameters at once, in combination with your own trading strategy, to find the
best Exits settings. The inputs are shown below.
sjh_AllAverages

sjh_AllAverages comes in both Indicator and Strategy formats. The indicator allows one the facility of
plotting one, two or three moving averages on a chart, from any of the following types:

1 = HarmonicMean
2 = Simple MAV
3 = Exponential MAV
4 = Weighted MAV
5 = sjh_DMA Dynamic Moving Avg
6 = sjh_Solar09 Avg
7 = MACD
8 = KAMA (Kaufman)

Visual inspection will tell you which average you prefer.

The Strategy format for this Indicator allows not only visual inspection, but the independent assessment
using TNP (Total Net Profit) to compare the success of one indicator against another.

It is very convenient to optimize the parameter which chooses the best form of moving average for the
stock, forex, or futures contract you are trading. (Or whatever other instrument you may choose).
sjh_WhatTimeIsIt Indicator
This is something I made for myself to monitor whether or not I’m still receiving data. Sometimes you
sit there and nothing seems to be moving, and then you wonder if your datafeed has gone down. This
is what I use for easing my mind. This indicator prints date, time and current price at the last bar on the
chart. As long as the time is changing, I’m ok. Of course, you need to set Space to the Right to 40 or so.
sjh_DaySessions
When trading the EMini 24-hour contract, but especially when trading FOREX, I need something to tell
me what time of day I’m working in. It is definitely useful to know when trading real-time, but even of
greater important when I’m looking at an historical chart. The Day Session bars are painted blue (or a
color of your choice) and the Extended Session bars are green (or another color of your choice.)

Notice that the “down bars” are red in the daytime and magenta at night.

sjh_Expirations Friday
When trading fast and furiously, I can sometimes forget what day of the week it is, and of especial
import, whether it is RollOver day on my futures contracts. On the chart above, Expiration Friday is
highlighted in magenta bars. But, more importantly, RollOver Thursday is marked in green bars. That’s
the day you’ll change from ESM11 to ESU11 in your trading.

SunnyBars

This strange looking chart is packed with information. You can see the Open, High, Low and Close in
Candlestick formations, but these candles have wider (thicker) bodies depending on how much volume
was present during that bar’s move.

Notice that while the body of the bar changes width with the volume, the extrema (high and low) of
the candle do not change width. That makes it easy to tell when there’s a thinly traded day, and when
there’s a high volume day (or bar).

sjh_PrintStatistics
Maybe it’s just me, but the Strategy Performance Report appears in front of my other charts and it
annoys me. So, I coded an indicator to print all the necessary statistics in the PrintLog window at the
bottom of the Desktop, so I can see what is important, and get the Performance Report off the screen.

This data is all delivered in the PrintLog window at the bottom of the TradeStation Desktop. I much
prefer it to the big, full-of-detail TradeStation Performance Report that stays on top of all your charts.
sjh_Ult
imate-F
Originally based on theories developed by Ralph Vince, this function compounds the number of
contracts to be traded on the next trade. Ralph’s original work had a flaw in it: eventually, after enough
compounding, the system typically hit maximum drawdown and exploded (hit its maximum Risk of
Ruin). I found the error in the math and changed the concept to incorporate my ideas and came up with
a much safer, yet still astounding compounding function. Pictured below are two charts: one that trades
one contract with each trade, and the second that trades compounded quantities based on Ultimate-
F. You can see for yourself the tremendous difference.

Figure—Trading One Contract at a Time


Figure—Letting Ultimate-F Compound the Number of Contracts to Trade

You might also like