Posts Tagged ‘adaptive_OR’

Adaptive OR Trade Plan, and Today’s Trades

August 28, 2009

I went back over the last 5 days of Adaptive OR trades, and did a lot of research. I looked at parameters like profit at first favorable swing point (first peak), first pullback swing point after the first peak, max profit without reversing back across the opposite side of the OR, and so forth. I looked at all trades all day, and I counted 34 over the 5 day period so far. I will keep adding to my database as time progresses.

Using a target of 1 or 2 points increases the win rate to near 70%, but kills you because your losers are bigger than your winners. Targets of 3-5 points were best for maximizing profit. Taking trades after the first two per day decreased profits significantly (choppy day if levels are revisited over and over). I assumed that if the first pullback went back across the opposite OR, it was a full stop loss, and if we never hit the target (an input) that you would eventually be stopped out at the first pullback level + 1 tick slippage.

After this analysis on all of the Adaptive OR setups over the last 5 days, I came up with this trading plan:

Use AdaptiveOR_Pro(0930,5,3) on a 133 tick chart.

Take (up to) first two OR breakouts of the day.

Entry is 1 tick outside OR levels.

Target is 4 points (limit order).

Initial stop is 1 tick outside opposite OR level.

After first pullback swing point prints, raise stop to 1 tick behind that level.

Sit on hands.

Trading this plan over the last 5 days would have made +20 ES points on about 7 trades. So today I traded this plan exactly. Here’s the results:

AOR_8-28-09

The first trade short entry (yellow line) got slipped a tick against me because my stop entry order waited until price crossed it rather than touched it (??). Then we had the pullback, so I lowered the stop and got out for -0.5 points. No biggie. Then I took the opposite long entry right after (other yellow line), and it immediately ran back to my stop for a full -2.5 point loss, total -3 points. So I stopped trading, because my research said that a choppy day was ahead. Perfectly executed plan, apart from the first entry weirdness (I used a market order for the second entry).

And guess what? If I took the third trade, I would have made my +4 points if I got a good fill on my target limit (green line), or +1 point worst case if my first pullback stop was hit (red line), or the full 4 points if neither got filled, because it eventually went through my limit target (I’m still not sure how the Think or Swim stops fire. It seems that it doesn’t work on price quotes, only on the bid or ask crossing your stop level?)

The lessons: Even if you do everything “right”, sometimes you still lose. And sometimes doing the “right” thing makes you miss out on a win. And I have an incredible timing ability, apparently. The days I traded this week were chop days, until I stopped trading and then boom went the dynamite. What can you do?

Apart from continuing to gather the data on the setup, I’m going to see if I can come up with some kind of follow-through filter that will help me bail early to minimize losses on the immediate losers (like the second trade this morning), but sit tight for the 3-5 point profit on the others.

Adaptive OR Setup for Today

August 27, 2009

Here’s my Adaptive OR indicator for today. More than 3 points and counting. And I didn’t trade it, of course, after yesterday. 😡

damnit

Adaptive Opening Range Indicator for Think or Swim

August 25, 2009

The trades I have been taking lately are dependent on defining an opening range. I’ve noticed a few things that I want to trade from:

1. There is usually a good move off the open during the first half hour. I want to trade INSIDE of this move. I won’t get the whole thing, nor do I want to at this point. I’ll be happy with 1 or 2 ES points out of it.

2. Watching a 133 tick chart (the fastest available in ToS), I’ve observed something I’m calling the Opening Balance. Basically, there’s a swing one way, a swing the other way, and then a retrace to the middle of the two. Once we get the retrace, we’ve balanced the first moves off the open, and we’re waiting to see which way the scale tips. This can take anywhere from 10 seconds to 5 minutes or more.

3. I want a few early longs and early shorts to jump in and commit on the bell. That sets up some loser fuel right there! When the next push comes, one way or the other, there’s a new loser that needs to bail out, which is what pushes price. Burning losers are the jet fuel of the markets. (I should know)

My strategy is to go in the direction that the market moves right after the opening balance is made, possibly with confirmation from the internals like the NYSE A-D line and the NYSE Tick. In the past, I’ve been using a 1min time window to define the opening range, and I’ve watched how that compares to this idea of opening balance. The problem with this is that the opening balance I’m looking for could happen in the first 1min, 5min, or any other amount of time. I got whipsawed the other day when the opening balance wasn’t complete for about 5 minutes and I used a 1min OR.

I had the idea to combine my swing points indicator with the shaded opening range indicator. This way, the opening balance can be calculated according to the two price swings instead of an arbitrarily chosen time window. The result is an adaptive opening range indicator that plots the Opening Balance as I’ve defined above:

AOR_2009-08-25-TOS_CHARTS

I am beat and dying for time right now, so instead of writing a tutorial, I will post my early beta version of the indicator as an example of how to do it for the home-gamers, and the final indicator is on my Google site for donors. Note that for either, if you put the start time as the market open, you can’t use market hours only data. The Pro version has the ability to hide or show the swing points as well as changing the lookback and lookahead for defining swing points as an input. (I like 5 back and 3 forward.)

So existing donors, go grab it on the Google site under Released Thinkscript Studies. Look for “AdaptiveOR_ProSTUDY”. Feel free to donate again if you feel this is valuable to you, but it’s not required.

If you are new and want to become a donor, send me a donation through my Paypal:

For everybody else: Thinkscript time! This code will create an adaptive opening range using the definition of highest high three bars forward and three bars back for swing highs, and vice versa for swing lows.

#Start with inputting the start time you want:

Declare fullrange;
Input StartTime = 0930;

#Next define recursive functions to hold your high and low values while waiting for the OR balance to complete:

plot ORStart = if IsNaN(secondsFromTime(StartTime)) then 1 else if secondsFromTime (StartTime) >= 0 then 1 else 0;
plot ORbar1 = if barNumber() == 1 and ORStart then 1 else if ORSTART and !ORSTART[1] then 1 else 0;

rec highs = if ORbar1 then high else if high > highs[1] then high else highs[1];
rec lows = if ORBar1 then low else if low < lows[1] then low else lows[1];

Def swinghigh = if high >= high[1] and high >= high[2] and high >= high[-1] and high > high[-2] then 1 else 0;

Def swinglow = if low <= low[1] and low <= low[2] and low <= low[-1] and low < low[-2] then 1 else 0;

plot sh = if swinghigh then high else double.nan;
plot sl = if swinglow then low else double.nan;

Rec countswinghigh = if barNumber() == 1 then 0 else if !ORStart then 0 else if ORStart AND swinghigh then countswinghigh[1] + 1 else countswinghigh[1];

Rec countswinglow = if barNumber() == 1 then 0 else if !ORStart then 0 else if ORStart AND swinglow then countswinglow[1] + 1 else countswinglow[1];

rec ORHigh = if !ORStart then double.nan else if countswinglow * countswinghigh <> 0 AND countswinglow[1] * countswinghigh[1] == 0 then highs else ORHigh[1];

rec ORLow = if !ORStart then double.nan else if countswinglow * countswinghigh <> 0 AND countswinglow[1] * countswinghigh[1] == 0 then lows else ORLow[1];

Plot ORH = if ORStart then ORHigh else double.nan;
Plot ORL = if ORSTART then ORLow else double.nan;
AddCloud(ORH, ORL);

sh.SetLineWeight(3);
sh.SetStyle(curve.POINTS);
sh.AssignValueColor(color.white);
sl.SetLineWeight(3);
sl.SetStyle(curve.POINTS);
sl.AssignValueColor(color.WHITE);

Another Adaptive OR Trade Today in ES

August 25, 2009

I bought the OR high, and set my target at +1.5 points. Done and done:

AOR Trade 8-25-09

Note: I didn’t sell the prior OR low because it didn’t register the swing high until after the fact by two bars. Turns out that was good.

However, I then threw it all away and then some more on some impulse trades followed by revenge trades today. How many times will I have to learn that damn lesson.

S&P 500 E-mini Futures (ES) Trade: 8-24-09

August 24, 2009

I took this trade on a break of the opening range this morning. The chart shows an indicator I’m working on, called Adaptive Opening Range. Instead of defining the OR as a specific time, it defines the OR as the first swing high and swing low after the start time (0930 ET in this case). The red cloud starts when the start time (say, the market open) is reached, and the green cloud starts once the OR has been defined by a swing up and a swing down. My idea is then to trade a breakout of that OR, in whichever direction it comes. To me, this is better than a time-based OR definition because you actually get a range based on price action.

So today I went long (yellow line) on the Adaptive OR high +1 tick, stop was the OR low. I wanted 2 points on the trade (green line), but only got about 1.5 before it reversed. I eventually lowered my limit to +0.5 points and got filled (red line). Then price went on up well past my target. Again!

ES Trade 8-24-09

I’m too loss-averse and I end up scratching these OR trades before they have a chance to work. That or I need to reign in my target to about a point. Once I get to enough margin to trade two contracts, I’ll sell one at a closer target (like 1 point) and hold on to the other.

As for the Adaptive OR, once I get some bugs ironed out, I’ll do the usual ready-made indicator for donors, tutorial for the DIY’ers. It’s actually not too complicated once you have some logic for the swing points in place. Stay tuned…