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

[amibroker] Re: TimeFrameGet



PureBytes Links

Trading Reference Links

Thanks to you both
Actually now that I know there is an interval() function that defines 
the time frame in seconds, my problem is solved.

If I use Rakesh's suggestion:

INT_CHK=Interval();
Minutes_in = Param("Minutes in",60,30,120,5); //then
Offset = (Minutes_in * 60)/INT_CHK; //gives me an offset from the 
beginning of the day in any intraday time frame  - which is what I 
was looking for.

Great help here.
Thanks
Rick

--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> you can always set the code to find which bar it is
> your example
> WhichBar = valuewhen( timenum()==110000, barindex() );//assumes 
start at 10am
> 
> sometimes you may not get a bar at exactly the right time, so the
> alternative would be
> WhichBar = valuewhen( Cross( timenum(),110000, barindex() );
> you may need to adjust the time value depending if you have the bar
> times set to show the beginning or end time of the bar.
> 
> sop now if you want to find the value of an array at that time, you
> can either use the valuwhen, and replace the barindex() with your
> array, eg Close, or you can use Valuewhen( barindex()==whichbar, C);
> 
> Hope this helps a bit.
> 
> On 7/26/05, ricko8294_98 <ricko@xxxx> wrote:
> > Thanks Rakesh - that works
> > R
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, Rakesh Sahgal 
<rakeshsahgal@xxxx>
> > wrote:
> > > I have tried to move settings between daily and weekly
> > > views using the interval function. This is how I use
> > > it:
> > >
> > > INT_CHK=Interval();
> > >
> > > I_C_SWTCH= IIf(INT_CHK==inDaily,"your daily
> > > settings",IIf(INT_CHK==inWeekly,"your weekly
> > > settings",0)) ;
> > >
> > > HTH
> > >
> > > R
> > >
> > >
> > >
> > > --- Graham <kavemanperth@xxxx> wrote:
> > >
> > > > what things would you want to adjust?
> > > > timeframeset etc are set to whatever setting
> > > > (in---ly) you give them
> > > > and are not changed by the view setting.
> > > >
> > > > On 7/26/05, ricko8294_98 <ricko@xxxx> wrote:
> > > > > TJ
> > > > > There is a TimeFrameSet function to set the
> > > > intraday time frame and a
> > > > > TimeFrameGetPrice function, and others for
> > > > converting data to different
> > > > > time frames, etc., all of which are great.
> > > > >
> > > > > However, is there a way to "know" (i.e. as in a
> > > > function which might be
> > > > > called TimeFrameGet - as a companion to
> > > > TimeFrameSet) so that a program
> > > > > can automatically adjust things when one changes
> > > > the intraday setting
> > > > > using the View -- Intraday menu??
> > > > >
> > > > > Rick
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 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 other support material please check also:
> > > > > http://www.amibroker.com/support.html
> > > > >
> > > > >
> > > > > Yahoo! Groups Links
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Cheers
> > > > Graham
> > > > AB-Write >< Professional AFL Writing Service
> > > > Yes, I write AFL code to your requirements
> > > > http://e-wire.net.au/~eb_kavan/ab_write.htm
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam protection around
> > > http://mail.yahoo.com
> > 
> > 
> > 
> > 
> > 
> > 
> > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> > 
> > 
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 other support material please check also:
http://www.amibroker.com/support.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/