Wide Range Day Breakout
Author: simbald
Creation Date: 10/13/2009 4:15 AM
profile picture

simbald

#1
hello traders,

i´m looking for a stratedgy using a wide range day. i wann screen the S&P 500, on end of day daily, and look for stock who made a "WIDE RANGE DAY" on that day.

but wealth lab has no wide range day indicator.

can somebody code such wide range day indicator, to find stocks that made a breakout wie a wide range day?

i say thank you at first :-)

best greetings

simbald
profile picture

Eugene

#2
Hello,

A wide-range day for you may not be a wide-range bar of somebody else. This is why before doing any programming, we need to know: how do you define WRB?

If we agree with this definition:
QUOTE:
A high-volatility price bar, i.e., one whose range is much greater than the preceding price bars (or alternately, one with a range much greater than the average range over an N-day period).

Then here's something for you to start with:
CODE:
Please log in to see this code.
profile picture

simbald

#3
Thank you Eugene!

Yes with Wide Range Day i mean a PriceBreakout which is greather as the Daily Ranges ago.

Exactly your Definition above.

And with that Code i can define a Indicator to Scann the S&P 500 ?

greetings

marcus
profile picture

Eugene

#4
The code above is just an example of a breakout system for wide-range bars that goes long and short. Off the top of my head.

Give me an idea how do you want to scan the S&P (backtestable or purely a strategy for scanning/screening?), why do you need an indicator (and how would it look like?), your trading rules - and then we'll fine tune the code for you.
profile picture

simbald

#5
so,

wanna build a scanner thats includes:

the stock, future oder commodity price should see this criteria:

- The Price Must build a wide range day
(definition of jack schwagers book)

- the volume must be over the moving average of daily volume (EMA with 20)

- and the price should be over a 40 day moving average (filter for long oder only short trades)

- we enter in the trade:

buy limit on the high of wide range day (for long trades)

short limit on the low of the wide range day (for short trade)


(this would be my system)

but at first i need a scanner (without backtest) who only show me todays "wide rang days" on the stocks
of the S&P 500;

and then we can build in some further ideas.

greetings

simbald

ps: i wann start wealth lab, run the screener, and would get a list, of stocks that have made a wide range day on S&P 500 stocks. --> that are my stocks für watchlist.



profile picture

Eugene

#6
OK understood. Here goes the screener part of it:
CODE:
Please log in to see this code.
profile picture

Eugene

#7
Here's the "system" - and since I'm confused how a system (as you say) could have no exit rules, here's the screener for long/short entry signals:
CODE:
Please log in to see this code.


Beware: the daily range is assume to be expressed as TrueRange, so even a O=H=L=C bar that significantly gapped up or down will count as WRB. If that's not desired, change the condition to something like that:
CODE:
Please log in to see this code.
profile picture

simbald

#8
hello eugene,
thank you for nice code.

but what shall i do with them?

i only can chosse:

new strategy with code:

but thats no correct, i wanna create an indicator?
how i do that? i how i can screen with wealth lab?

profile picture

Eugene

#9
No, actually you don't need to create an indicator, which would not help you anyway with screening.

You have the complete solution for screening the S&P-500 watchlist for WRD, finding the long list of candidates (my post # 10/13/2009 9:36 AM) or the short list that will produce alerts for trading with AtLimit orders (post # 10/13/2009 10:06 AM). Note that I've edited the code.

So, make your start with the WealthScript Programming Guide by reading "How to Run Example Code" and "Techniques > Creating a Screener".