Now Reading
Building Trading Systems – part 4 – Entry and Exit techniques and system optimization
8191 2721 109

Building Trading Systems – part 4 – Entry and Exit techniques and system optimization

by ScottMarch 14, 2014

This is Scott Phillips. I’m taking over from Mole for a week, attempting to impart what I know about system design and trading for a living.

Yesterday, to recap, we talked about choosing an edge based on a known property of markets that you have an affinity with (everybody has favorites) and working out which market types it works in and which market types it does not. If you don’t know which market types your system works in the best you can ever hope for is mediocre performance, which comes down to small edges, long drawdowns, and systems not suitable for trading at R values of 2% or above. If you think your edge is universal and works all the time you are being foolish. Markets are hard to beat because they change constantly in fractal ways. By aligning your approach with the current market type you not only increase your overall winning edge but your edge becomes REPEATABLE and CONSISTENT. If there is one thing the pros in any field have it is repeatability and consistency. Any weekend golfer can hit a birdy but Tiger Woods can do most of the time.

Some other edges I forgot to mention

  • Opening gaps are an edge
  • Breakouts are an edge
  • Failed Breakouts are an edge
  • Implied Volatility is an edge
  • Market Internals are an edge
  • TICK and TRIN are an edge
  • Mole’s Zero indicator is an edge
  • Sequences of unbroken series of highs and lows is an edge
  • Consecutive Up/Down closes is an edge (but a thin edge)
  • The shape of the most recent candle is an edge
Which of the following 2 edges do you instinctively think performs better?
  • Edge A Trading a Donchian Channel breakout on a 60 min chart?
  • Edge B Trading a Donchian Channel breakout on a 60 minute chart only in the direction of the higher timeframe trend where the 240 minute, daily and weekly charts were trending AND where volatilty, measured as bollinger bandwidth has painted the lowest low in 100 bars in the previous 10 bars?

Which of the 2 edges do you think will be more consistent? Which of the two edges do you think will have longer streaks of winning trades? Losing Trades? Which of the 2 systems do you think is more likely to fall apart if the market type changes?

I see many people in the comment section defending their existing systems and proposing random stuff they read on the internet. What I am showing you here are fundamental truths about market systems – NONE OF THEM, none of them at all, work all the time. None of them work the same, or just as well in trending or sideways markets, or low and high volatility markets. You can do decades of backtesting, and because of the skew of the last 30 years containing mainly bull moves, you will get backtest results which will not match up with the reality of forward testing. I am also showing you some fundamental truths about markets in general and trading

  • Systems based on real market principles are far more likely to work and test better when they do than those which are not
  • Systems optimized for a particular market type produce results orders of magnitude better than “one size fits all” systems
  • If you have a system which works it will work DRAMATICALLY BETTER once you understand what market types it does not work in!
  • You might have 10 bad system ideas before you have one good system idea. Therefore it is better to test in a minimal way to separate wheat from chaff
  • You should not use price based indicators to confirm price based indicators – It’s like asking your Mother if you are handsome 😉

I see in the comment section of the previous post people complaining that the methods of testing targets are arbitrary, and yes they are and those are NOT your final exit parameters. The method of “quick testing” I advocate for preliminary testing of an idea allows you to spend an hour instead of a month to quickly test an idea and decide if it is worth further investigation. There are a lot of blind alleys in system building and because human nature is to get attached to our own ideas we don’t want to let them go once we have spend a month on them. Let’s assume that you have an idea you think might be good, preliminary testing bears that out, now we have to get into the weeds and spend a lot of time building a system around it. This is non-trivial, it will take you a few weeks minimum, so it makes sense to do a lot of quick paper testing to separate the good ideas from the useless ideas before you get to this stage. Even if you are a good programmer, I still advocate pencil and paper testing initially for everything. It gives you a deeper understanding of the edge at the initial stages, and allows time for your market intuition to bubble up pertinent insights. Backtesting is a useful technique, but most system builders do WAY TOO MUCH OF IT. Of my two systems which Mole provides. Crazy Ivan was developed with extensive backtesting. Heisenberg was built with NO BACKTESTING AT ALL. Absolutely none. Zero. Objectively, on any measure you wish to name, Heisenberg is the superior system.

Entry Techniques – Pros and Cons

Conceptually you have 4 choices

Entry Technique 1 –  Entering on a Stop or StopLimit when the market moves in your favor

The advantage of waiting until the market moves in your favor is that it increases the edge ever so slightly before you get in. Also, if you can place your entry point where other traders place their exit point you can get a little boost from the other guy getting his stops run. This is a very good choice for 5 min chart index traders, also a good choice for traders trading trending markets. One good point about using this technique is that if you are entering on the break of a high (to go long) of a bar, the obvious place to place your stop is just below the low of that bar. Your system will benefit from a logically chosen and not arbitrary stop (though you may want to add a minimum stop distance, abnormally small stops are statistically likely to be hunted as the market noise overwhelms signal. For intraday trading on 60 min charts my experience is that stops around 1.5 times the 15min ATR(14) are optimal and have a better expectancy (Thanks to my friend Frank Bormann for extensive research on this). One particular thing I have noted is that the Asian session FX markets contain substantially more noise and less signal, though remaining very tradeable (most of my trading is intraday FX during Australian market hours). I make my stops several pips wider during the Asian session, to make up for low volume and larger spreads.

This technique is totally unsuitable for trading range bound or choppy markets, it will get your ass handed to you. The disadvantage of this method is that you are entering later, trading some profit for greater certainty.

See the “cheat sheets” above for more detail.

Advanced Technique (Ivan Krastins) – Entering on the Break of a Candle which is confirming your view

This is a powerful and useful technique for entering a trade and filtering many bad trades. Any hammer candle (see cheat sheet above) is a failed attempt to drive the market down (and vice versa with it’s inverse the shooting star). In a strong bull move it is a fundamental and demonstrable principle of markets that most attempts to drive the market down will fail. Every time the bears attempt to drive the market down, they will be forced to cover their shorts at some point. A significant number of them will cover on a break of the previous high, driving the price further up. Especially after hours, even more traders will wake up to the next trading day, find their positions moved against them, and cover in a panic, driving prices further up. This technique works on all timeframes, but is particularly potent on daily charts. Be aware that it has little value *except* in a two situations. Firstly, a strong trend (see previous post for ideas on how to filter for strong trends, you could look for multiple timeframes, high SQN, moving averages in alignment, above a long term MA, making higher highs and higher lows), and secondly, at support, for example at bollinger support or trendline support. This technique is the basis for a system which I currently have in development which so far tests extremely well. Ivan also has setups based on this technique called the Trend Trade, which I simplified and modified for the CrazyIvan system. See the cheat sheet above for a full discussion.

Example of How You Might Build A System Around This Principle

This is not a current system of mine, just a random idea which I am highly confident would work as a system. I hope you are all getting the concept that because I am basing my systems on things I know are true about markets they are far more likely to be workable as systems. People who build systems based on backtests are in almost every case curve fitting. It is simply easier to start with the solution and work backwards!

Idea: In the very strongest and smoothest trends an early EMA is going to act as resistance. I spend a few hours looking at various “strong trends” with many EMA’s up on the screen (6,8,10,12,14) noting the SQN (measure of trend strength) of each one and looking for patterns. I settle on the 9 exponential moving average as being a common place for retraces to stop in bearish trends which are SQN(100) -.5 or less. After looking at preliminary results I can see that around half the time my edge works, sometimes making for big winners where my initial stop is never touched. This looks promising and I look at the losing trades from my small sample of 50 trades and go back and look at the trend direction on higher timeframes – I note a pattern that half the losing trades come from times where the daily and 60 min trend are in opposite directions. By filtering so that I only take trades with multiple timeframes aligned I increase my edge. If you have an edge which is marginal, quite often you can switch it into “acceptable” territory by using this technique.

Example – Bollinger Breakout


Entry Technique 2 – Entering at market when your system parameters line up.

As a general rule I do not favor this technique, but very well composed and emotionally serene people may find it suits them. My experience is that I become slightly anxious trying to get the best fill and it is better for my emotional state to enter on limit or stop

Entry Technique 3 – Entering at a Limit order>

As a general principle for sideways markets entering on a limit order is optimal. I make it a personal rule never to chase the market, and if my limit orders are not filled I try and find acceptance around that. Chasing the market, even by one or two ticks, over time eats away at your account.

Entry Technique 4 – Entering on bar close

This is particularly good for traders who wish to base entries on daily charts and not day trade

Concluding Thoughts on Entries

Don’t get too wrapped up in entries. In systems for range bound markets lean towards entering on a limit. In systems for trending markets you have a choice which depends on your personality. If your edge is shallow you can increase it by adding an additional requirement for a nice looking candle, or candle pattern before you enter. A deep understanding of price action reading in context can help here, and for that I recommend Al Brooks series of videos and books (though not his first book which is incredibly poorly written and recovered in his later 3 volume series). Also Ivan Krastins, member of this community, has many deep insights about the nature of price action, and his site is worth a visit.

Chuck Lebeau Concept for preliminary testing of Entry Techniques

This is not a technique which I use personally, but other system designers I know use this to quickly test and filter whether a given entry technique is useless or has validity. His idea is to estimate the period you want to trade, and test time triggered exits after similar results. For example if you have a system where most trades last 1-4 Bars (like for example CrazyIvan) you might want to test Period1 Period2 Period3 Period4 and Period5 exits. A strong edge should be around 55% in this raw, unoptimized state.

Exit Technique – The Difference Between Professionals and Amateurs.

Amateurs think about entries, professionals think about exits. Amateurs are always looking for a better entry technique. Professionals know that nothing in the markets gets really certain, and the biggest difference to system performance is in the exits.

Most of the methods which are recommended by the “experts” are very wide trailing stops, which give back way too much profit at the end of the trade. It is quite heartbreaking to watch profit in a winning trade evaporate, and this can affect trading emotional state going forward. Many of the old school trend following systems use 3 times the 7 day Average True Range as a stop and in my opinion this is way too large.

You have big decisions to make

  • How wide is your initial stop?
  • How soon do you move your stop to breakeven or close to breakeven to protect profits?
  • When do you bank partial profits, if at all, and why?
  • How loose do you trail a stop?
  • Do you take profits on a target or a trail?

All of these decisions have a lot of moving parts and many permutations. Most of us get confused. Here is how I personally answer those questions

1) How wide is your initial stop? I do my preliminary testing either on an ATR based stop or a break of the high or low of the setup candle. For smaller timeframes where there is more noise: signal ratio initial testing of 1.5 times the 15 minute ATR is a good enough place to start. For testing scalping systems on highly liquid markets (think bonds and eminis) the standard exits to test are 4 tick stop 4 tick profit and 4 tick stop 6 tick profit.

What I do is measure the MFE (maximum favorable excursion) of my winning trades and plot a histogram of them using a spreadsheet (google spreadsheets is fine). I use COMMON SENSE when I do this, so it is not suitable for computers and software. What I mean is that lets say I have a trade which makes 3R and then pulls back to breakeven, and then shoots up to 5R, in the real world I would not still be in that trade so I would count it as a 3R MFE not a 5R.

You want to measure 3 things

  • Maximum Favorable Excursion of winning trades defined as trades which make over 1R
  • Maximum Retracement as a percentage
  • Maximum Retracement in R (using common sense)

Add them to a spreadsheet, then sort them and plot as a histogram. I have done this with my winning trades of the last 2 weeks as an example here Your sample size should be at least 50 winning trades to be statistically valid. These are the winning trades from the 18 trades I personally took over the last 2 weeks.

Points to Note:

The more your edge is based on a real property of markets and not stupid curve fitted bullshit the easier it will be to optimize for exits. The more it is based on ONE SINGLE PROPERTY OF MARKETS AND NOT A BUNDLE OF THINGS YOU TRY AND USE ALL THE TIME the easier it will be to optimize. You can see very clearly why I insisted on building your edge based on properties of markets, rather than statistics showing you have an edge based on backtesting. Nice smooth easy to optimize curves? Get it? This is a simple trend following system based on a volatility breakout which I trade every day. Even with a very small sample size it is obvious that this is a real system that behaves in A REPEATABLE AND PREDICTABLE WAY. REPEATABLE AND PREDICTABLE is going to equate to higher system quality numbers. Random looking but with an overall edge is going to equate to shit system quality numbers.

Here we can see that of 11 winners 4 of them made 1.2-1.5R. We also see the nice smooth gradient after 1.2R up to 6R. Some things should be immediately obvious. Optimizing my exits to try and catch 5 and 6 R winners is obviously suboptimal for this system. However it seems quite reasonable to try and catch a decent chunk of the 4R and above winners, which happen about 36% of the time.

One other thing to note: We can see that the median (the middle) of the range of winning trades is approximately 2.5R. This tells us that THE INITIAL STOP IS PRETTY GOOD. Our normal winning trade is 2.5R so that means we have a risk/reward ratio which is better than 2:1

Let’s test a few arbitrary limit exits. If our entry has potential most of the exits (except for the extremes) will look similarly good with small variations. This principle is from Eckhardt and is very useful. If you have a limit exit at 1.5R testing extremely well but everything else testing negative or marginal your edge is garbage and needs to be rethought.

What is very clear is that exiting on a limit at 2.5R would maximise the R return, and thus the expectancy over the 18 trades. However that is a HUGE MISTAKE. We would go from having 11 out of 18 winners (61%) to having 7 out of 18 winners at 38%. As a general proposition win rate is the least important part of a trading system, but a system with 62% losers is going to have to endure huge series of losses and dramatic drawdowns, meaning that it is going to be unsuitable for trading with R values over .5%. I prefer to trade high quality systems with very shallow drawdowns than shitty systems with long and deep drawdowns. So should you.

The effect on expectancy on different limit exits is shown below, assuming all losses are -1R. You should be able to take the best result and improve on it substantially by optimization. By way of comparison my production systems, optimized, test in the 3.7 range on SQN(100). Here we see that a limit exit of 1.2R is going to get us .29 expectancy and 3.17 SQN(100). This is not bad, pretty damn good actually. In the production system the optimization takes this to Expectancy .5 and SQN(100) of 3.7. So these initial limit exit numbers give us a benchmark of baseline performance and let us know where is the sweet spot for banking partial profits.


This is extremely important. Pay attention.

Because the sweet spot in SQN terms is exiting on a limit at 1.2R we can smooth the equity curve and reduce the standard deviation by BANKING PROFITS AT THE SWEET SPOT ON THE LIMIT EXIT SQN CURVE. This is critical, and needs to be absorbed. You could bank 1/4 or 1/2 of your position at this sweet spot, or more importantly you know the different numbers you should be testing for on your forward test. You can then either go back through your last trades, or walk forward testing a new series of trades, using a spreadsheet to work the difference in different exit strategies on overall SQN.

Every system is different! Once I understand objectively how my entry behaves I can now use my spreadsheet to play with various combinations of partial exits and trailing stops initiated at various points, depending on what I want to achieve.

On Surviving Retracements

The maximum retracement you can stand bearing has to be closely matched to your personality and the level of psychological trauma you have previously suffered in your trading life. It might be mathematically optimal to allow a 3.9R winner to evaporate into a -1R loss, but in the real world those kinds of equity swings play havoc with your ability to trade at a high efficiency. There are those who say “just man up and follow your rules” but invariably people who are dogmatic about that stuff have rules which bank comparatively early where it is emotionally comfortable to do so. If you are going to shoot for the big winners there are both emotional and technical advantages to banking some profits along the way.

Question: Based on this histogram – where do you think I should bank some profits? Why?

As a general rule if you want to catch enough of the big winners to justify optimizing to catch those winners (which by definition will be suboptimal for small winners) you have to be prepared to endure at least a 50% retracement of the move at some point. Because of this there is an enormous advantage to trend following systems to entering BEFORE a rise in volatility, rather than the conventional wisdom breakout trades which often get you in quite late. The alternative if you wish to build breakout systems (which are good systems) is to filter the breakouts for only the STRONGEST breakouts, which by definition happen after EXTREMES of low volatility.

Another fundamental concept of markets is that it is EXTREMELY COMMON for markets to backtest breakout points. If you are trading any system which is relying on trend continuation after a breakout if you move your stop to breakeven too early you will be taken out enough of the time to have an adverse effect on performance. This is the perfect example of using market principles that we all know are demonstrably correct, rather than endless computer fitting.

Pay Attention – This is the KEY to designing effective exit algorithms

No one type of stop is going to give you anything like decent performance overall. The correct thing to do is to choose 4 or 5 or more different types of stops and have them in a race to take out your trade.

  • Limit Exit at a target in sideways markets at resistance (bollinger,trendline, market profile)
  • Multiple Closes outside the bollinger band exit (suggest 2 or 3 consecutive closes outside bollinger exit on close)
  • Time Based Stop – If your trade hasn’t made 1R by x bars then exit
  • Chandelier Stop – Hang from the highest price yet achieved in the trade
  • ATR Stop
  • Spike Low Stop – This is very valuable for strongly trending markets
  • Trailing Stop – In ticks, in R or in multiples of ATR
  • Sign of Strength or Sign of Weakness stop. If you get long on a breakout you do NOT want to see a strong down bar within a few bars of entry.
  • Modified Spike Low Stop (inside MA) Only count spike lows which are deep enough to pierce a Moving Average or linear regression you like
  • Trend Reversal Exit – If you have a favorite technique for indicating a new trend is starting in the opposite direction, you can use this as a signal to exit a trade. This is particularly powerful if you are in, for example a daily chart trade and you have a 4hr signal in the opposite direction.
  • Percentage of Maximum Favorable Excursion Stop
  • Parabolic SAR Stop – Welles Wilder Designed this stop which gets tighter and tighter as time goes on
  • Indicator Stop – One of the most effective stops for trending markets (applied in conjunction with other stops) is a bollinger bandwidth stop

That is so important I’m going to repeat it. It is KEY to building systems.

No one stop will meet all your needs. You need at least 4 different stops and potentially many more run in tandem

Note: Having a system is not a suicide pact! You can build limited discretion into your rules. For example one of my own rules is that if the stop I am planning on placing is within a few ticks of a spike high or spike low which is likely to have stops there, then I will relax my stop by a few ticks so that I don’t get stopped out by big players gunning for stops. Another example of an appropriate discretion rule is to add an extra 2 ticks to your stop for intraday trading the Asian session to account for the greater noise:signal ratio. Another appropriate relaxation might be to place your stop behind closeby support (whatever support fits your beliefs) for extra protection

General Exit Principles

Most people place their stops too tight at the start and middle of the trade, and too loose at the end. Do the opposite

Once you get to a point in your trade where the RISK:REWARD is 1:1 or worse you should be exiting. This is extremely important.

You should be tightening your stops or flat out exiting on a limit as you get to high R multiples where the risk is not worth holding any longer. On the example below it is obvious that the 4R point is where I should be planning to start tightening my stops and be happy if I am taken out of the trade.

What am I optimizing for, anyway? Total R, Expectancy? SQN?

There are many different measures of system performance. Expectancy, Clawback Factor, Time at fresh equity highs, Dependency (% of time a win is followed by a win and vice versa), average length of drawdown, maximum drawdown.

My opinion is that the following statistics tell me everything I need to know.
  • Win rate (although this is the least important thing)
  • Expectancy – Total R / Number of Trades
  • Expectunity (opportunity x expectancy) so .2 expectancy x 100 trades a year @ 1% R is expected 20% per year
  • System Quality Number (100)

Note on SQN – calculating SQN as some suggest using the square root of the number of trades gives a false positive for prolific but poor systems. Limit the maximum value to 100. So in effect the formula is

10 x expectancy / standard deviation

An SQN of 2 is a tradeable but average system, but if your preliminary backtest results are in the low 2s for many reasons backtests dont perform like reality, you probably need to throw it away. The ratio of expectancy to standard deviation is the key thing here. Once you understand what standard deviation is you can work out how to optimize for it. Rather than repeat it just go here

If you optimize your exits to maximise SQN you will have smaller drawdowns and be capable of trading your system at higher R values, up to 2.5%. When we talk about optimizing for SQN we are really talking about optimizing for standard deviation, since expectancy doesn’t change by huge amounts. Understand at a deep level and you can improve your systems dramatically.


For optimizing the trend following system I have outlined above it is obvious I need 3 different exit.

About The Author
  •!/fresbee2010 fresbee

    You beauty. Thanks

  • Scott Phillips

    This is quite literally everything I know on this subject.

  • phylum

    Great post Scott, thank you

  • phylum

    I asked this the other day, and I know the time out rule (Heisenburg et al) … when you have a valid setup and it goes against you, say in the first bar, then, afterwards (i.e. next bar) continues in the “desired” direction …. you have just ditched the setup based on the first “against”, or could you, say, leave the setup in play (noting close) or is there an alternative methodology especially regarding other timeframes?

  • Kishore Kumar

    Starting with an account of around $5000, only 4 ticks on /ES per day is all that is needeed to multiply the account by 7.3 in 200 trading days. Incidentally, if you can make 5 handles a day, every day, your account will multiply itself by 17,292 in just 200 trading days. This is the power of compounding and CONSISTENCY! But, why is it so hard to do?

    Scott, thanks for the great post!

  • Scott Phillips

    It is hard to do simply because it is hard to do. Trading is among the most difficult professions on the planet to learn, every bit as hard as brain surgery. Most people fail because they try and earn money instead of increase their skill in a structured and focused way.

  • Scott Phillips

    You can do whatever you want in your own systems :) Most often a secondary one of Ivan’s setups will come along within a few bars.

  • Sean

    I’d be interested to see your math on that…

  • phylum

    Thanks Scott

  • Scott Phillips

    That’s 1% per day compounded, which is hard to do on futures. Possible on FX with exact position sizing. Not impossible at all but certainly in the realms of expert performance. I had 3 months last year averaging 4.75R per week, which is approximately that, and overall since I switched to my current production systems I average 3.7R / week.

  • Sean

    I guess if he was assuming you could trade partial contracts on the e-mini. Assuming you can’t, it is actually 5x and 14,000x… but that ignores the fact that by day 150 you would need to trade over 1000 contracts per day and by day 200 you would be over 14000 contracts… I know it is a bit nit-picky, but people forget about the operational aspects of real life trading that whittle away a system that is supposed to do 500R on paper down to one that does 10R after commission and slippage and other factors… I’m sure 5R/week is quite possible with the right system and mix of instruments (it is actually my stated goal, but if you’re getting just 3.7R I may have to temper my expectations to start with), and I just have a thing about math being correct…

  • Scott Phillips

    5R / week is very achievable. I know a working daily stock only system that does not trade during market hours that produces 3R / week

  • Scott Phillips

    Next week I’ll round out the series with another post on monitoring and placing limits around trader performance. That 3.7R includes quite a lot of mistakes, on average 2R / week of them (more at the start when I first started trading my new systems, decreasing over time) All my efforts are around decreasing my mistake rate.

    It should take at least 4 months of full time intraday trading to be able to trade your own system at acceptable levels of efficiency.

  • RUFCrazy2

    Please discuss or provide link to the Trend Strength or SQN indicator you reference – thanks, would like to code it up – maybe it was discussed recently, site posts have been pretty dense of late…

  • Scott Phillips

    What platform do you use?

  • yades

    yes, i had the same thought, it would be nice to know more about how to use SQN for this purpose

  • Ronebadger

    Thanks Scott! THAT took a lot of time, appreciate it.

    Bearish Engulfing Candles on all equities yesterday;

  • vladv

    great post!

  • Sean

    On the trading front, yen and gold suggesting more weakness than /ES is showing (contract roll confusing algos?)… also, we are below the 25d SMA and have fallen back below the weekly NLBL we crossed a couple of weeks back and a close below 1844 would be bearish IMO… however, inflation came in below expectations, which could spark a “the fed will stop the taper” rally… either direction is up for grabs, but as I mentioned yesterday, after a large range day the odds are for a small range day today, but if we don’t get a small range then we should be in for another large range day, in either direction (that’s as opposed to just average range if my understanding of the failure of the high probability outcome is correct).

  • Skynard

    /ZW fastly approaching my target, top 100 daily BB. (703)

  • yades

    Scott what do you mean by:

    “You should not use price based indicators to confirm price based indicators – It’s like asking your Mother if you are handsome ”
    all indicators in FX are price based.. there are no volume or implied vols data feeds for Forex spot trading

  • RUFCrazy2

    Tradestation and ThinkorSwim but phasing out of TOS

  • Dyellowflash

    Its a happy friday morning. Time to TP 30% of my April SPY Puts captured over the last week :)

  • evilasevildoes

    great stuff thx

  • randomtrader

    is this system secret?

  • Kudos

    would you be willing to share the code for your volstat indicator? It would be put to good use

  • Kudos

    Someone beat the tick index into submission and now its just laying there with bids slowly being walked down. No one buying the offers today.

  • Kudos
  • Sean

    Don’t have access to my PC at the moment, but it is just the approx Scott mentioned the other day… ATR(14) with the 100 period 1 stdev band… It’s like 6 lines of code in ToS.

  • Kudos

    Risk on?

    SPX took out yesterdays low and failed to follow through even with no bulls showing up today as evidence by tick embeddign (white line)

    Eur/JPY failed to take out low from earlier in day (Red line)

    Rates rising (purple)

    Gold Falling (green)

  • Gold_Gerb

    weekly 20 Yr treasuries.

    example of range bound in a Keltner.

  • molecool

    He means to not correlate one measure with another derived of the same.

  • Sean

    For USD pairs you can use the futures contracts to get volume data. I have found that useful for checking volume hole resistance/support.

  • captainboom

    Scott, in your discussion of stops, it looks like there is an incomplete statement: “Trailing Stop – In ticks, in R or in”…
    Is there more information that should be in that sentence?
    Thanks, and thanks for doing this.

  • Skynard

    Lack of buyers:)

  • Ronebadger

    VIX and VXO are cranking…but the SPX and SPY are down a tad (.15%) ???

  • teslaman

    Today It’s the 2nd time the DJI 4hour SMA200 offers support at around 16050…
    lets see if it holds by EOD

  • Ronebadger

    FYI Full Moon Sunday

  • Ronebadger

    We’re down across the boards, VIX way up, A/D is positive on SPX and NDX ???

  • Sean

    Seems to be a pretty strong bid at 1840 (SPX)… Either this is a bottom or we go lower, but either direction I think we move fast… I think we have a good inflection point here.

  • Sean

    AD issues are up but volume is down… Few names trading heavy volume?

  • Guest

    $BPNDX has been trending down for a while (thanks for the chart GG):

  • itcomesupinwaves

    $BPNDX has been trending down for a while (thanks for the chart GG):

  • molecool

    Those links don’t work mate. You have to either create a linkable chart in stockcharts or take a screengrab.

  • itcomesupinwaves

    Sorry, meant to delete it

  • Scott Phillips

    google “tradestation sqn indicator”

  • Scott Phillips

    I didn’t say you should use volume or implied volatility. I meant that using multiple momentum indicators… for example a mclellan with RSI or a MACD and slow stoch is a terrible idea

  • Scott Phillips

    volstats is useful but for system design I believe a better way forward is to build your systems implicitly so they have to happen in the volatility environments you want. For stock traders this is not possible

  • Scott Phillips

    Not secret, it just belongs to one of Van’s super trader graduates, so I can’t share it. Ken Long does some workshops on longer term systems which I am told are very good and suitable for daily chart trading.

  • Scott Phillips

    sorry that should read “in ticks, R, or a multiple of ATR”

  • Scott Phillips

    Suggest the market is digesting the down trend day yesterday. Entirely to be expected, low range choppy bullshit

  • teslaman

    Same situation with DOW. And just by coincidence we have a market mover on Sunday (Crimea vote bulls**t) that will be the excuse for either direction.

  • Scott Phillips

    You guys are missing the point. In the dumbass retail “search for a system that works” you are going to find something that is not suitable for your psychology, and then you are going to trade it poorly, fucking it up at every opportunity.

    You have no more chance of being able to trade my systems (or anyone else’s) profitably than you do of walking into a hospital and conducting a successful heart transplant on your first day at being an untrained doctor who “thinks there might be some money in this surgery gig”

    I’m providing you with a structured framework for doing the necessary work on yourself to enable you to think and trade like a winner and not a loser, and then the necessary understanding of why trading systems are designed the way they are so you can modify or build one to your own specifications. Next week I’ll show you how to measure and improve upon your performance in an iterative feedback loop.

    Like professionals in every field – concert pianist, surgeon, NBA player, etc.

    I could easily have disclosed my own systems. There’s nothing secret about them. If you don’t understand this point reread my previous posts.

    If you still don’t understand my point please save yourself some problems and don’t ever trade.

  • Scott Phillips

    Technically its ATR divided by price with the bollinger(100), but it’s a very minor difference

  • Scott Phillips

    You seem to win every single time you trade. Even after going long first thing yesterday morning, you miraculously win and win again every time.

    You aren’t fooling anyone

  • Kishore Kumar

    Your points well taken! Of course, my only intention was to highlight the power of compounding and consistency of winning (though small) and not losing (never big) and not that you could convert $5000 into $70MM in just 200 trading days. It does become a problem with large number of contracts that the account will eventually need to trade, though a welcome “problem”! Diversification into FX and other markets will become a must and also employment of many traders to trade the system.

  • Sean

    Especially magical considering Apr SPY puts are cheaper than they were on the day he posted that he was buying $16k worth of them (I actually owned some till today).

  • Ronebadger

    Yes sir! Have a good weekend!

  • Scott Phillips

    I added some critical extra information above, suggest you reload :)

  • Scott Phillips

    Actually the trader who built the system mentioned above no longer trades this system as he believes Ken Long to be a superior system designer (he has a PhD in system design) and effectively outsources his system design to him. Ken, like Mole and myself, is a life long martial artist and takes a focused skill building approach to trading. His rlco system is a superb intraday system and I am told these are just as good swing trading systems

  • Scott Phillips

    He’s a fucktard and a half

  • Scott Phillips

    This is the view where I am – breakfast then swim I think

  • randomtrader

    so far In 3 years I have traded without stops generating a massive return and subsequently losing all of (3 years worth in 2 months…) to trading a smaller account using “price action” and stops which I can’t do consistently 50/50 win rate, to trying out a system that trades inside bars.. can’t seem to do that consistently either and I have like loss after loss after loss recently so I don’t even know what i’m doing anymore seems like every position I take recently in the last 2 weeks especially just guns for my stop which in some cases is like 50-60-70 pips away so I don’t think its “too small of a stop” problem…. I’m looking for something really simple to be honest, never been a fan of complexity. I just can’t seem to figure it out and i feel like i’ve wasted 3 years on nothing and am losing my patience. Gonna try to re read your posts and think of something new from the ground up something simple…

  • Scott Phillips

    what markets are you trading?

  • yades

    i hear you, but to be honest i don’t think that future volume is reliable, after all only 2% of total forex volumes is traded on regulated markets

  • Scott Phillips

    Even if you have a good system, it WILL take you 6 months to be able to trade it well. During that time your results will probably be terrible. This applies even to your own systems, I am currently trading Heisenberg at poor levels of efficiency, but getting better over time.

    Here’s the deal as I see it. There is a childish part of your subconscious which has enjoyed “winning” during your up period. Blowing up has taken away the capacity to trade without rules or restrictions and, like like a 5 year old who has to clean up his toys, your subconscious is sulking.

    It is highly likely you are experiencing self sabotage at a deep level, so you can “go back to when it was fun and we were winning”. Suggest you stop trading for 1 year, work on yourself and then when your psyche is detraumatised start on building your systems. If you build systems in a place of fear frustration and anger that gets carried into the system design and you build shitty systems

  • Gold_Gerb


  • Gold_Gerb

    SPX weekly, Monday will be the time to watch the Parabolic SAR$SPX&p=W&yr=3&mn=0&dy=0&id=p86161887960

  • aiki

    Scott, excellent post… Again, a huge thank you. I love these freakin’ posts!

    Okay, I am so new to this system testing thing I just have to ask to see if I am close in the way I’m thinking:

    1- Detail MFE, % Retracement, and R for single edge in question over x trades.

    2- Plot MFE of Winning Trades.

    3-Take each of those trades and see what the R outcome would have been if we had exited them at each of the following arbitrary R Exits (1, 1.2,1.5, etc.)

    4 – Plot MFE of Winning Trades for each arbitrary R exit.

    5- What is the median of these arbitrary R exit trades? Is the median number higher than our desired 2:1 Risk Reward ratio? Good. Toss out the rest that aren’t.

    6- Look at all the exits (by arbitrary R exits above) along with respective Total R and derive expectancy (Total R/ Number of trades = expectancy )

    7- Calculate: Total R, Expectancy, Stdev, SQN(100) for any expectancy close to or in the .3 range

    8- Take a nap. Shit, I’m tired!

    Is that anything close to correct, for just this part of the post? What number of trades constitutes satisfactory sample size for Step1? Is there any way to do this faster? (Particularly for step 3.) If it is all on excel, does anyone know of a template that is laid out for this?

    Clearly another step will be to test for R outcomes as above only within specific market volatility climate.

    I do have tradestation, but mostly use TOS. Either better (read easier) for this stuff?

    Thanks tons –

  • randomtrader

    during my winning streak for the 3 years it was usdcad and audusd, all i was doing was avergaing till it worked slowly building leverage sometimes massive… it always eventually worked until it didnt once with usdcad. Now im trying with more pairs essentially all of them plus gold/silver/copper/oil cfd’s… i dont have a concrete system thought i think i fit your definition of “discretionary” trader and thats my problem. The size im trading right now tho is tiny like really small and insignifigant almost but i felt that it should still be real money but losing, especially losing 7 times in a row stil feels like shit. I considered taking a break but i dont want to haha… All i literally am aiming for is like 2-3% per month consistently.

  • randomtrader

    i also think i should cut it back to like 3-4 pairs tops… too overwhelming to look at so many also i need something to be like i can look at it 2-3 times a day for 10 minutes but not stare at it an monitor it all the time so I need to be trading 4hour+ time frames for sure.

  • BobbyLow

    OK. I’ll throw my 2 Cents in. What Scott says about it taking months to trade even a good system well is true. There are always bugs that will have to be taken out and while this is happening you can get WTF Moments. I’ve been trading for over 15 Years and have had massive gains and massive losses just like you and it still took me 6 Months to trade my new system with confidence. But right now I feel like a kid who has just learned to drive a car. However, every day I drive it without having an accident (without making a mistake) is one more day that I’m closer to accomplishing my goal. Goals and Total Gameplans are additional things that need to be done. Unfortunately there is no solution other than time and effort. Lastly, I love the challenge that this business provides so I really don’t consider it work. If I did, I would have quit years ago.

  • molecool

    Tradestation is a bit limited by its Easy Language – I prefer more strongly typed languages. But in essence it really doesn’t matter as you can do all this on paper – even if you miss a few trades you’ll know pretty quickly whereabouts the sweet spot is.

    Regarding 3) you may also experiment with taking partial profits at 1R, 2R, etc. – you will find that many previously ‘losing’ trades wind up with a small win or at least break/even. This is something we are doing for Heisenberg and it was a bit of an epiphany for me. Entries really are secondary to campaign management. But it has to be in the context (in favor of) the underlying idea of your system. Meaning it depends on whether it’s following a trend, playing the swings, scalping. etc.

  • Sean

    Thanks… updated the code, and it looks like it doesn’t matter much for the hourly and daily charts, but you definitely see a difference on the weekly chart.

  • Sean

    I lied… it’s 3 lines of code…

  • Sean

    /ZW has been great since the breach of the 100d, been watching for long setups… there’s not a lot of context above 720, but volatility is definitely picking up after hitting the lowest since 2006… 1350 in the books? :-) … either way, this might be a good one to watch for setups if you system likes volatility.

  • Sean

    An error a lot of traders make is to focus on dollar amounts. Thinking in dollar terms adds an emotional context that can derail progress. It shouldn’t matter if you are trading a $10,000 account or a $10,000,000 account, it should only matter that you are risking 1R to make multiples of that (yes, it matters in terms of what instruments you can safely trade, but not to your risk management practices).

    If you are at $5,000 today and you are already thinking “I can have $700M in 200 trading days if only I can the right system” then you might as well go buy a lottery ticket, because your head is not where it needs to be and you will have better chance of winning the lottery with a lot less risk.

    What you should be thinking is “I have a system that makes me 1R per week with moderate draw downs, what do I need to do to get it to 5R per week with low draw downs”…

  • Sean

    I think it is a statistically significant sample size.

  • ridingwaves

    Nice right point break…looks fun..breakfast than 2 hours in waves would be excellent

  • RUFCrazy2

    Almost all the results are relevant to System Quqlity Number, not a market trending indicator. I’ve tried ADX – no help,
    but clearly I could look deeper into using better mkt trend indicators. Practically every strategy I have uses aset of volatility and MA filters to determine when to trade. And they are effective.

  • Sean

    Everything you need to know is in the post that Scott mentions SQN as an indicator (and if it is still fuzzy the link he provides to Van Tharp’s site should clear it up)… I just looked into it and coded it into ToS in under 10 minutes, and that was while drinking whiskey and watching Supernatural… and I’m embarrassed it took that long since it is one line of code (not embarrassed I’m watching Supernatural)… fun fact, SQN(100) on the hourly chart went negative (very weak market) at /ES 1875 on Tuesday…

  • Gold_Gerb

    so I’ve been thinking about an entry system based on the SPX weekly and the upward trend.

    The reality that I see is the pullbacks are 3 to 5 weeks in red.
    The reality in an upward trend is bears are swimming against the tide.
    sure, they may be getting lucky, but get out a ruler and look at that trend.

    Entry (long) would be based upon a panic sell below the 9.0 line intra-weekly.

    The move across the line is roughly 25 pts but can be as little as 10pts.

    Given the red candle last week, there’s ‘a chance’ we could be seeing another
    event (?) in March.

    the exit target would be half position at the 12.0 line, and the remainder at the 16.0 line.

  • Sean

    Alright, now that we have something to work with how are we going to use it? I will throw out what I am thinking, but it is not a final product, just a starting point. This is a very basic, unoptimized view to start with…

    1. Watch hourly chart
    2. Use multiples of ATR band
    3. Buy (sell) if close is above (below) the 0.5*ATR(25) band
    4. 1R is the distance between close (entry price) and the 25h SMA
    3. Sell (buy) if price reaches 2.5*ATR(25)

    Eye-balled results: ~50% winners… winners look to be 2x losers… should be able to improve average winner to be 4x losers with proper campaign management.

    Initial impressions of the system:
    System should work well in range-bound markets
    System should work in trending markets, but will miss a lot of potential profit

    But does this fit me? I need:
    1. I do not want to be at the computer all day
    2. I need very low draw-downs
    3. I need very predictable monthly income

    More work to be done….

  • Gold_Gerb

    when I’m looking for harmonics in a stock:

    find two extreme price points, and find out the number of trading days between them.
    then drop in a SMA of same duration.

    play with the envelopes on interesting extremes and reversal points.
    it can be helpful on a volatile daily chart for a swing trader.
    the system goal would be of trading band-to-band.

  • Genuine Pleather

    my latest spx chart. Also did some work on CLVS and EXEL…

  • Scott Phillips

    This is an edge which is overwhelmingly likely to be curve fitting and mediocre at best for system design. Since it is based on a complicated unproven theory (harmonics) and on you looking for patterns (since we have DNA which selects for pattern matching skill we often match patterns which don’t exist – I do this as well)

    Your other idea, however is OUTSTANDING :)

  • Scott Phillips

    You should back up a bit. Spend a week of your life doing the belief examination paradigm for all your beliefs. Spend another week formulating extensive goals of your system. “Low draw downs” needs to be fleshed out, so does everything else.

    Take some advice and don’t go anywhere NEAR a chart until you have this part locked down.

  • Scott Phillips

    This is a perfectly workable system idea, and the first sign of your wanting to stop “eating at the technical analysis buffet” and actually get down to the business of running a trading business. Well done!

    What makes it a good idea is that you could explain it to a child. “People like to buy nice things on sale” is a demonstrably true statement any 10 year old can understand. In a bull market, stocks are “nice things”. In comparison complicated theories (like your harmonics one above) are so much bullshit.

    This is only likely to be workable for low volatility bull markets (what we have now) so you would need to include a “stop trading if” trigger if we have a change to high volatility bull or high volatility bear. If we transition to high volatility bull (like for example gold at the end of it’s run (which is a possibility) you want to have built into your system some mechanism of grabbing those profits.

    Some other things you might use to increase your edge, in no particular order: Long tail on entry candle which pierces the green line; Sign of weakness (downside capitulation bar) on lower timeframe; Using this as a trigger then entering on the strongest stocks (stocks with the weakest percentage downside in the fall or strongest SQN (200) or SQN(100)) in the strongest sectors (with the weakest percentage downside in the fall or strongest SQN (100) or SQN(200); Put/call ratio or $CPCE threshold; Daily Hammer candle or Ivan entry if you believe in them. You could also add a daily indicator oscillator of some description and buy at the peak of daily momentum bearishness since multiple timeframes are an edge and the weekly trend overwhelming daily price action is also a demonstrable property of markets.

    As for your exit targets – you are way too early to start thinking about that. Do it properly, exactly like I suggest in the post. Plot MFE’s and retracements, in percentage and R terms. Right now you are thinking about taking profits on the yellow line, because it looks nice on a chart. The data may suggest that is right or it may be way off, better not to precondition yourself.

    Based on these 3 examples (the sample size is too small) you need at least a 30 pip stop. Work out what that is in multiples of ATR and see if it holds constant with the gold low volatility bull I posted below, or other low volatility bull markets.

    Do yourself a favor and do some internal work to rid yourself of stupid statements like “Given the red candle last week, there’s ‘a chance’ we could be seeing another sell event (?) in March/April.”. As long as you are thinking like this you are a chicken scratching in the dust trying to see portents of the future. Implicit in this statement is that you are still seeking to derive the future from the past.

    This is a fundamentally unworkable notion. The future and the past are entirely separate and the future is based on roughly a million different variables all colliding in strange ways. The future is NOT AND NEVER WILL BE PREDICTABLE based on any single sentence.

    A more proper way to condition yourself is that the odds of upside continuation are no longer favorable on a risk reward basis.

    See how INSIDIOUS the continuation bias is here? Based on seeing something 3 times in a row, you JUST NATURALLY ASSUME ITS GOING TO HAPPEN AGAIN! That is one of the FUNDAMENTAL reasons people blow up their accounts. Except in the real world, things don’t happen 4 times in a row all that often.

    Until you do the necessary internal work to rid yourself of this thinking you will be incapable of trading even a good system. This is why I suggested things in the following order

    1) Internal Work
    2) Belief Examination
    3) Losing unhelpful beliefs
    4) Goals
    5) Edge
    6) Initial Testing
    7) Optimizing for SQN
    8) Practice for mistake elimination
    9) Monitor performance

    Jumping straight to number 5 is how most of us blew up our accounts when we first started trading. You don’t wanna go through that again, do you?

  • Scott Phillips

    ^^^^what he said is extremely important

  • Scott Phillips

    Parabolic SAR is a nice type of stop to use. It has little to no predictive value.

  • Scott Phillips

    I agree that it is a statistically significant sample size and find that there is much to be gained from watching the futures volume while trading spot fx. I find specifically that 5 min large volume candles standing by themselves at least 3 times the average volume are often short term turning points. Ivan finds interesting intermarket relationships when futures makes a higher high not confirmed by spot, and vice versa.

  • Scott Phillips

    It is more apparent in huge moves, but not critically important

  • Scott Phillips

    That is not trading (what you started with) in any way shape or form. It is just taking an inverse risk – small reward massive risk, and eventually simple maths got in your way. The fact that you “don’t want to stop” sounds like it has the character of addiction and there are many other worrying signs here. I strongly suggest you stop trading immediately and make a commitment to spend 6-12 months starting from beginner mind, working on your psychology, trading plan and business plan, and then come back to it.

    There is about 99.99999% chance you will blow up any account now and in the future unless you do this

  • aiki

    Thanks Mole! Will do.

  • RUFCrazy2

    This link is the most relevant. The volatilty part of this is not difficult. The SQN part is (as Mole says) well above my pay grade and thus nothing I can easily create or use – certainly not without hours and hours of work.

  • RUFCrazy2

    This link provides better detail, maybe there is something I can use here…

  • Gold_Gerb

    good to know.

  • Gold_Gerb

    A more proper way to condition yourself is that the odds of upside continuation are no longer favorable on a risk reward basis.

    couldn’t agree more.

    problem is, I’m always finding something that works in the past.
    so the tendency (emotionally) is just to throw it all in the trash
    since everything is ‘unpredictable’. My gut says, find a neutral strategy based on either a beginning turn, or a simple ramp-camp for the next month.

    and yes, I feel like a chicken scratching in the pigsty -aka it’s all crap..

    can you stay another week? 😉

  • Scott Phillips

    On a chart reading basis you are almost certainly right. However chart reading *seems* like it is much more useful for trading than it really is. Examine the evidence – we have many superb chart readers at evilspec and very few if any profitable traders (there might be a few fund and bank traders who are profitable, but that is a different thing)

    I can’t stay another week, but for people who are building real systems (winners) and not trying to predict market turns (losers) I’m happy to help you build and optimize your systems. 888rewards AT gmail

  • Scott Phillips

    By definition this problem (as to feeling and emotions) is psychological. There is no chart based solution to it. Suggest you follow the program I outlined which has worked for me and others to solve the same issues you have.

  • Scott Phillips

    OK Rats its been a fun week, but its over. You now have everything you need to build and optimize high quality systems which are suited to you. I’m going to repeat the fundamental premises one more time so you don’t forget

    – You think this is a trading community made up of a kind of elite, but most of you are still going to blow up your accounts unless you take radical life changing surgery on yourselves
    – Being better than average or most is no help in being profitable, only the very best will make it
    – Trading is mostly psychological
    – Psychology needs to be constantly improved and monitored, even for the most experienced veterans
    – If you build your systems as “one size fits all” you are going to have mediocre systems
    – If you build your systems before working on your psychology you are going to build shitty systems
    – If you aren’t trading on a rule based framework then you have no chance of long term consistent success

    I won’t be checking the blog.

  • wandering196

    thank you

  • captainboom

    Thank you Scott.

  • Skynard

    /ZW weekly potential, split now at 711 for profit taking. /DX daily holding as well.

  • aiki

    Thanks for you efforts Scott, and thank you Mole for providing a most excellent and continually useful site. I have a lot to think upon.

  • spicestory

    Huge thank to your trading mantra. will keep chanting (doing)

  • phylum

    EURAUD long, invalidated below 1.533
    If it sticks…
    1st target 50% fib @ 1.539
    others around 1.5427
    a break of day high @ 1.5436 expect a retrace

  • Kudos

    Just want to say thank you one last time. Your work is really appreciated

  • molecool


    ¨°º¤ S H A K E N ¤º°¨

    ¸„ø¤º° B A K E !“°º¤ø„¸