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

Re: [EquisMetaStock Group] Re: Full Moon/New Moon indicator



PureBytes Links

Trading Reference Links

Jose,
   
  Thanks for your reply however I found this code on your website last night. I have also found the MetaStock formula primer but I still have not found how to create vertical lines. Is it possible to create vertical Lines using MetaStock?
   
  Thanks
  Calvin

Jose Silva <josesilva22@xxxxxxxxx> wrote:
          To celebrate the auspicious Full Moon / Lunar eclipse last night, I've 
updated the Lunar Indicator code.

The Lunar Indicator is still as accurate as ever, but now incorporates a 
signal advance input (in calendar days) so that lunar signals may be 
shifted and viewed on weekends and trading holidays.

===========
Lunar cycle
===========
---8<-----------------------------------

{ Full/New Moon signals indicator MkVIII
Plots +1 signal on Full Moon; -1 on New Moon.
Accurate to within 1 minute per 69 years.

If FM/NM falls on a holiday or weekend,
signal is plotted on the next trading day.
Use the signal advance function to shift
signals and view on non-trading days.

©Copyright 2001~2007 Jose Silva.
The grant of this license is for personal use
only - no resale or repackaging allowed.
All code remains the property of Jose Silva.
http://www.metastocktools.com }

{ User inputs }
shift:=Input("Advance signal by x calendar days",-30,30,0);
TZ:=Input("Your local Time Zone? [-12 to +12hrs]",-12,12,7);
{ http://www.travel.com.hk/region/timezone.htm }

{ Lunar cycle }
LunarMonth:=29.530589;
Offset:=7.254621;

{ Calendar engine }
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)))))))))));
DayNr:=y+m+DayOfMonth()-TZ/24-Offset+shift+1;

{ Full Moon cycle }
FM:=Frac(DayNr/LunarMonth);

{ New Moon cycle }
NM:=Frac((DayNr+LunarMonth/2)/LunarMonth);

{ Lunar cycle signals }
cycle:=FM-NM;
FM:=cycle<0 AND Alert(cycle>0,2);
NM:=cycle>0 AND Alert(cycle<0,2);

{ Plot Lunar signals in own window }
FM-NM

---8<-----------------------------------

http://www.metastocktools.com
jose '-)

--- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxx> wrote:
>
> Hi Al
> 
> Go to http://www.metastocktools.com/#metastock and look for "Lunar
> Indicator", or go directly to
> http://www.metastocktools.com/MetaStock/Lunar.txt
> 
> If Jose says it's accurate then I believe him. I haven't checked it for
> myself.
> 
> 
> 
> Kind regards
> 
> Roy
> www.metastocktips.co.nz
> 
> 
> 
> 
> ----- Original Message ----- 
> From: Al Dina 
> To: equismetastock@xxxxxxxxxxxxxxx 
> Sent: Sunday, June 26, 2005 12:19 PM
> Subject: [EquisMetaStock Group] full Moon/New Moon indicator
> 
> 
> Hello,
> 
> A while ago, I believe that Jose or someone else posted the code for the
> Full Moon/New Moon. Does anybody have that code and do they know if it
> is accurate? 
> 
> Any help would be appreciated.
> 
> Thanks,
> Al



         


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/kOt0.A/gOaOAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/