TheRumpledOne 6,411 posts msg #48690 - Ignore TheRumpledOne modified |
12/17/2006 7:53:14 PM
"Some time ago you wrote this complex filter (very good indeed!). On the chart you show a TREND 111. How do you filter stocks by two parameters only:
1) When the TREND moves to 100 (or leaves 0)
2) When the TREND moves to 0 (or leaves 100)"
The above filter will return stocks where the trend changed.
The TREND column is in XYZ format where
X = 1 if 10 day linear regression is up, = 0 if 10 day LR is down.
Y = 1 if 60 day linear regression is up, = 0 if 60 day LR is down.
Z = 1 if 200 day linear regression is up, = 0 if 200 day LR is down.
HTH.
|
hrosas 27 posts msg #48692 - Ignore hrosas |
12/17/2006 8:04:11 PM
TRO:
Thank you! But this one is even more complex.
Let me refrase: on the following filter:
/* STOCKS IN LINEAR REGRESSION AND EMA UPTRENDS */
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}
set{CCb,days(close is above close 1 day ago,100)}
set{CCa,days(close is below close 1 day ago,100)}
set{CxC, CCa - CCb}
set{E5b,days(close is above ema(5),100)}
set{E5a,days(close is below ema(5),100)}
set{CxE5, E5a - E5b}
set{E1326b,days(ema(13) above ema(26),100)}
set{E1326b1, count(E1326b above -1 , 1)}
set{E1326b2, E1326b * E1326b1}
set{E1326a,days(ema(13) below ema(26),100)}
set{E1326a1, count(E1326a above -1 , 1)}
set{E1326a2, E1326a * E1326a1}
set{E13xE26, E1326a2 - E1326b2}
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{VolCnt, VolUp - VolDn}
TREND EQUAL 111
E13XE26 ABOVE 0
CLOSE ABOVE 10
VOLUME ABOVE 1000000
ADD COLUMN RSI(2)
ADD COLUMN TREND
ADD COLUMN E13XE26
ADD COLUMN CXE5 {C_x_E5}
ADD COLUMN CXC {C_x_C}
ADD COLUMN VOLPCT {V% chg}
ADD COLUMN VOLCNT {V u/d}
SORT COLUMN 10 DESCENDING
You show a trend --- on a straight line on the upper or lower side. I would like to filter ONLY when the line changes from the low to the up side and viceversa.
Thank you!
Hugo
|