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

Re: [amibroker] Getting the date of a one-minute bar as an Alternative to changing TimeFrames!


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] Getting the date of a one-minute bar as an Alternative to changing TimeFrames!
  • From: "Ara Kaloustian" <ara1@xxxxxxxxxx>
  • Date: Sun, 14 Sep 2008 22:26:47 -0700

PureBytes Links

Trading Reference Links

Try this:
 
DayChange = Datenum() != Ref(DateNum(),-1);
 
PriorDate1   = ValueWhen(DayChange,Ref(DateNum(),-1),1);
PriorDate2   = ValueWhen(DayChange,Ref(DateNum(),-1),2);
etc
----- Original Message -----
From: ozzyapeman
Sent: Sunday, September 14, 2008 9:32 PM
Subject: [amibroker] Getting the date of a one-minute bar as an Alternative to changing TimeFrames!

Hoping someone can help with this.

In a BarCount loop with a one-minute chart, how do we find the date of a given bar, and compare that value to the dates of any other bar? I simply want to find the values of the last three DAILY closes.

Right now, I am using the following to find that last three DAILY closes from any given bar in my one-minute time frame, but these TimeFrame calls are slowing down my AFL horrendously:

for (i = start; i < BarCount; i++)
{
.
.
.
// Get last 3 Daily Closes for trending tests
 
  C1          =     TimeFrameGetPrice( "C", inDaily, -1 ); 
  C2          =     TimeFrameGetPrice( "C", inDaily, -2 );
  C3          =     TimeFrameGetPrice( "C", inDaily, -3 );



So instead of the above, I want to stay with my one-minute time frame and somehow find the last three daily closes by figuring out which one-minute bars correspond to the closes of the three previous days. Any ideas or can someone point me to the right resource?

Thanks!

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___