Zone Trading Analysis Framework

Welcome to the  Zone Trading Analysis  Framework

Simple Application of the Framework

Introduction

Break out and counter trend trading has been the most popular and successful day trading mechanisms for many, many years.  Basically, it attempts to capture the big trend days via break outs and the counter trend moves via intraday reversals. If the market consistently broke out to either the upside or downside and kept going, then day trading would be like an ATM machine.  Unfortunately, the market peppers chaos in the mix and you have break outs and false break outs and market congestion.  While the pits were alive and doing well, the locals could use simple math to figure out price levels where the markets could potentially turn and reverse course or if these levels were penetrated with a certain level of gusto, then a momentum trade was setting up.  These levels were labeled individual support and resistance levels (like the ones in the chart above).  A resistance level is a price where price should struggle to cross above, and a support level is one where price should struggle to cross below.  Combining the momentum and counter trend mechanisms into one strategy has been around since the 1980s.  Richard Saidenberg along with John Ehlers/Mike Barna created very successful day trading systems with names like R-Breaker, R-Levels and R-Mesa.  Many other traders utilized the same concepts and also created very successful algorithms – some leaned more on the either the breakout or counter trend entries.  Initially, the success of these algorithms lay with the crowd mentality as many day traders in the pits and in front of the screens were looking at the same thing simultaneously – it was a self-fulfilling prophecy.  However, as more traders started using these levels, the magic wore off.  These levels became traps and the robustness of these day trading approach waned.  Still the synergy of the breakout and counter trend approach was still a great approach and the only game in town. Traders started deriving their own levels and programmed entries and exits based on the interaction of the markets with these levels.  Many traders incorporated risk measures by monitoring daily volatility and derived potentially higher probable trades by overlaying daily bar patterns.

The code that is used to develop these types of algorithms can be quite complicated, especially for a not-so experienced EasyLanguage programmer.  For this reason, I have created this framework. The code is fully explained at the end of the manual and a video is included on using the framework to reflect your own observations on the chart and in code.  The framework is not only a tool for developing day trade systems, but the logic and coding can take you a long way to becoming a much better EasyLanguage programmer.

Snippet of the Code that Initiated the Long Trade Above

if dayOpenZone = “z2” and
last4Lev = “z2topca,z2topcb,z3topcb,z3topca,” and
zoneArray[z2Buy] = 0 then
begin
     buy(“Z2VidBuy”) next bar at open;
     zoneArray[z2Buy] = 1;
end;

Code Explanation

The variable dayOpenZone is used to keep track of the first tick of the day.  Each boundary crossing (transition from one Zone to another) is represented by an 8 character string.  So when the market moves from Zone 2 to Zone 1 a string is created – in tis case the string would be “z2topca,” In other words, the market crossed above the top on Zone 2 and therefore landed in Zone 1.  Once this happens the large string that records the daily boundary crossings only contains, “z2topca,”  If next level crossing or penetration is back into Zone 2, then the string would contain, “z2topca,z2topcb,”  Here the market crossed below the top of Zone 2 and landed back into Zone 2.  We want to buy after the market pokes its head into Zone 1 and then pulls back to Zone 3 and then pushes back again into Zone 2.  The initial break out failed and the weak handed longs are gone, but the bulls are still in control, and want to push the market higher.  Will this push, pull, push payoff?  Who knows, but you can easily test it.  The last 2 strings must be,”z3topcb,z3topca,”  The market moved into Zone 3 and back into Zone 2 – is this the beginning of a new rally?  This line of code:

last4Lev = “z2topca,z2topcb,z3topcb,z3topca,”

provides the exact information the computer needs to take actions.  The variable last4Lev contains the path the market has taken up to that point in time.  As you can see this particular sequence paid off, but keep in mind this example was “cherry picked” for illustration.  

Lean EasyLanguage as You Test Your Ideas

Concepts such as strings, concatenation, arrays and other slightly advanced techniques were used in the development of the frame work.  Since the code is fully disclosed, you can easily see how all this concepts are used and tied together.

Before you decide if this framework is right for you, take a look a these videos:

Some More Information on the Framework

ZoneTraderFrameworkTZR

Backtesting with [Trade Station,Python,AmiBroker, Excel]. Intended for informational and educational purposes only!

Follow

Get every new post delivered to your Inbox

Join other followers:

%d bloggers like this: