View Single Post
Old Tue, 09-20-2005, 10:08 PM   #30 (permalink)
therumpledone
Member
 
Join Date: Apr 2005
Posts: 43
therumpledone
Send a message via AIM to therumpledone Send a message via MSN to therumpledone Send a message via Yahoo to therumpledone
WARM CROSSOVER FILTER...

/* WARM FILTER 60 days Crossover Report rsval x adval */

/* NORMALIZE accumulation distribution */

set{adval, INDPOSITION(accumulation distribution, 60) }

/* NORMALIZE momentum(12) */

set{moval, INDPOSITION(momentum(12), 60) }

/* NORMALIZE rsi(2) */

set{rsval, RSI(2) / 100}

/* NORMALIZE williams %r(10) */

set{wrval, INDPOSITION(williams %r(10), 60) }

/* CALCULATE 10/60/200 day trend */
set{T10, count(10 day slope of the close above 0,1)}
set{T60, count(60 day slope of the close above 0,1)}
set{T200, count(200 day slope of the close above 0,1)}

Set{u1, T200 * 1}
Set{u2, T60 * 10}
Set{u3, T10 * 100}

Set{uu, u1 + u2}
Set{TREND, uu + u3}

/* CALCULATE DAILY WEEKLY BOTTOM TAIL SIZE */
set{BTSize, close - low}
set{WBTSize, weekly close - weekly low}

/* PRICE CALCULATIONS */
set{CCb,days(close is above close 1 day ago,100)}
set{CCa,days(close is below close 1 day ago,100)}
set{CLxCL, CCa - CCb}

set{E5b,days(close is above ema(5),100)}
set{E5a,days(close is below ema(5),100)}
set{CxEma5, E5a - E5b}

/* VOLUME CALCULATIONS */
set{v, volume 1 day ago}
set{volinc, volume - v}
set{volpc, volinc / v}
set{volpct, volpc * 100}

set{VolZ, days(volume < 1,100)}
set{VolUp, days(volume is below volume 1 day ago,100)}
set{VolDn, days(volume is above volume 1 day ago,100)}
set{VlXvl, VolUp - VolDn}

set{vck1, volume 1 day ago }
set{vck, volume / vck1 }
set{vdbl, days(vck < 2, 100)}

/* EMA CROSSOVER CALCULATIONS */
set{E1326b,days(ema(13) is above ema(26),100)}
set{E1326a,days(ema(13) is below ema(26),100)}
set{E13xE26, E1326a - E1326b}
/* rsi cross a/d */

set{rab,days(rsval is above adval,100)}
set{rab1, count(rab above -1 , 1)}
set{rab2, rab * rab1}
set{raa,days(rsval is below adval,100)}
set{raa1, count(raa above -1 , 1)}
set{raa2, raa * raa1}
set{rsxad, raa2 - rab2}

/* rsi cross momentum */

set{rmb,days(rsval is above moval,100)}
set{rmb1, count(rmb above -1 , 1)}
set{rmb2, rmb * rmb1}
set{rma,days(rsval is below moval,100)}
set{rma1, count(rma above -1 , 1)}
set{rma2, rma * rma1}
set{rsxmo, rma2 - rmb2}

/* rsi cross williams %r */

set{rwb,days(rsval is above wrval,100)}
set{rwb1, count(rwb above -1 , 1)}
set{rwb2, rwb * rwb1}
set{rwa,days(rsval is below wrval,100)}
set{rwa1, count(rwa above -1 , 1)}
set{rwa2, rwa * rwa1}
set{rsxwr, rwa2 - rwb2}

/* williams %r cross a/d */

set{wab,days(wrval is above adval,100)}
set{wab1, count(wab above -1 , 1)}
set{wab2, wab * wab1}
set{waa,days(wrval is below adval,100)}
set{waa1, count(waa above -1 , 1)}
set{waa2, waa * waa1}
set{wrxad, waa2 - wab2}

/* williams %r cross momentum */

set{wmb,days(wrval is above moval,100)}
set{wmb1, count(wmb above -1 , 1)}
set{wmb2, wmb * wmb1}
set{wma,days(wrval is below moval,100)}
set{wma1, count(wma above -1 , 1)}
set{wma2, wma * wma1}
set{wrxmo, wma2 - wmb2}

/* a/d cross momentum */

set{amb,days(adval is above moval,100)}
set{amb1, count(amb above -1 , 1)}
set{amb2, amb * amb1}
set{ama,days(adval is below moval,100)}
set{ama1, count(ama above -1 , 1)}
set{ama2, ama * ama1}
set{adxmo, ama2 - amb2}


/* CALCULATE DIVERGENCE */
set{nd2,count(close below close 2 days ago,1) * count(rsi(2) above rsi(2) 2 days ago,1)}}

set{nd3,count(close below close 3 days ago,1) * count(rsi(2) above rsi(2) 3 days ago,1)}

set{nd4,count(close below close 4 days ago,1) * count(rsi(2) above rsi(2) 4 days ago,1)}

set{nd5,count(close below close 5 days ago,1) * count(rsi(2) above rsi(2) 5 days ago,1) }

Set{n1, nd5 * 1}
Set{n2, nd4 * 10}
Set{n3, nd3 * 100}
Set{n4, nd2 * 1000}

Set{na, n1 + n2}
Set{nb, n3 + n4}
Set{PD2345, na + nb}

/* POSDIV is the number of times there was a 2, 3, 4 or 5 day positive divergence during the past 10 days */

set{POSDIV, count(PD2345 above 0, 10)}

/* PDDAYS is the number of days since there hasn't been a 2, 3, 4 or 5 day positive divergence */

set{PDDAYS, days(PD2345 EQUAL 0, 100)}

/* R2DLT1 tells you the number of days rsi(2) < 1 during the past 20 days */

set{R2DLT1, days(rsi(2) is below 1,20)}

/* R2DLOW tells you how many days since the 20 day low. But if it is -1, this lets you know that there has been a lower RSI before the current rsi(2) 20 day low within the previous 20 days. At first I thought -1 was a mistake until I checked the chart */

set{R2DLOW, days(rsi(2) EQUAL RSI(2) 20 DAY LOW,20)}

add column rsxad
add column rsxmo
add column rsxwr
add column wrxad
add column wrxmo
add column adxmo

add column trend

and add column clxcl
and add column CxEma5
add column VlxVl
add column Vdbl
add column volpct

add column wrval
add column adval
add column rsval
add column moval


add column posdiv
add column pddays
add column R2DLT1

add column RSI(2) 20 DAY LOW
add column R2DLOW

/* PRICE/VOLUME SELECTION CRITERIA */
price ABOVE .01
volume above 50000

sort column 11 descending

/* CROSSOVER SELECTION */

RSXAD EQUAL 1
ADVAL BELOW .20
rsi(2) above rsi(2) 1 day ago
/* END FILTER */

You may need the advance SF to run this but it is well worth it!

MAY ALL YOUR FILLS BE COMPLETE.
therumpledone is offline   Reply With Quote
Sponsored Links