Discussions
»
Product and Service Development
»
Formula Assistance
»
Inserting additional instructions into a complex exploration whose code is not understood
Rank: Member
Groups: Registered, Registered Users Joined: 9/11/2005(UTC) Posts: 16
|
This below is a great breakout exploration By Jose Silva that I am having trouble modifying.
---------------------------------------------------------------------------------
Breakout signals Signals a Buy Long on price breakout
Exploration filter
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
-------------------------------------------------------------------------------------------------
I am having serious problems trying to add a couple of filters to it with my limited understanding of the code. When I try to add modifications at the beginning, end or within the body of the code it just either does not incorporate them or the results are messed up (finds more stocks suggesting it is reading inserted code and ignoring main exploration). Presumably I have to add it in such a way that it does not interfere with the commands and functions. How to do this is probably very obvious to someone who understands the code and its parameters.
The first filter is that it is breaking out from a range that is within 50% of a LT low written as: H <= 1.50*(LLV(C,70))
The second is that the price falls between $10 and 50 and Vol on breakout day is > 500,000 and there was minimum activity of 10,000 shares (i.e.. it traded) for the preceding 4 days written as: ((C>10) AND (C < 50) AND (V > 500000) AND (Ref(V,-1)>10000) AND (Ref(V,-2)>10000) AND (Ref(V,-3)>10000) AND (Ref(V,-4)>10000))
Any help you can provide on how I would incorporate these filters into the exploration would be much appreciated as I have been going round and round in circles on this literally for months. As I said, how to do this is probably very obvious to someone who understands the code and its parameters.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 8/13/2005(UTC) Posts: 170
Thanks: 7 times
|
Mokwit,
Why dont you use seperate col in explorations with your conditions along with Jose's in 1 col ( or in filter , if you want Jose's code as your principal criteria)
"breaking out from a range that is within 50% of a LT low written as: H <= 1.50*(LLV(C,70))" 50 % of what ? presumably in last 70 day period H & l ,then why dont' you put in a seperate col...... a:= (HHV(H,70) - LLV(L,70))*.5; b:= if((c - (LLV(L,70) + a))>=0,1,0); m:= barssince(if(ref(b,-1)=0 and b=1,1,0));{This will tell the No.of Days ago it has gone above your level)} m;
"second is that the price falls between $10 and 50 and Vol on breakout day is > 500,000 and there was minimum activity of 10,000 shares (i.e.. it traded)" in a seperate col......... if(c >= 10 and c < 50 and v > 5000000 and OI < 10000 ,1,0)
It is better not to tinker with jose's code without understanding because it has a seed.
Asish
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 9/11/2005(UTC) Posts: 16
|
Asish, thanks. I finally worked out what you meant and put the two screens into columns. They return a 1 but I now have the same problem inserting ColA + ColB into the original formula as I did with the formulas.................................................................
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Inserting additional instructions into a complex exploration whose code is not understood
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.