PureBytes Links
Trading Reference Links
|
<x-html><html><head></head><BODY bgcolor="#FFFFFF"><p><font size=5 color="#0000FF" face="Arial">hi thank you for the indicator <br>i down load but cann't open I guss i am not so familer with the net and or ts<br>if you would be kind to give instraction on how to bring it in and use it I w'll app. <br>thank you have a great weekend .<br><br>----------<br>> From: Gary Funck <<u>gary@xxxxxxxxxxxx</u>><br>> To: RealTraders Discussion Group <<u>realtraders@xxxxxxxxxxxxxx</u>><br>> Subject: GEN: Full Moon indicator (EL code)<br>> Date: Friday, July 18, 1997 1:47 PM<br>> <br>> Traders, find below an Easy Language implementaiton of a calculation<br>> that approximates the phase of the moon, and an associated indicator<br>> and system. This calculation isn't as accurate as the method used<br>> by the authors of the TAS&C article, but has the advantages of being<br>> simple and implemented completely in EL.<br>> <br>> The Moonphase indicator is useful for giving a visual cue as to<br>> where the market is in the current lunar cycle, and might be combined<br>> with other indicators such as momemtum, or RSI to produce a useful<br>> system.<br>> <br>> Have fun with the code, and if you find any problems, or have<br>> suggestions for improvement, I'd like to hear from you. If<br>> you want to avoid the cut/paste exercise, pick up the<br>> EL archive at <u>ftp://www.intrepid.com/pub/gary/MOON.ELA</u><br>> <br>> howl on,<br>> <br>> - Gary<br>> <br>> {<br>> Function Moondays returns the number of days since a new moon.<br>> The values returned range between 0 and 29.<br>> (0 = new, and 15 is a full moon to +/- 2 day accuracy.)<br>> <br>> Author: Gary Funck, <u>gary@xxxxxxxxxxxx</u>, 7/15/97<br>> No restrictions on use/copying. No warranties, expressed/implied.<br>> <br>> This code uses an approximation described in the the "Astro FAQ";<br>> summarized below:<br>> <br>> Subject: C.11 How do I calculate the phase of the moon?<br>> Author: Bill Jefferys <<u>bill@xxxxxxxxxxxxxxxxxxx</u>><br>> <br>> John Horton Conway (the Princeton mathematician who is responsible for<br>> "the Game of Life") wrote a book with Guy and Berlekamp, _Winning<br>> Ways_, that describes in Volume 2 a number of useful calendrical<br>> rules. One of these is an easy "in your head" algorithm for<br>> calculating the phase of the Moon, good to a day or better depending<br>> on whether you use his refinements or not.<br>> <br>> In the 20th century, calculate the remainder upon dividing the<br>> last two digits of the year by 19; if greater than 9, subtract<br>> 19 from this to get a number between -9 and 9. <br>> <br>> Multiply the result by 11 and reduce modulo 30 to obtain a<br>> number between -29 and +29.<br>> <br>> Add the day of the month and the number of the month (except<br>> for Jan and Feb use 3 and 4 for the month number instead of<br>> 1 and 2).<br>> <br>> Subtract 4.<br>> <br>> Reduce modulo 30 to get a number between 0 and 29. This is<br>> the age of the Moon.<br>> <br>> Example: What was the phase of the Moon on D-Day (June 6,<br>> 1944)?<br>> <br>> Answer: 44/19=2 remainder 6.<br>> <br>> 6*11=66, reduce modulo 30 to get 6.<br>> <br>> Add 6+6 to this and subtract 4: 6+6+6-4=14; the Moon was (nearly)<br>> full. I understand that the planners of D-day did care about the phase<br>> of the Moon, either because of illumination or because of tides. I<br>> think that Don Olsen recently discussed this in _Sky and Telescope_<br>> (within the past several years).<br>> <br>> In the 21st century use -8.3 days instead of -4 for the last number.<br>> <br>> Conway also gives refinements for the leap year cycle and also<br>> for the slight variations in the lengths of months; what I have<br>> given should be good to +/- a day or so.<br>> }<br>> inputs: dt(numericsimple);<br>> variables: x1(0), x2(0), x3(0), x4(0);<br>> x1 = mod(year(dt), 19);<br>> if x1 > 9 then x1 = x1 - 19;<br>> x2 = mod(x1 * 11, 30);<br>> x3 = month(dt);<br>> if month(dt) < 3 then x3 = x3 + 2;<br>> x4 = x2 + dayofmonth(dt) + x3 - 4;<br>> Moondays = mod(x4, 30);<br>> <br>> <br>> { <br>> Indicator Moonphase, returns a value between 0..100, that<br>> indicates (approximately) the fullness of the moon, where<br>> 0 is a new moon, and 100 is a full moon. This indicator<br>> calls the Moondays function, and is accurate to +/- 2 days.<br>> <br>> Accepts an input, offset, which should be in the range -14..14.<br>> Generally, you will not need to change the offset value, unless<br>> for example, you want the display to agree with the offset<br>> value used by Moontrade.<br>> <br>> Author: Gary Funck, <u>gary@xxxxxxxxxxxx</u>, 7/15/97<br>> No restrictions on use/copying. No warranties, expressed/implied,<br>> <br>> }<br>> input: offset(0);<br>> variables: dt(0), phase(0), mday(0);<br>> dt = juliantodate(datetojulian(date) + offset);<br>> mday = Moondays(dt); <br>> phase = 100*( mday / 15);<br>> if phase > 100 then phase = 200 - phase;<br>> plot1(phase, "moon phase");<br>> <br>> <br>> { <br>> System Moontrade - buy the new moon, and sell the full moon.<br>> <br>> Accepts an input, offset, which should be in the range -14..14.<br>> If the offset is +1, then the system buys at the open of the<br>> day of a new moon and sells at the open on the day of the full moon.<br>> <br>> Try optimizing the 'offset' (using a range -14..14 in steps<br>> of 1), or changing the system to only buy the new moon and<br>> go flat on the full moon, when trading decidedly bullish<br>> equity indexes.<br>> <br>> Author: Gary Funck, <u>gary@xxxxxxxxxxxx</u>, 7/15/97<br>> No restrictions on use/copying. No warranties, expressed/implied,<br>> <br>> }<br>> input: offset(0);<br>> variables: dt(0), dtnxt(0), mday(0), mdaynxt(0);<br>> variables: new_moon(true), full_moon(false);<br>> dt = juliantodate(datetojulian(date) + offset);<br>> dtnxt = juliantodate(datetojulian(date Tomorrow) + offset); <br>> mday = Moondays(dt);<br>> mdaynxt = Moondays(dtnxt);<br>> new_moon = mdaynxt < mday;<br>> full_moon = mdaynxt >= 15 and mday < 15;<br>> if new_moon then buy at market;<br>> if full_moon then sell at market;<br>> <br>> -- end --<br>> <br>> -- <br>> --<br>> | Gary Funck, Intrepid Technology, <u>gary@xxxxxxxxxxxx</u>, (415) 964-8135</p>
</font></body></html></x-html>From ???@??? Sun Jul 20 22:34:40 1997
Received: from smtp1.nwnexus.com (smtp1.nwnexus.com [198.137.231.16])
by mail1.halcyon.com (8.8.5/8.8.5) with ESMTP id PAA28539
for <neal@xxxxxxxxxxxxxxxx>; Fri, 18 Jul 1997 15:38:21 -0700 (PDT)
Received: from list.listserver.com (list.listserver.com [198.68.191.15])
by smtp1.nwnexus.com (8.8.5/8.8.5) with ESMTP id PAA13310
for <neal@xxxxxxxxxxx>; Fri, 18 Jul 1997 15:36:56 -0700
Received: from host (localhost [127.0.0.1])
by list.listserver.com (8.8.4/8.8.4) with SMTP
id OAA07639; Fri, 18 Jul 1997 14:55:31 -0700
Received: from emout14.mail.aol.com (emout14.mx.aol.com [198.81.11.40])
by list.listserver.com (8.8.4/8.8.4) with ESMTP
id OAA07546 for <realtraders@xxxxxxxxxxxxxx>; Fri, 18 Jul 1997 14:53:36 -0700
Received: (from root@xxxxxxxxx)
by emout14.mail.aol.com (8.7.6/8.7.3/AOL-2.0.0)
id RAA22216 for realtraders@xxxxxxxxxxxxxx;
Fri, 18 Jul 1997 17:53:59 -0400 (EDT)
Message-Id: <970718175357_474391683@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jul 1997 17:53:59 -0400 (EDT)
Reply-To: JColanzi@xxxxxxx
Sender: owner-realtraders@xxxxxxxxxxxxxx
From: JColanzi@xxxxxxx
To: RealTraders Discussion Group <realtraders@xxxxxxxxxxxxxx>
Subject: Re:option writers
X-Listprocessor-Version: 8.1 -- ListProcessor(tm) by CREN
X-UIDL: 3e189a012674d415d403520cc6b43282
I've updated my site stop by.
http://member.aol.com/jcolanzi/index.html
|