logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Mokwit  
#1 Posted : Sunday, September 18, 2005 10:19:37 AM(UTC)
Mokwit

Rank: Member

Groups: Registered, Registered Users
Joined: 9/11/2005(UTC)
Posts: 16

Ok difficult to describe but here goes. What I want to do is write a scan for stocks just coming off a long term base so simplisticly you might have a part of the exploration that looks for stocks that have been flat with low volatility for 60 days and then have had succeessively higher closes for the last three days. (or some such) as the lip of the base starts to form. Only problem is the stock would no longer match the low volatility for 60 days as I am looking for higher volatility in the last 3 days SO: What I need is a way of breaking up the two argunents that mutually exclude each other so I scan I scan for 60 days of low volatility ignoring the last three days and have the last three days subjected todifferent conditions so its low volatility condition 1 for days T-4 to t-63 and then the other condition scanned for for T to t-3. Is there a general way of doing this so I scan for 1 set of conditions for a set period starting at XX bars back and ending at (say) 4 bars back and then another set of conditions for the last few (actually 3) days until today. scanning separately for the last 3 days will probablt throw up a lot of stocks that are not coming off a base and scanning for the base alone will throw up sticks that may base for another 60 days............
CN001532  
#2 Posted : Sunday, September 18, 2005 1:08:27 PM(UTC)
CN001532

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/22/2005(UTC)
Posts: 30

Although this may not answer your question directly, this low historical volatility breakout code may get you closer to where you want to be, its based on Connors and Raschke's work. A Low Historical Volatility condition measures the volatility over the last six days to those measured over the past 100 days. If the 6 day reading is less than half the 100 day reading, a Low Historical Volatility signal is fired, indicating that the market is setting itself up for an extreme movement, most likely the start of a new multi-day trend. ----------8<---------------------------- Std(Log(C/Ref(C,-1)),5)/Std(Log(C/Ref(C,-1)),99)<.5 AND (HIGH - LOW < Ref(LLV(H-L,3),-1) OR HIGH < Ref(HIGH,-1) AND LOW > Ref(LOW,-1)) ----------8<---------------------------- The code returns a +1 value when a breakout occurs.
Jose  
#3 Posted : Sunday, September 18, 2005 3:15:21 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
CN001532 wrote:
Std(Log(C/Ref(C,-1)),5)/Std(Log(C/Ref(C,-1)),99)<.5 AND (HIGH - LOW < Ref(LLV(H-L,3),-1) OR HIGH < Ref(HIGH,-1) AND LOW > Ref(LOW,-1))
It's always a good idea to plot the individual components of a trading strategy to see what they are actually doing. [code:1:dd8e13d240]Std(Log(C/Ref(C,-1)),5)/Std(Log(C/Ref(C,-1)),99)[/code:1:dd8e13d240] Plot the above indicator code below a chart with some large trading gaps, and see if the large volatility values (during & after the gaps) correlate well with the price movements. IMO, Standard Deviation doesn't seem to suit market data that well. Try ATR(). jose '-) http://www.metastocktools.com[/code]
Mokwit  
#4 Posted : Friday, September 23, 2005 6:03:59 AM(UTC)
Mokwit

Rank: Member

Groups: Registered, Registered Users
Joined: 9/11/2005(UTC)
Posts: 16

CN, Jose, many thanks for your replies. In addition to the breakout from basing consolidations example I posted I foresaw other applications if it was possible to what I was hoping, so if anyone does know how to do this please don't hold back from posting. trying to keep this thread alive............... I am wondering if this (very good) breakout exploration is handling this in some way (first statements of first two lines?) pds1:=21; {HHV (long) breakout periods} pds2:=10; {LLV (short) breakout periods} x:=4; {use Open=1 High=2 Low=3 Close=4 Vol=5} x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,C)))); In:=x>Ref(HHV(x,pds1),-1); Out:=x<Ref(LLV(x,pds2),-1); Init:=Cum(In+Out>-1)=1; InInit:=Cum(In)=1; Flag:=BarsSince(Init OR In) < BarsSince(Init OR Out)+InInit; BuyLong:=InInit AND Alert(InInit=0,2) OR Flag AND Alert(Flag=0,2); BuyLong Apologies for non credit to the author of above - name lost in the mists of time. Thanks once again for your help.
Jose  
#5 Posted : Friday, September 23, 2005 6:14:45 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Here is the original breakout code source: http://www.metastocktool...m/MetaStock/Breakout.txt As for consolidation strategies, I don't understand the basic concept so I can't be of much help here. jose '-) http://www.metastocktools.com
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.