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

Re: [amibroker] Blanking a selected number of bars at the end of a ticker



PureBytes Links

Trading Reference Links









Could make it a bit simpler

 

ThreeDayWeekend<span
>  = Dayofweek() &#8211; ref(dayofweek(),
1)  < 4 ;

 

Of course this does not take into account if the particular
days were an actual long weekend, or whether the Friday or Monday just were not
traded that day. So you could need to add in additional parameters for checking
against an index as example using the foreign type functions.

 

Gary, don&#8217;t forget that Easter is 4 day. (at least in
Australia)

 



Cheers,
Graham
http://e-wire.net.au/~eb_kavan/ 



<span
>-----Original Message-----
From: Gary A. Serkhoshian [mailto:serkhoshian777@xxxxxxxxx]

Sent: Sunday, June 27, 2004 8:27
PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Three Day
Weekend

<font size=2
face="Times New Roman"> 



<font size=2
face="Times New Roman">Howdy Bill,





<font size=2
face="Times New Roman"> 





<font size=2
face="Times New Roman">Something like this 





<font size=2
face="Times New Roman"> 





<font size=2
face="Times New Roman">ThreeDayWeekend =
(dayofweek() == 4 and ref(dayofweek(), 1) == 1) or (dayofweek() == 5 and
ref(dayofweek(), 1) == 2); //first scenario Friday holiday, second scenario
Monday holiday





<font size=2
face="Times New Roman"> 





<font size=2
face="Times New Roman">Since we know in advance
which weekends are 3 day, we can ref into the future with no worries : )





<font size=2
face="Times New Roman"> 





<font size=2
face="Times New Roman">Regards,





<font size=2
face="Times New Roman">Gary





<font size=2
face="Times New Roman"> 





<font size=2
face="Times New Roman"> 





<font size=2
face="Times New Roman"> 





<font size=2
face="Times New Roman">
billtex2003
<billtex2003@xxxxxxxxx> wrote:





I'v
been trying, without success, to write code identifying a three <font
face="Courier New">
day weekend.
I don't want to buy going into a three day weekend
or hold positions 
over such a weekend.
Any help is appreciated.



Check AmiBroker web page at:<font
face="Courier New">
http://www.amibroker.com/

Check group FAQ at: <a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html






<font
size=2 face="Times New Roman">





<font size=2
face="Times New Roman">Do you Yahoo!?
<a
href="">Yahoo!
Mail - 50x more storage than other providers! 

Check AmiBroker web page at:<font
face="Courier New">
http://www.amibroker.com/

Check group FAQ at: <a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html










Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












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 the Yahoo! Terms of Service.