drew9 171 posts msg #71184 - Ignore drew9 modified |
2/4/2009 8:49:02 PM
I have gained so many insights from some of the best here and have programmed many filters thanks to your great skills rubbing off, but I am stumped on how to develop needed column stat. I am looking to buy a stock if it rises above yesterdays close or gaps open above the prior days close. I am looking for the stat column to only show how much profit potential there was for that day above yesterdays close. For example, I have it down for the day from the open as follows:
set{ LongProfit, high - open}
set{Longprofita, LongProfit / open}
set{LongProfit%, Longprofita * 100}
add column LongProfit%
I know how to code this for one day ago from the close, but cannot account for how to take it from a gap up and it did not rise through the prior close. Ideally, if anyone can figure this out, I would actually like to buy it say 5 cents above the prior days close, then figure out the profit potential from there if it did not already gap through that amount.
If anyone can get this far then I will also ask if it is possible to provide another column with the same info and using today's close and what the potential profit might be if held until that point.
Thanks for any assistance you can provide!
Drew
|
drew9 171 posts msg #71222 - Ignore drew9 |
2/5/2009 9:05:12 PM
TRO you are our resident stat expert. Is this even possible?
Thanks,
Drew
|
Eman93 4,750 posts msg #71225 - Ignore Eman93 |
2/5/2009 10:14:10 PM
This will give you the stats on any stock, just add to the sym list with a comma between tickers
/* TRO - HIGH MINUS OPEN FIVE DAY DISPLAY */
set{xRange, high - low}
set{AvgRng, cma(xRange,5) }
set{HiOp, high - open}
set{Long_Profit, HiOp/open }
set{ClLo, high - open}
set{B10A, count(Long_Profit > .05 , 100)}
set{A10A, count(Long_Profit > .05 , 1)}
set{chg, sum( A10A - A10A 1 day ago ,5)}
set{ a1, hiop 1 day ago }
set{ a2, hiop 2 day ago }
set{ a3, hiop 3 day ago }
set{ a4, hiop 4 day ago }
set{ b1, hiop + a1}
set{ b2, b1 + a2 }
set{ b3, b2 + a3}
set{ b4, b3 + a3 }
set{ profit, b4 - 0.10 }
and add column B10A {GT05%}
and add column AvgRng
and add column separator
add column hiop
add column hiop 1 day ago { hiop1 }
add column hiop 2 day ago { hiop2 }
add column hiop 3 day ago { hiop3}
add column hiop 4 day ago { hiop4 }
add column profit
and add column separator
add column ClLo
and add column separator
add column chg{(wk)}
add column chg 1 week ago{(-1wk)}
add column chg 2 weeks ago{(-2wk)}
add column chg 3 weeks ago{(-3wk)}
add column chg 4 weeks ago{(-4wk)}
add column chg 5 weeks ago{(-5wk)}
add column chg 6 weeks ago{(-6wk)}
add column chg 7 weeks ago{(-7wk)}
add column chg 8 weeks ago{(-8wk)}
and add column separator
add column industry
add column sector
and add column separator
/* SELECTION CRITERIA */
symlist(SPF)
sort column 5 descending
|
guru_trader 485 posts msg #71351 - Ignore guru_trader |
2/12/2009 8:42:57 AM
drew, can you give an example of what you are looking for using a particular stock?
|
drew9 171 posts msg #71362 - Ignore drew9 |
2/12/2009 3:14:18 PM
Guys thanks for your assistance. I think this could benefit all of us if we can get it down. Here is my statistics filter.
/* profit potential - long only */
set{ LongProfit, high - open}
set{Longprofita, LongProfit / open}
set{LongProfit%, Longprofita * 100}
set{LongProfClose, close - open}
set{Longprofitb, LongProfClose / open}
set{LongPrfCl%, Longprofitb * 100}
set{LossPot, low - open}
set{LossPota, LossPot / open}
set{MaxLoss%, LossPota * 100}
set{Long50, count(longprofit above .50, 100) }
set{Long1%, count(LongProfit% above 1.00, 100) }
and price above 5
and average volume(30) above 100000
and add column average volume(30)
add column LongProfit
add column LongProfit%
add column LongPrfCl%
add column MaxLoss%
add column Long50
add column Long1%
do not draw Long1%
sort column 11 descending
So once again to net it out, I want to know the profit% only if the stock made it 5 cents above yesterdays close. Otherwise, do not include it. If yes, what was the profit potential at the high and the close. I already have LongProfit% and LongProfCl% but am trying to limit it to only those stocks that meet the 5 cents over the prior close criteria. Thanks again for your insights!
Drew
|
chetron 2,817 posts msg #71370 - Ignore chetron |
2/12/2009 5:10:01 PM
clickable...
|