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

Re: [amibroker] Pivot calculation question



PureBytes Links

Trading Reference Links

mytime = timenum()==170000; If 170000 does not always appear then you
may need to use Cross(timenum(),170000) or Cross(timenum(),165959)
check against your bar timing set up in preferences

Assuming the period closes at 170000 and opened at previous 170001
then you could use something along these lines. Just do some testing
to check my syntax and logic is correct

mytime = timenum()==170000; 
PeriodHigh = valuewhen( mytime, ref(highestsince( mytime, H ),-1) );
PeriodClose = valuewhen( mytime, c );
PeriodOpen = valuewhen( mytime, ref(O,1), 2 );
PeriodLow = valuewhen( mytime, ref(lowestsince( mytime, L ),-1) );

remember this is just one way to do things, and may not be the best or
the most recent method available, just one that comes to mind as
typing.


On 8/6/05, Steve <avalon-ardy@xxxxxxxxxxxxxxx> wrote:
> Is it possible to calulate pivots based on a timeframe that spans 2 days?
> ie. calculate H,L,C from say 17.00 yesterday till 17.00 today. If so, any
> pointers?
>  I've experimented with Timenum() but it is only good for current 24hr
> period & I'm not sure how to use it to reference a previous 24hr period. And
> I don't think the TimeFrameGetPrice() can be used in this instance either.
> 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 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 --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hbeb97s/M=362131.6882500.7825259.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1123304909/A=2889190/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Put more honey in your pocket. (money matters made easy) Welcome to the Sweet Life - brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

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/