Registered User Joined: 5/28/2009 Posts: 39
|
Hi there...in my watchlist of stocks I want to include a column that displays a retracement %.
I want to show the retracement % as it relates to the most recent swing point high (SPH) and swing point low (SPL) [for a stock that has made a move up] and SPL and SPH [for a stock that has made a move down].
SPH and SPL would be based on the highest high/lowest low over the previous 5 bars.
So if I am looking at stocks with upward momentum and stock A has a SPH of 110 and a SPL that preceded it of 100, and price is 108...then I would see 20% displayed against stock A in my watchlist. I might then chose to hang off buying the stock as I want to see at least 25% of the recent move up retraced.
Is it possible to do something like this?
Thanks!
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I really wasn't quite sure what you wanted to do in cases where the the high and low of the most recent five bars happen to be the same bar. The following Indicator Formula returns 100 in such cases as a 100% retracement would otherwise be impossible.
SGN((ABS(H < MAXH5) * (ABS(H1 = MAXH5) + ABS(H1 < MAXH5) * (ABS(H2 = MAXH5) * 2 + ABS(H2 < MAXH5) * (ABS(H3 = MAXH5) * 3 + ABS(H3 < MAXH5) * (ABS(H4 = MAXH5) * 4))))) - (ABS(L > MINL5) * (ABS(L1 = MINL5) + ABS(L1 > MINL5) * (ABS(L2 = MINL5) * 2 + ABS(L2 > MINL5) * (ABS(L3 = MINL5) * 3 + ABS(L3 > MINL5) * (ABS(L4 = MINL5) * 4)))))) * (STOC5 - 50) + ABS((ABS(H < MAXH5) * (ABS(H1 = MAXH5) + ABS(H1 < MAXH5) * (ABS(H2 = MAXH5) * 2 + ABS(H2 < MAXH5) * (ABS(H3 = MAXH5) * 3 + ABS(H3 < MAXH5) * (ABS(H4 = MAXH5) * 4))))) = (ABS(L > MINL5) * (ABS(L1 = MINL5) + ABS(L1 > MINL5) * (ABS(L2 = MINL5) * 2 + ABS(L2 > MINL5) * (ABS(L3 = MINL5) * 3 + ABS(L3 > MINL5) * (ABS(L4 = MINL5) * 4)))))) * 50 + 50
Days Since Last Peak (or other day-counting needs)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|