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

[amibroker] Re: Subtracting time frames to figure what time frame you are in.....



PureBytes Links

Trading Reference Links

Okay, I am not sure if I've got what you are asking so correct me if 
I err:  
Assumed: bar(-2) and bar(-1) mean the two bars ago and one bars ago, 
respectively

yourvariable = TimeNum(Ref(C,-1)) - TimeNum(Ref(C,-2));

You have access to numerous different ways of calculating this 
(date's rather than times fo example) and can find these functions 
under the Date/Time Categorized AFL Function Reference.  Also, I may 
have reversed the order of subtraction from what you want but that's 
the gist of things.

--- In amibroker@xxxxxxxxxxxxxxx, "mleonsprint" <mleonsprint@xxxx> 
wrote:
> Do you know if there is a way or "HOW" you would subtract the bar 
> time from bar(-2) with bar(-1)?
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "rlb21079" <rlb21079@xxxx> wrote:
> > Check out the timeframe.dll in the 3rd party section of the 
> AmiBroker 
> > webpage.
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "mleonsprint" 
<mleonsprint@xxxx> 
> > wrote:
> > > I have built several indicators these indicators are used in 
> > several 
> > > time frames with slight adjustments in each time frame
> > > 
> > > so in one time frame I am using an rsi of 9 and in another time 
> > > period I am using an rsi of say 21, instead of having two 
> > indicators 
> > > I thought I could just make one indicator and subtract two bars 
> and 
> > > depending on that answer it would adjust for the value. 
> > > 
> > > So if you subtracted 8:49 from 8:44 you would have a difference 
> > > of "5" and that would give you the value used for a "5" minute 
> > chart 
> > > but if you subtracted 8:44 from 8:29 then you would get 
> back "15" 
> > > and thus a different value would be inserted into your rsi, the 
> > > problem is I cannot figure how to reference the time properly 
to 
> > > give me the values needed to complete, any suggestions ?
> > > 
> > > Thanks for your help
> > > Mark


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/