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

Re: [amibroker] Pivot calculation question



PureBytes Links

Trading Reference Links

it is necessary to have various methods to calculate things as
sometimes the built in functions do not always work as expected. eg
timeframe indaily for intraday ASX goes from 2pm top 2pm, this
coincides with midnight US time which we have to endure with our
datafeeds. Bit like wanting to scan on the Last days n=3 goes from 2pm
(ASX time) as start of day (Yes I have passed this to support)

On 8/6/05, Steve <avalon-ardy@xxxxxxxxxxxxxxx> wrote:
> 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.
> 
> 
> 
> 
> 
> 
> 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=12hr3qj2q/M=362343.6886682.7839641.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1123312636/A=2894350/R=0/SIG=10tj5mr8v/*http://www.globalgiving.com";>Make a difference. Find and fund world-changing projects at GlobalGiving</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/