[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Re: finding a stock's lowest price within AA date range



PureBytes Links

Trading Reference Links




<SPAN 
class=552030120-12112003>hmmm, good idea fred, simpler. 
<SPAN 
class=552030120-12112003> 
<SPAN 
class=552030120-12112003>so, including dealing with the MA being null for 
the first 50 bars after data starts, and spread out for readability, we get 
something like this:
<SPAN 
class=552030120-12112003> 
<SPAN 
class=552030120-12112003>----------
<SPAN 
class=552030120-12112003>dollar_volume = MA(c * v, 50);
<SPAN 
class=552030120-12112003>dollar_volume_ok = IsNull(dollar_volume) or 
dollar_volume >= MinDollarVolume;
<SPAN 
class=552030120-12112003>price_ok = c >= MinPrice;
<SPAN 
class=552030120-12112003>ok_to_buy = Status("BarInRange") == 0 or 
<SPAN 
class=552030120-12112003>(dollar_volume_ok <FONT 
face="Courier New" color=#0000ff size=2>and 
price_ok)<SPAN 
class=552030120-12112003>;
<SPAN 
class=552030120-12112003><SPAN 
class=552030120-12112003>----------
<SPAN 
class=552030120-12112003> 
<SPAN 
class=552030120-12112003>make sense? (haven't tried it; AB's 
busy...)
<SPAN 
class=552030120-12112003> 
<SPAN 
class=552030120-12112003>dave
<SPAN 
class=552030120-12112003> 
<BLOCKQUOTE 
>
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Fred 
  [mailto:fctonetti@xxxxxxxxx]Sent: Wednesday, November 12, 2003 1:56 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  finding a stock's lowest price within AA date 
  range"barinrange" - returns 1 when current bar is 
  within current auto-analysis From-To range --- In 
  amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
  wrote:> say I'd like to find stocks whose price has stayed above $1 
  within the AA> date range. any ideas how to do that?> 
  > I thought I'd first find the lowest price within that date range, 
  but I'm> not sure how. the method needs to handle stocks whose 
  quotes start after the> beginning of the range, or end before the 
  end of it, finding them if the> quotes that do exist meet the 
  criteria.> > I think the following gets you the lowest price 
  since the start of the test> range, but keeps looking past the end 
  of the test range to the end of all> quotes:> 
        LastValue(LowestSince(Status("FirstBarInTest"), 
  c))> > it seems like there should be a clean and simple way to 
  do this, but I'm not> seeing it.> > thanks in advance 
  for any ideas.> > dave



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.