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

[amibroker] Re: Moon Phase Indicator



PureBytes Links

Trading Reference Links

Thank you, Dave. 
Was hoping someone had the AFL, but this link is a good step forward.
Very surprising, that after so many years of AB, nobody programmed a 
moon phase AFL!?

> > > 
> > > { Full/New Moon signals indicator MkVI }
> > > { Accurate to within 1 minute per 69 years }
> > > { ©Copyright 2002-2004 jose silva }
> > > { For personal use only }
> > > { josesilva22@xxxx }
> > > 
> > > { Plots +1 signal on Full Moon; -1 on New Moon }
> > > { If FM/NM falls on a holiday or weekend,
> > >   signal is plotted on the nearest trading day }
> > > { Warning: will not plot last FM/NM signal
> > >    until it is confirmed on next trade day }
> > > 
> > > { Input your world time zone }
> > > TZ:=Input("Your Time Zone?  (-12 to +12hrs)",
> > >  -12,12,10);
> > > 
> > > { Lunar cycle }
> > > LunarMonth:=29.530589;
> > > Offset:=7.254621;
> > > 
> > > { Calendar }
> > > leap:=Frac(Year()/4)=0 AND Frac(Year()/100)<>0
> > >  OR Frac(Year()/400)=0;
> > > y:=Year()*365+Int(Year()/4)
> > >  -Int(Year()/100)+Int(Year()/400);
> > > m:=
> > >  If(Month()=2,31-leap,
> > >  If(Month()=3,59,
> > >  If(Month()=4,90,
> > >  If(Month()=5,120,
> > >  If(Month()=6,151,
> > >  If(Month()=7,181,
> > >  If(Month()=8,212,
> > >  If(Month()=9,243,
> > >  If(Month()=10,273,
> > >  If(Month()=11,304,
> > >  If(Month()=12,334,
> > >  -leap)))))))))));
> > > CurrentDay:=y+m+DayOfMonth()-TZ/24-Offset;
> > > 
> > > { Full/New Moon }
> > > FM:=Frac(CurrentDay/LunarMonth);
> > > NM:=Frac(FM+0.5);
> > > 
> > > { Plot in own window below chart }
> > > (PeakBars(1,FM,.01)=0)-(PeakBars(1,NM,.01)=0)
> > > 
Anyone able to translate this?

--- In amibroker@xxxxxxxxxxxxxxx, "MarketMonk777" <dlittner@xxx> 
wrote:
>
> Hi Stef,
> 
> Check out this link:
> http://www.purebytes.com/archives/metastock/2004/msg05973.html
> 
> The code is for MetaStock but am fairly certain it can be converted.
> 
> And here is a long winded conversation about planet's and the 
markets:
> http://www.purebytes.com/archives/omega/2003/msg05801.html
> 
> And finally, code for Omega Tradestation, which is a little bit 
tougher in
> some cases to convert:
> http://www.purebytes.com/archives/omega/2002/msg00476.html
> 
> Regards,
> 
> Dave
> MarketMonk 
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On Behalf
> Of thorstef2003
> Sent: Sunday, July 09, 2006 9:31 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Moon Phase Indicator
> 
> Hi,
> I've gone through all the archives and nobody seems to have 
programmed an
> indicator to overlay moon pases on the price charts.
> Can somebody please provide a link or the AFL of a moon phase 
indicator?
> Thanks.
> Stef 
> 
> 
> 
> 
> 
> 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
>