| 
 PureBytes Links 
Trading Reference Links 
 | 
--- In amibroker@xxxxxxxxxxxxxxx, "mikelaurataylor"
<mikelaurataylor@xxxx> wrote:
> 
> I'm trying to set a condition on a chart that I'll be tracking 
> minute by minute and only want this to occur if todays opening price 
> (9:30am) is 3% more than yesterday's close (4pm).
> 
> I have backfilled data from 1/3/05.
> 
> When I test this with a date range of one day (1/25) and say:
> 
> openprice = 0pen [0]
> 
> I don't get the price from 1/25 I get the price from 1/3.
> 
> On an ongoing basis how can I ask the system for todays opening 
> price and yesterdays closing price?
> 
> Thanks so much.
> 
> Mike
I think your problem is you are referencing the entire array of data,
so it goes back to the first bar.  You want something like this:
Buy = iif( O > ref (O, -1)* 1.03, 1, 0);
Hope this is right.  I'm still a newbie so it would be nice for
confirmation, or just try it and see.
------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links
<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
 |