0% found this document useful (0 votes)
42 views

SCC Issue 11 Nov 2015

Uploaded by

alypaty
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)
42 views

SCC Issue 11 Nov 2015

Uploaded by

alypaty
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/ 22

Issue 11, November 2015

In this issue:

The Measured
Moves Strategy
Seasonality Bands
Strategy
Ready to expand your TradeStation
horizons with EasyLanguage®?
Creating your own indicators and strategies will give you
new perspectives on markets and on your trading.
TradeStation’s Client Training and Education Department has taught thousands of traders how to use EasyLanguage
and would like to count you among them. We can guide you through all the steps in creating indicators, ShowMe™
and PaintBar™ studies and trading strategies. And if you’re thinking “but I’m not a programmer,” well, most of the
thousands of people we’ve taught weren’t programmers either. But, like you, they were passionate about markets
and willing to spend a few hours working with us to learn.

You’ll be surprised by how quickly you can get up to speed and begin writing your own indicators and trading
strategies in EasyLanguage, and how this will open up a whole new world of market analysis.

Beginners Course Advanced Users Course


For the EasyLanguage beginner, the same course work can be For advanced users, step up to the latest in EasyLanguage by
accessed LiveOnTheWeb and in a self-paced home study course. incorporating objects in your studies and strategies. Here, too, the
same course work can be accessed LiveOnTheWeb and in a self-
EasyLanguage Boot Camp paced home study course.
A two-day LiveOnTheWeb class
$249 SCC Member Price: $124.50 Implementing Objects in EasyLanguage
A two-day LiveOnTheWeb class
Register with promo code ELBC4SCC
$249 SCC Member Price: $124.50
Your instructor will guide you step by step through more than 30 Register with promo code IOEL4SCC
practical exercises covering such topics as creating indicators,
ShowMes™, PaintBars™, and trading strategies, including indicators In this course, your instructor will guide you through exercises using
designed specifically for use with TradeStation’s RadarScreen® the latest in EasyLanguage features, including price series providers,
feature. You will learn how to: timers and accounts providers. These open up possibilities beyond
the already formidable capabilities of conventional EasyLanguage.
• Use inputs for flexibility and optimization
In this advanced course, you’ll learn how to:
• Design indicators specifically for RadarScreen
• Create real-time alerts based on your custom market conditions • Create multi-data analysis in RadarScreen
• Write market, limit and stop orders into strategies • Access real-time account and position updates
• Incorporate money-management exits in your strategies • Place and track real-world orders
• Read and write to Excel files
Exclusive webcast bonus: • Build your own interactive windows
• Ask questions and interact with your instructor in real time
• Review the recordings of the course at any time Exclusive webcast bonus:
• Retake the LiveOnTheWeb class any time it is offered • Ask questions and interact with your instructor in real time
• Review the recordings of the course at any time
• Retake the LiveOnTheweb class any time it is offered
EasyLanguage Home Study Course
A self-paced home-study book
EasyLanguage Objects Home Study Course
$99 SCC Member Price: $49.50 A self-paced home-study book
Complete and return the order form
$99 SCC Member Price: $49.50
This book covers the same range of material as the EasyLanguage Complete and return the order form
Boot Camp, in an easy-to-follow format that takes you through
each exercise in the course, with instructions and explanations. This book covers the same range of material as the Implementing
The book is printed in vibrant color and is spiral bound, making it Objects in EasyLanguage web class, in an easy-to-follow
easy to work through each exercise right on your computer. format that takes you through each exercise in the course, with
instructions and explanations. The book is printed in vibrant color
and is spiral bound, making it easy to work through each exercise
right on your computer.
Contents Issue 11

IN THIS ISSUE
STAFF The Measured Moves Strategy . . . . . . . . . . . . . . . . . . 2
PUBLISHER
The idea for Measured Moves originated as an indicator first presented to
Michael Burke
VP, Client Training and Education
our Stock and ETF Symposium in 2008. The indicator was a tool for gathering
information on intraday percentage price movements. The strategy trades against
EDITOR
these intraday swings.
Stanley Dash, CMT
VP, Applied Technical Analysis
SENIOR CONTRIBUTING EDITOR
Seasonality Bands Strategy . . . . . . . . . . . . . . . . . . . . . . 8
Frederic Palmliden, CFA, CMT Using weekly data, the strategy constructs a seasonal price curve with bands
Senior Quantitative Analyst surrounding the curve. Signals come from moves of the current seasonal pattern
PRODUCTION outside the range of the historic seasonal pattern. This strategy and the supplied
Kristina Hunt indicator allow for observation and testing of seasonality on any markets you
Media Content Coordinator select.

DOWNLOAD FILES
TradeStation Labs
8050 SW 10th Street, Suite 2000
EDITOR’S MESSAGE
Plantation, FL 33324 Welcome to the November 2015 issue of TradeStation Labs’ Strategy Concepts
[email protected]
Club.
All support, education and training services and materials on the We’re pleased to announce that the Strategy Concepts Club archives are
TradeStation website are for informational purposes and to help cus- available issue by issue. If there are any issues that pre-date the start of your
tomers learn more about how to use the power of TradeStation soft-
ware and services. No type of trading or investment advice is being
subscription, they can be purchased from the Back Issues page. We’re preparing
made, given or in any manner provided by any TradeStation affiliate. an “inventory” sheet that we’ll distribute next month.
This material may also discuss in detail how TradeStation is And don’t forget that the Strategy Concepts Club is available in pdf format.
designed to help you develop, test and implement trading strate- The pdf can be accessed via the link on the cover and from the download button
gies. However, TradeStation does not provide or suggest trading
strategies. We offer you unique tools to help you design your own
at the lower left of the flipbook viewer.
strategies and look at how they could have performed in the past. In this issue, Frederic Palmliden, CFA, CMT, and Senior Quantitative Analyst,
While we believe this is very valuable information, we caution
offers a strategy based on seasonality. Using weekly data, the strategy constructs
you that simulated past performance of a trading strategy is
no guarantee of its future performance or success. We also do a seasonal price curve with bands surrounding the curve. Signals come from
not recommend or solicit the purchase or sale of any particular moves of the current seasonal pattern outside the range of the historic seasonal
securities or derivative products. Any symbols referenced are used pattern. This strategy and the supplied indicator allow for observation and testing
only for the purposes of the demonstration, as an example—not a
recommendation.
of seasonality on any markets you select.
Finally, this material may discuss automated electronic order place- My offering is an aggressive contrarian day-trading strategy. The idea for
ment and execution. Please note that even though TradeStation Measured Moves originated as an indicator first presented to our Stock and
has been designed to automate your trading strategies and deliver ETF Symposium in 2008. The indicator was a tool for gathering information on
timely order placement, routing and execution, these things, as well
as access to the system itself, may at times be delayed or even fail
intraday percentage price movements. The strategy trades against these intraday
due to market volatility, quote delays, system and software errors, swings.
Internet traffic, outages and other factors.
On a personal note, I just returned from meetings and presentations in Las
TradeStation Group, Inc. Affiliates: All proprietary technology in Vegas, London, Milan and New York. The interest in TradeStation and in Labs,
TradeStation is owned by TradeStation Technologies, Inc. Equities,
equities options, and commodity futures products and services are
and particularly in strategy trading, was very gratifying. And the warmth and
offered by TradeStation Securities, Inc. (Member NYSE, FINRA, NFA hospitality I received in all those places are greatly appreciated.
and SIPC). TradeStation Securities, Inc.’s SIPC coverage is available
only for equities and equities options accounts. Forex products and
Read on and, as always, thanks for being a subscriber!
services are offered by TradeStation Forex, a division of IBFX, Inc.
(Member NFA).

Copyright © 2001-2015 TradeStation Group, Inc.


Stanley Dash, CMT
STRATEGY CONCEPTS CLUB | 1
The Measured
Moves Strategy
Stanley Dash, CMT
VP, Applied Technical Analysis

BACKGROUND
IS IT POSSIBLE TO GO TOO FAR in the Features
search for simplicity in a trading strategy? u Strategy Style: Mean reversion
Developing and testing even the simplest
u Markets: Equities, futures, forex
ideas may yield useful insights into market
u Trading Horizon: Day trading
action and may even lead to strategies that
are viable in their own right. The Measured
Moves strategy is a very simple, albeit Studies/Files Included
aggressive, approach to day trading. The u Strategy
strategy tracks intraday price swings and u ShowMe
takes positions contrary to the most recent u Workspace
swing in anticipation of a return movement.
The idea behind the Measured Moves DOWNLOAD FILES
strategy dates back to an indicator created
in 2008 for TradeStation’s Stock and ETF
Symposium. The purpose was to gather
statistics on the number of moves each day,
i.e., potential day-trading opportunities that day and the average number of such moves
a market provides. This was done by using over a trailing number of days. A modified
intraday data and having the indicator track version of that indicator, rendered as a
the number of moves of a fixed percent each ShowMe study, is included here.

2 | STRATEGY CONCEPTS CLUB


Figure 1: Tesla Motors (TSLA)
5-minute bars with TSL:Measured
Moves ShowMe and strategy

Note: Dashed lines connect


strategy entries to exits. Solid
lines highlight measured
moves and are inserted by
the TSL:Measured Moves
ShowMe study.

The strategy begins monitoring for measured moves On the second bar of each day and all subsequent bars,
using the day’s opening price as the first benchmark. As the benchmark is reset when either the prior benchmark
ranges are made and expanded, new highs and lows are has been exceeded or a measured move has been
used as new benchmarks. Contrarian trades are taken completed. Under those conditions, the high of the bar
following completion of a measured move from the most becomes the new benchmark for a measured move down
recent benchmark, and then the benchmarks are reset again and the low of the bar becomes the new benchmark for a
so that consecutive swings (and consecutive entries) of the measured move up.
measured amount may occur in the same direction. Profit Additional similar measurements are made for the
target and stop loss levels are then calculated as percent exits. The profit target and stop loss levels are calculated
moves from the entry prices. as percent moves from the entry prices, using the inputs
PTPct for the profit target and SLPct for the stop loss. A
STRATEGY ELEMENTS position may be reversed when a new signal in the opposite
direction is generated before either the profit target or stop
At the core of the strategy lies the manner in which the loss has been reached.
price swings are measured. The opening price of each day
is the first benchmark price used to measure up and down Given the contrarian nature of the strategy, as well as
moves of, for example, 1%. (Magnitude of the measured the method for measuring moves and proactively taking
move is set using the MeasuredMovePct input, described profits (profit targets), it is possible to have consecutive
below.) entries in the same direction against a strong trend.
Although losing streaks were limited in these test results,
Limit orders to take positions are placed at those levels this is a point of risk for this strategy and those of similar
for the second bar of each day: sell short if the market rallies style. (See the Strategy Performance Report Highlights
1% from the benchmark price or buy if the market sells off section below.)
1% from the benchmark price.

STRATEGY CONCEPTS CLUB | 3


Figure 2: Detail of measurements
and signals for Measured Move

Point 1 The TSL:Measured Moves ShowMe study marks the


u Th
 is is the first bar of the day and so the open is the first points at which a measured move has been completed.
benchmark for measuring up or down moves. Completed moves are also identified with trendlines. The
trendlines are, of course, drawn retrospectively; no line will
Point 2 appear until the measured move has been completed.
u A measured move down is completed and a long
position is taken. The new benchmarks are the high
and low of the bar for measured moves down and up, Input Default Description
respectively. Magnitude of the measured moves, in
MeasuredMovePct 1 percent of price
Point 3
Color of ShowMe dot and trendline at the
u Th
 e low of this bar becomes the new benchmark for UpMoveColor Red completion of an upside measured move
a move up since it is lower than the low of the bar at
point 2. Color of ShowMe dot and trendline at
DownMoveColor Cyan the completion of a downside measured
move
Point 4
u Th
 e profit target for the long position is satisfied and
the position is closed (black hash mark). A measured Plot Description
move up is completed and a short position is taken. The MeasuredMove Marks the completion of each measured move (a trend-
new benchmarks are the high and low of the bar for line is also drawn to identify the measured move)
measured moves down and up, respectively.
Point 5 The TSL:Measured Moves strategy has three inputs, all
u Th
 e profit target for the short position is satisfied and the related to the magnitude of the moves for entries and exits.
position is closed.
Input Default Description
Point 6
Magnitude of the measured moves, in
u A measured move down is completed and a long MeasuredMovePct 1 percent of price, for entries
position is taken. The new benchmarks are the high
PTPct .5 Profit target, in percent of entry price
and low of the bar for measured moves down and up,
respectively. SLPct .5 Stop loss level, in percent of entry price

4 | STRATEGY CONCEPTS CLUB


STRATEGY RULES Look-Inside-Bar Back-testing (LIBBT) is used to add
Limit orders are used for all entries and for profit target greater precision to back-testing, especially when testing
exits; stop orders are used for stop loss exits. More detail a strategy that uses so many limit and stop orders such as
about the benchmark prices and measured move calcula- this one. It is also most useful in those cases when more
tions is in the Strategy Elements section above. than one trade is made on a single bar. (As mentioned
above, if multiple trades per bar is a frequent occurrence,
Long Entries then it may be wise to reduce the bar interval.)
u Buy on a limit order at a fixed percent below the bench-
mark price for the current price swing. The fixed percent Input Value
is set using the input MeasuredMovePct. No entries are MeasuredMovePct 1.25
taken on the first or last bar of the day. PTPct .5
Short Entries SLPct 1.5

u Sell short on a limit order at a fixed percent above the


Figure 3: Excerpt from Strategy Performance Report – Performance
benchmark price for the current price swing. The fixed Summary tab
percent is set using the input MeasuredMovePct. No
entries are taken on the first or last bar of the day.
Exits
u P rofits are taken at a fixed percent price move from the
entry price as set by the input PTPct.
u L osses are taken at a fixed percent price move from the
entry price as set by the input SLPct.
u C lose any open positions at the end of the session.

STRATEGY PERFORMANCE
REPORT HIGHLIGHTS
The results below were generated from tests done after some
limited optimization; that is, general ranges of acceptable
inputs were discovered through optimization, but those
below are not intended to be optimal in and of themselves.
All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily
Readers are encouraged to do further experimentation on indicative of future results.
their own.
Testing on other bar intervals is also encouraged.
Total Net Profit
However, please consider how the bar interval and the
MeasuredMovePct value relate. In particular, if multiple u A bout three-quarters of the profits were generated on the
trades per bar is a frequent occurrence, then it may be long side. This is despite the fact that there were distinct
wise to reduce the bar interval. That should help with the bull and bear periods for TSLA during the test period.
processing and accuracy of back-tests. Of course, the strategy was run on 5-minute bars and the
results may have been influenced more by the intraday
characteristics of this particular issue than by the larger
BACK-TESTING SETTINGS
trends.
Symbol TSLA
Trade Size 100 shares
Total Number of Trades
Commissions $.01 per share per side
u The average number of trades per day is approximately 4, a
reasonable rate for day trading. In addition, they are almost
History 1 year ending 8/31/2015
evenly split between long and short positions.
Bar Interval 5 minutes
Percent Profitable
Look-Inside-Bar Back-testing 1 minute
(LIBBT) u This metric is in the desired target range for a strategy of
this type. Of course, traders should know to expect vari-
ance in these and other results when moving from testing
to live trading.

STRATEGY CONCEPTS CLUB | 5


Visit TradeStation Labs
in the TradingApp Store
®

Built by traders for traders, the TradingApp® Store gives TradeStation clients
access to more ideas, strategies and custom trading solutions than ever before.
TradeStation Labs is an active contributor to the TradingApp Store, with dozens
of custom products available for download.
uS
 elect and download any product instantly
Products from TradeStation Labs in the TradingApp Store download directly to your TradeStation desktop platform
in seconds – offering full compatibility and seamless integration.
u I n-house support
TradeStation Labs is a team of technical analysts who work side by side with the platform developers, bridging
the possibilities of what can be done with TradeStation and what you need to realize those possibilities. All
TradeStation Labs’ products are geared to helping you make the most of your TradeStation experience.

TRADESTATION LABS’ FEATURED PRODUCT

Overnight Ranges for Futures


Futures traders, are you
looking for an easy way to
track the overnight high,
low and close – while the
overnight action unfolds
and then through the
following daytime? The TSL
Overnight Range indicator
is designed to make that
easy for you.

The indicator will find and display


these key levels automatically
on your intraday minute-based
charts, marking them with
horizontal lines and putting the numerical values right on the chart where the high or low was made. In RadarScreen®, the indicator
posts the numeric values in the symbol row. Alert criteria are included to let you know when prices are moving outside the overnight
range during the daytime hours. The usage notes fully describe all the user options so you can customize the look, feel and function.

LEARN MORE

6 | STRATEGY CONCEPTS CLUB


Figure 4: Strategy Performance Report - Trade
Analysis tab
All performance results are hypothetical. Past performance, actual or
hypothetical, is not necessarily indicative of future results.

Figure 5: Strategy Performance


Report – Performance Graphs tab
- Equity Curve Line

Max. Consecutive Winning Trades and Max.


Consecutive Losing Trades
u Losing streaks were kept short, especially as compared to
the length of the winning streaks. In the Strategy Elements
section above, reference was made to the risk of consec-
utive entries in the same direction against a strong trend.
Although there is no evidence of that here, it is a point of
concern for this strategy.
The Trade Analysis tab provides more detail on the win-
ning and losing streaks. There was one winning streak of 15
trades along with other extended winning streaks; there were
5 losing streaks of 4 trades. Stated another way, while there
were 5 losing streaks of 4 trades, there were 75 winning streaks
of four or more trades.

SUGGESTIONS FOR IMPROVEMENT All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily
indicative of future results.
As written, the strategy uses the same input values for
long and short entries and exits. Additional testing could
be done by adding an additional set of inputs and using General tab – Position Limits section) would change this
separate values for MeasuredMovePct, PTPct and SLPct rule. It is more aggressive, since it would be in the nature
for different trade directions. of this strategy to add to losing positions. Pursuing this
might also require expanding the stop loss percent and
The strategy might benefit from the inclusion of a
possibly rethinking the exit scheme completely.
breakeven stop. The concept refers to placing an exit stop
at the entry price after some unrealized gain has been
achieved. This is done to keep unrealized gains from
Stanley Dash, CMT is Vice-president, Applied Technical Analysis, at
turning into losses, though there is a risk that the exit
TradeStation. He and his group support active and institutional traders
might be premature. TradeStation supplies a strategy
with analytical tools and education designed to help them become more
component called Breakeven Stop that may be added to
effective traders.
the chart along with TSL:Measured Moves or any other
His Wall Street career began in 1975 and includes time as an active
strategy.
floor trader at one of the leading U.S. futures and options exchanges. Mr.
Traders interested in an even more aggressive ver- Dash has lectured for the New York Institute of Finance and the Institute
sion of this strategy could test it with multiple entries. As for Financial Markets. He is also a Chartered Market Technician and a
documented here, only one position in one direction is member of the Market Technicians Association, where he serves on the
permitted at a time. Enabling multiple entries (Format Editorial Board of the Association’s Journal of Technical Analysis.
Strategies dialog – Strategy Properties for All button –

STRATEGY CONCEPTS CLUB | 7


Seasonality
Bands Strategy
Frederic Palmliden, CFA, CMT
Senior Quantitative Analyst

BACKGROUND
THE SEASONALITY BANDS STRATEGY
Features
builds upon an idea that was first examined u Strategy Style: Trend-following
in a TradeStation Labs Analysis Concepts u Markets: Equities, futures, forex

paper entitled Seasonality: Studying Annual u T rading Horizon: Swing trading


Price Cycles. While seasonal patterns are
traditionally studied in the agricultural
commodity markets by tracking crop
Studies/Files Included
development to harvest time, similar patterns u Strategy
may be found in other asset classes, including u Indicator
equities. In addition, while seasonality is u Workspace
traditionally associated with a longer-term
focus (e.g., monthly data), it can also be used
with a shorter time period (e.g., weekly data), DOWNLOAD FILES
as this article will demonstrate.
This strategy creates bands around
weekly seasonal tendencies, thus taking soybean market, but other markets could also
an approach different from that used in be considered. Finally, a custom indicator is
the aforementioned Analysis Concepts included to more easily track the behavior of
paper. It first sets aside a specified historical the strategy.
period as an initial learning period, without
generating trading signals, then continues STRATEGY ELEMENTS
to add new data as time goes by to help with
the continuous learning process. Bands are The TSL:Seasonality Bands strategy consists
added around the weekly seasonality patterns of two main elements: the year-to-date per-
to generate signals by comparing the current formance of the security and the seasonality
year-to-date data to the historical data. bands around the cumulative performance
Here, the strategy presented is applied to the derived from the historical learning period.

8 | STRATEGY CONCEPTS CLUB


Figure 1: Soybeans Custom Continuous (@S.C=11INN) Weekly Bars with the TSL:Seasonality Bands Strategy

The cumulative performance is the compounded return The TSL:Seasonality Bands custom indicator is pro-
of the weekly average returns for each year. For instance, the vided to help visualize the trade signals. The indicator is used
cumulative performance value for the first week of February with inputs set as listed below.
is the compounded average weekly returns for the year to date
using the average weekly returns for the first few weeks of the Input Default Description
year prior to that point, as derived from the historical data in Number of years set apart for the indicator
Years_Set_Apart 1
the learning period. In a sense, the cumulative performance before indicator signals are generated.
represents the average performance pattern for the year to date Numbers of years from the current year
Years_To_Trade 10
over the historical period. when indicator signals can be generated.

The seasonality bands are constructed using the cumu- Percentage added to the cumulative
lative compounded average weekly returns and two strategy Top_Band 0.14 performance to display the top band (0.14
equals 14%).
inputs in order to specify how wide the bands need to be. The
top band and the low band are calculated by adding two per- Percentage added to the cumulative per-
centages (i.e., Top_Band and Low_Band strategy inputs) to the Low_Band -0.17 formance to display the low band (-0.17
equals -17%).
cumulative performance. Keep in mind that the Low_Band
input value is negative, resulting in the low band being under
Plot Description
the cumulative performance.
YTDPerf Year-to-date performance of the security.
The year-to-date performance tracks the security’s
performance in percentage terms on a weekly basis from the Cumulative performance of the security using all
CumPerf year-to-date average weekly returns up until the point
beginning of each year, which can then be compared to the in the chart.
seasonality bands to generate strategy signals.
Top Band Top seasonality band.
A long entry is generated when the year-to-date perfor-
Low Band Low seasonality band.
mance crosses over the low band or the top band. In a similar
fashion, a short entry is generated when the year-to-date Top Bd HBar Top seasonality band (to display the high bar shading).
performance crosses under the top band or the low band. Low Bd LBar Low seasonality band (to display the low bar shading).

STRATEGY CONCEPTS CLUB | 9


Figure 2: TSL:Seasonality Bands
Strategy Signal Example

For long trades, positions are held until the close breaks The default input values were found, in part, by strategy
the lowest low for a certain number of bars. Similarly, for short optimization and sensitivity analysis. (See the sensitivity anal-
trades, positions are held until the close breaks the highest ysis comments in the Strategy Performance Report Highlights
high for the same look-back period. section.) Applying the strategy to other securities would likely
Figure 2 illustrates an example of a long entry. In this case, require adjustments to the input values.
the year-to-date performance (dark blue line in subgraph 2)
crosses over the top band on the highlighted bar and a long STRATEGY RULES
entry is subsequently generated at the open of the next bar. The TSL:Seasonality Bands strategy was applied to soybeans
Note that the custom indicator does not display a value futures (@S.C=11INN) using weekly bars. However, the
for the last bar on the chart (current week), in order to avoid strategy could be modified to be used on other securities (e.g.,
misalignments between the strategy behavior and that of the other individual commodity futures) using the same basic
indicator. Keep in mind that the strategy only uses the closing principles. The detailed strategy rules are listed below.
price of any given week. A new indicator value is only dis-
played upon completion of the current week. Long Entries
u I f the year-to-date performance crosses over the top sea-
The TSL:Seasonality Bands strategy inputs are dis-
played in the table below. sonality band or crosses over the low seasonality band, buy
on a market order on the next bar.
Input Default Description
Short Entries
Number of years set apart for the strategy
Years_Set_Apart 1 u I f the year-to-date performance crosses under the top sea-
before strategy signals are generated.
sonality band or crosses under the low seasonality band,
Numbers of years from the current year
Years_To_Trade 10 when strategy signals can be generated. sell short on a market order on the next bar.

Trail_Stop_Length 2 Look-back period for the lowest low and Exits


the highest high.
u Exit any long on a market order on the open of the next
Percentage added to the cumulative bar when the close is below the lowest low of the last 2
Top_Band 0.14 performance to display the top band (0.14
equals 14%). bars.
u Exit any short on a market order on the open of the next
Percentage added to the cumulative per-
Low_Band -0.17 formance to display the low band (-0.17 bar when the close is above the highest high of the last 2
equals -17%). bars.

10 | STRATEGY CONCEPTS CLUB


Figure 3: Strategy Performance Report – Performance Summary Tab
STRATEGY PERFORMANCE
REPORT HIGHLIGHTS
The strategy was tested on soybeans futures using a custom
continuous futures contract (@S.C=11INN). This contract
utilizes no back adjustment, and the rollover trigger is one
consecutive trading day of higher open interest. The problem
when using the @S adjusted continuous contract is that some
theoretical trades would not have occurred at the prices listed
in the back-test. As a reminder, the main purpose behind any
continuous contract is to create a longer history than is pos-
sible when using data from just one delivery month; however,
the method of construction of the continuous contract series
should be considered when back testing.

BACK-TESTING SETTINGS
Initial Capital $20,000
Trade Size 1 Contract
Commissions $3.16 per side per contract
History 11 years ending 9/30/15
Bar Interval Weekly

Total Number of Trades = 31


u Th
 e total number of trades is quite low (at just over 30),
which makes it difficult to gauge the reliability of other
performance metrics. Additional time and trading activity
are needed to test the robustness of the strategy. On a more
positive note, the number of trades is evenly split between All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily
long and short trades. indicative of future results.

Ratio Avg. Win:Avg. Loss Figure 4: Strategy Performance Report – Performance Graphs Tab -
u Th
 e average-win-to-average-loss ratio on the long side Equity Curve Detailed
(2.66) is much lower than that on the short side (6.84).
These figures point to the strategy favoring the short
side. However, the winning trades to losing trades on
the long side versus the short side are basically flipped
(10 and 5, respectively, on the long side versus 5 and 11,
respectively, on the short side). This explains why the
strategy performed better overall on the long side versus
the short side.
Percent of Time in the Market = 34.37%
u Th
 e time in the market is very low for a trend-following
strategy. This can easily be explained by the particular
nature of this trend-following strategy, which attempts to
capture seasonal opportunities versus participating in each
market trend.
The equity curve is not especially appealing, with sporadic
jumps in performance associated with detected seasonal
opportunities. The strategy struggled in the initial part of
testing, which could be due to the initial learning phase, but
the strategy seems to have entered another period of sideways
performance for the last couple of years. Also, the equity curve All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily
highlights the fact that there are only a select number of trades indicative of future results.

STRATEGY CONCEPTS CLUB | 11


Visit TradeStation Labs
in the TradingApp Store
®

Built by traders for traders, the TradingApp® Store gives TradeStation clients
access to more ideas, strategies and custom trading solutions than ever before.
TradeStation Labs is an active contributor to the TradingApp Store, with dozens
of custom products available for download.
uS
 elect and download any product instantly
Products from TradeStation Labs in the TradingApp Store download directly to your TradeStation desktop platform
in seconds – offering full compatibility and seamless integration.
u I n-house support
TradeStation Labs is a team of technical analysts who work side by side with the platform developers, bridging
the possibilities of what can be done with TradeStation and what you need to realize those possibilities. All
TradeStation Labs’ products are geared to helping you make the most of your TradeStation experience.

TRADESTATION LABS’ FEATURED PRODUCT

Overnight Ranges for Futures


Futures traders, are you
looking for an easy way to
track the overnight high,
low and close – while the
overnight action unfolds
and then through the
following daytime? The TSL
Overnight Range indicator
is designed to make that
easy for you.

The indicator will find and display


these key levels automatically
on your intraday minute-based
charts, marking them with
horizontal lines and putting the numerical values right on the chart where the high or low was made. In RadarScreen®, the indicator
posts the numeric values in the symbol row. Alert criteria are included to let you know when prices are moving outside the overnight
range during the daytime hours. The usage notes fully describe all the user options so you can customize the look, feel and function.

LEARN MORE

12 | STRATEGY CONCEPTS CLUB


Figure 5: TSL:Seasonality Bands Strategy Inputs Sensitivity Analysis Figure 6: Strategy Performance Report – Trade Graphs Tab – Total Trades

All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily
indicative of future results.

(see the additional notes in the next section). Relatively large


All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily
drawdowns were seen in the tested period. The volatility of the indicative of future results.
equity curve translated to a maximum weekly drawdown of
about 40%.
As in previous articles, instead of analyzing one SUGGESTIONS FOR IMPROVEMENT
strategy input in isolation, data from TradeStation’s Strategy The TSL:Seasonality Bands demonstrates how seasonal
Optimization Reports can be used with Microsoft Excel to opportunities can be detected by comparing the year-to-
perform sensitivity analysis between two strategy inputs at the date performance to the cumulative compounded weekly
same time by creating a 3-D chart. For instance, an exhaustive average returns of a security. The strategy also reveals multiple
Strategy Optimization Report can be run on the Top_Band challenges associated with this type of strategy. For one thing,
and Low_Band strategy inputs, and the resulting data can be additional testing would be required to see how robust the
used to create a surface chart in Excel. strategy is (11 years of data only produced about 30 trades).
Figure 5 illustrates the impact on the back-tested net Another area of concern is the large contribution of certain
profit when the Top_Band and Low_Band input values trades to the overall net profit. This is fairly common for
change. The back-tested net profit is not especially stable trend-following strategies to some degree, but the magnitude
when the two input values change. Notice that the surface of the winning outlier in this case is particularly large (see
reveals two distinct ridges along the back of the chart. The figure 6). The outlier contributed roughly one-third of the
chosen default values for the two inputs are away from the gross profit and roughly half of the total net profit in the back-
peak values (see back corner of the chart where the Top_Band tested period.
equals 0.07 and the Low_Band equals -0.17). Instead, the The strategy also reveals the overall challenge of
values were selected from an area where net profit stays incorporating seasonality into strategy trading where defined
somewhat more consistent (when the Top_Band input is rules are mandatory (versus discretionary trading). While
0.14 and the Low_Band is -0.17). Overall, the surface is not seasonal trends can be observed over time for a particular
especially appealing, with large drop-offs in net profit with security, the performance in any given year can be quite
small variations in the input values. different from the average performance.

Frederic Palmliden, CFA, CMT, is Senior Quantitative Analyst at TradeStation. As part of the TradeStation Labs team, he designs custom strategies,
indicators and related educational content for TradeStation publications. In addition to being a Chartered Market Technician (CMT), Frederic holds the
Chartered Financial Analyst ® designation and has 15 years’ experience in the financial services industry, ranging from research and asset allocation
strategies to proprietary trading. Frederic is also trilingual in English, French, and Swedish.

STRATEGY CONCEPTS CLUB | 13


Ready to expand your TradeStation
horizons with EasyLanguage®?
Creating your own indicators and strategies will give you
new perspectives on markets and on your trading.
TradeStation’s Client Training and Education Department has taught thousands of traders how to use EasyLanguage
and would like to count you among them. We can guide you through all the steps in creating indicators, ShowMe™
and PaintBar™ studies and trading strategies. And if you’re thinking “but I’m not a programmer,” well, most of the
thousands of people we’ve taught weren’t programmers either. But, like you, they were passionate about markets
and willing to spend a few hours working with us to learn.

You’ll be surprised by how quickly you can get up to speed and begin writing your own indicators and trading
strategies in EasyLanguage, and how this will open up a whole new world of market analysis.

Beginners Course Advanced Users Course


For the EasyLanguage beginner, the same course work can be For advanced users, step up to the latest in EasyLanguage by
accessed LiveOnTheWeb and in a self-paced home study course. incorporating objects in your studies and strategies. Here, too, the
same course work can be accessed LiveOnTheWeb and in a self-
EasyLanguage Boot Camp paced home study course.
A two-day LiveOnTheWeb class
$249 SCC Member Price: $124.50 Implementing Objects in EasyLanguage
A two-day LiveOnTheWeb class
Register with promo code ELBC4SCC
$249 SCC Member Price: $124.50
Your instructor will guide you step by step through more than 30 Register with promo code IOEL4SCC
practical exercises covering such topics as creating indicators,
ShowMes™, PaintBars™, and trading strategies, including indicators In this course, your instructor will guide you through exercises using
designed specifically for use with TradeStation’s RadarScreen® the latest in EasyLanguage features, including price series providers,
feature. You will learn how to: timers and accounts providers. These open up possibilities beyond
the already formidable capabilities of conventional EasyLanguage.
• Use inputs for flexibility and optimization
In this advanced course, you’ll learn how to:
• Design indicators specifically for RadarScreen
• Create real-time alerts based on your custom market conditions • Create multi-data analysis in RadarScreen
• Write market, limit and stop orders into strategies • Access real-time account and position updates
• Incorporate money-management exits in your strategies • Place and track real-world orders
• Read and write to Excel files
Exclusive webcast bonus: • Build your own interactive windows
• Ask questions and interact with your instructor in real time
• Review the recordings of the course at any time Exclusive webcast bonus:
• Retake the LiveOnTheWeb class any time it is offered • Ask questions and interact with your instructor in real time
• Review the recordings of the course at any time
• Retake the LiveOnTheweb class any time it is offered
EasyLanguage Home Study Course
A self-paced home-study book
EasyLanguage Objects Home Study Course
$99 SCC Member Price: $49.50 A self-paced home-study book
Complete and return the order form
$99 SCC Member Price: $49.50
This book covers the same range of material as the EasyLanguage Complete and return the order form
Boot Camp, in an easy-to-follow format that takes you through
each exercise in the course, with instructions and explanations. This book covers the same range of material as the Implementing
The book is printed in vibrant color and is spiral bound, making it Objects in EasyLanguage web class, in an easy-to-follow
easy to work through each exercise right on your computer. format that takes you through each exercise in the course, with
instructions and explanations. The book is printed in vibrant color
and is spiral bound, making it easy to work through each exercise
right on your computer.

14 | STRATEGY CONCEPTS CLUB


Fall 2015

Williams E-mini
Influx Strategy
Williams E-mini
Influx Strategy
Strategy provided by Larry Williams

Documentation by Michael Burke


VP, Client Training and Education

BACKGROUND Features
ACCORDING TO LARRY WILLIAMS, “This u Strategy Style: Cycles
is a concept derived from market behavior, which u Markets: Stock index futures, ETFs
I developed into a strategy many years ago based
on the work and observations of Art Merrill, and
u T rading Horizon: Swing trading
it has stood up pretty well to the test of time with
just a few minor modifications along the way.” Studies/Files Included
The Williams E-mini Influx strategy was u Strategies
developed by renowned trader, author, educator u PaintBar

and money manager Larry Williams, who has u Workspace


taught his common-sense approach to trading to
thousands of traders all over the world. He is also DOWNLOAD FILES
well known for creating many industry-standard
indicators and winning the Robbins World Cup
Futures Trading Championship. Larry uses STRATEGY ELEMENTS
TradeStation to develop, test, and automate his
trading strategies. He also offers trading strategies At the heart of the E-mini Influx strategy is
for lease in the TradeStation TradingApp® Store. the calendar. This is crucial, since the goal is
The Williams E-mini Influx strategy is a long- to capture a rally based on asset flows into
only strategy based on buying the E-mini S&P equities at the beginning of each calendar
500 futures (ES) around the first of the month. month. Several other elements are then used
That is often when mutual funds have an influx of to filter out signals that may not have enough
capital to invest in stocks. With so many mutual time or price potential for a trade to work out
funds concentrating their trading activity around favorably.
the same time each month, there is potential The strategy begins by evaluating its
opportunity to capitalize on a short-term market trading conditions for a signal on the first
move as fund managers put inflows to work. trading day of each month and continues

16 | STRATEGY CONCEPTS CLUB


Figure 1: E-mini S&P 500 futures (ES), daily bars with Williams E-mini Influx strategy, Williams E-mini Influx Days PaintBar and %R indicator

monitoring the conditions on each bar as long as there are An examination of several potential signals may be
at least 19 trading days remaining in the month. This means helpful. In figure 2 below, all daily bars that are at least 19 days
that some months will have several possible signal bars each from the end of the month (potential signal bars) are painted.
month and others will have only one. If the conditions are The PaintBar is called TSL:Williams E-mini Influx Days and is
met, a limit order is placed for the open of the next bar, which included with this article.
will then be the entry bar if the limit is filled. (Readers will uA
 t A, the potential signal bar is a down day. No signal is
recall that the term “signal bar” refers to the bar on which the generated.
entry or exit conditions are satisfied; “entry bar” refers to the
uA
 t B, the first potential signal bar is a down day. The
bar on which the trade is made.)
second and third are up but %R is above 85. No signal
These additional conditions act as filters and are also eval- is generated.
uated on the potential signal bar:
uA
 t C, the first three potential signal bars are up days,
u Th
 e close must be greater than the close of the previous but %R is above 85. On the fourth bar %R has retreated
bar. but it is a down day. No signal is generated.
uW
 illiams %R must not be overbought, so as to avoid a uA
 t D, the first and second potential signal bars are
long entry into an already overbought market. A %R down days. The third is an up day and %R is below 85.
level below 85 is used by default. A limit order is filled on the next bar.
u Th
 e signal bar must not be a Thursday; that is, no The E-mini Influx strategy features two exit rules that
entries are taken on the Friday daily bar (which is the bracket the market.
Thursday evening opening for ES futures). The profit exit rule requires that a position be held for a
uF
 inally, trades are restricted to only 1 per month. minimum number of bars with 1 as the default. Following

STRATEGY CONCEPTS CLUB | 17


Figure 2: Selected potential signals from Williams E-mini Influx strategy on ES, daily bars

that minimum holding period, a position is closed at the first The inputs for the TSL:Williams E-mini Influx Exit
profitable daily bar close. strategy:
The strategy also uses a dollar-based stop-loss exit that Input Default Description
is active from the bar of entry. The stop level is calculated as
StopLossPct 2.5 Stop loss as a percent of the contract value
a percent of the contract value. The default is 2.5%, which is
approximately $2,500 at current price levels. This results in HoldDays 1 Minimum number of bars to hold the position
before the profit exit becomes active
a relatively high dollar risk and is done in order to give each
trade enough room to achieve a profitable result. Although
this high stop-loss value results in a higher percentage of As shown in figures 1 and 2, the TSL:Williams Emini
profitable trades, there is the risk that a string of losing trades Influx Days PaintBar study may be used to visually iden-
could result in a significant account drawdown. tify potential signal bars early in each month.
In order to exit at the close of the bar for back-testing
purposes, the entry and exit rules have been separated into Input Default Description
two strategy components that may be inserted into a chart Bars with this many or more days left in the
simultaneously to create the complete strategy. DaysLeftToPaint 19
month will be painted

The inputs for the TSL:Williams E-mini Influx strategy:


Plot Description
Input Default Description
Bars are painted when they are at least DaysLeftToPaint
Trades are not taken if %R is above this SignalBar?
PctRVal 85 days from the end of the month.
level
PctRLen 8 %R look back in bars

18 | STRATEGY CONCEPTS CLUB


Figure 3: Strategy Performance Report – Performance Summary tab
STRATEGY RULES
Long Entries
u Th
 e following conditions are required to generate a signal:
u Th
 ere are at least 19 trading days remaining in the
calendar month.
u Th
 e bar closes higher than the previous bar.
uW
 illiams %R is less than 85.
u I t is not a Thursday.

uW
 hen these conditions are met, a limit order is placed
to buy on the next bar at a price equal to or better than
the next bar’s opening price.
P
 lease keep in mind that the opening time of the daily
session for E-mini S&P 500 futures is 6 p.m. ET.
Exits
u Sell at the first profitable close after the position has been
held for at least 1 bar.
u Sell on a stop 2.5% below the entry price, as calculated
from the closing price of the bar.

STRATEGY PERFORMANCE
REPORT HIGHLIGHTS
BACK-TESTING SETTINGS
Trade Size 1 contract All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily
indicative of future results.
Commissions $2.36 per contract, per side
Slippage $2.50 per contract, per side Ratio Avg. Win:Avg. Loss
History 9/11/1997 to 9/1/2015
u A lthough this appears weak at .42, the trade expectancy
holds up well when this metric is combined with the win
Bar Interval Daily
rate cited above. However, an overdependence on the
win rate may be a vulnerability of the strategy.
The strategy was tested on ES using the custom continuous
futures contract (@ES=107XN), which is the closest replica- Max. Consecutive Losing Trades
tion to the CME roll. This custom continuous contract utilizes u A
 strategy with a high Percent Profitable will often show
no back adjustment and the rollover trigger is seven trading only short losing streaks. In this case, the strategy’s longest
days prior to the expiration date. losing streak was only 3 trades, accounting for the largest
drawdown during the back-test. (See figure 4 below for
Total Number of Trades analysis of the trade series.)
u Th
 is strategy tests well in many different types of market
conditions over the past 17+ years of this back-test. There Avg. Bars in Winning Trades, Avg. Bars in Losing
Trades, and Percent of Time in the Market
were 115 trades, or about 7 trades per year. .
u Th
 e average holding period for both winning and losing
Percent Profitable trades is less than 3 bars per trade and the Percent of
u A situational strategy like this should be able to identify Time in the Market (not shown) is 3.72%. This shows a
more winning trades than losing trades and this metric, at modest commitment of both trading and psychological
80%, bears this out. capital.

STRATEGY CONCEPTS CLUB | 19


Figure 4: Strategy Performance
Report – Trade Analysis tab

All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily indicative of future results.

Figure 5: Strategy Performance Report – Performance Graphs tab – Equity Curve Line

SUGGESTIONS FOR
IMPROVEMENT
The HoldDays input allows the trader to
control the number of days the strategy waits
until the first profitable close exit becomes
active. Typically, more hold days equals more
risk and may result in both slightly more
profitable trades and larger drawdowns. A
greater number of HoldDays may also require
an adjustment to the StopLossPct input so
that the stop loss exit does not get hit more
frequently.
There may be some value in researching
additional technical filters to refine the
entry condition. For example, a long-term
moving average filter may have reduced the
drawdowns during bear markets, though it
would probably delay trading again as the
market turns bullish.

All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily indicative of future results.

Larry Williams has been a trader and market researcher since the mid-1960s and is the author of numerous books and a speaker at major investment
conferences throughout the world. Currently his time is spent in full-time trading and research. Mr. Williams has created numerous market indicators
including Williams % R, the ultimate oscillator, COT indicators, POIVI (a combination of price open interest volume accumulation indicator), synthetic
VIX indexes that have applications for all markets, and pioneered the use of the Kelly ratio for money management. He has won the Robbins World Cup
trading championship, trading $10,000 to over $1 million in real-time with this money management technique.

20 | STRATEGY CONCEPTS CLUB

You might also like