PureBytes Links
Trading Reference Links
|
Yuki,
The Friday condition is
x=DayOfWeek()==5;
It is a binary condition. x is 1 on Fridays and 0 for the rest days.
When the month changes, the
Month()!=Ref(Month(),-1)
is true.
We have 5 possible Fridays in a month
1st Yellow
2nd Green
3rd Red
4th blue and
5th Black
A grey candle marks Fridays in general.
The rest are
Plot(C,"",IIf(x,colorLightGrey,colorBlack),64);
z1=x*(Sum(x,1+BarsSince(Month()!=Ref(Month(),-1)))==1);//1st trading
Friday
PlotShapes(shapeUpTriangle*z1,colorYellow);
z2=x*(Sum(x,1+BarsSince(Month()!=Ref(Month(),-1)))==2);//2nd
PlotShapes(shapeUpTriangle*z2,colorGreen);
z3=x*(Sum(x,1+BarsSince(Month()!=Ref(Month(),-1)))==3);//3rd
PlotShapes(shapeUpTriangle*z3,colorRed);
z4=x*(Sum(x,1+BarsSince(Month()!=Ref(Month(),-1)))==4);//4th
PlotShapes(shapeUpTriangle*z4,colorBlue);
z5=x*(Sum(x,1+BarsSince(Month()!=Ref(Month(),-1)))==5);//5th
PlotShapes(shapeUpTriangle*z5,colorBlack);
For a less academic approach, the 2nd Fridays are found by the F2
condition
x=DayOfWeek()==5;y=Month();
z2=ValueWhen(x,y,2);
F2=z2!=Ref(z2,-1);
Plot(C,"C",IIf(F2,colorLightGrey,colorBlack),64);
PlotShapes(shapeUpTriangle*F2,colorGreen);
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, Yuki Taga <yukitaga@xxxx> wrote:
> Hi DIMITRIS,
>
> Monday, March 15, 2004, 8:23:51 PM, you wrote:
>
> DT> Yuki, are you looking for the 2nd Friday or the 2nd trading
> DT> Friday of a month?
>
> Now that you mention it, DT, the second *trading* Friday would be
> more specific . . .
>
> Yuki
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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
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/
|