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

Re: [amibroker] Pivot calculation question



PureBytes Links

Trading Reference Links

Thank you once again Graham. It worked a treat. You're a great asset to the 
AB group.
I used the following to set pivots calculated on the London 24hr open-close 
ie.08:00 - 08:00
Database (eSignal) is set to local Aussie time with no offset.

mytime = TimeNum()==170000;
DayH = ValueWhen( mytime,Ref(HighestSince( mytime, H ),-1) );
DayC = ValueWhen( mytime,Ref(O,1), 2 ); // <-- used O = London 07:59 Close 
to keep pivots tidy.
DayL = ValueWhen( mytime, Ref(LowestSince( mytime, L ),-1) );



----- Original Message ----- 
From: Graham
To: amibroker@xxxxxxxxxxxxxxx
Sent: Saturday, August 06, 2005 1:08 PM
Subject: [trading] Re: [amibroker] Pivot calculation question


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.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12ho0srsv/M=362131.6882500.7825259.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1123308980/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/