Planetary Cycles Indicator for ThinkorSwim

Picard

Picard

New member
This indicator is to show planetary cycles that can start from your selected date to display astrological turning points in the market. The inner planets are used for short cycles and the outer planets are used for longer cycles. The indicator provides the option to use smaller multiples of a planet's cycle for custom analysis. In order to use this indicator, the user will need to have knowledge of astrological trading methods. Examples of how to use this concept can be found on YouTube by searching for them. Link: https://tos.mx/qqN8cuT

Code:
declare upper;

input StartDate   = 20181226;
def StartBar = if GetYYYYMMDD() == StartDate then BarNumber() else StartBar[1];

input Planet = {Mercury, Venus, Moon, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, default Earth};
input PartialOrbit = 1;  # Divide Planet's Cycle Into Smaller Multiples
def PlanetaryCycle;

#########  Days In A Planet's Orbit ##########

def Moon = 27.32;
def Mercury = 87.9691;
def Venus = 225;
def Earth = 365.25636;
def Mars = 1.881 * Earth;
def Jupiter = 11.86 * Earth;
def Saturn = 29.46 * Earth;
def Uranus = 84.01 * Earth;
def Neptune = 164.8 * Earth;
def Pluto = 248.1 * Earth;

#==================================
#########  Selection Of Planets ##########

switch (Planet) {
case "Mercury":
    PlanetaryCycle = 88;
case "Venus":
    PlanetaryCycle = 225;
case "Earth":
    PlanetaryCycle = 365;
case "Moon":
    PlanetaryCycle = 27;
case "Mars":
    PlanetaryCycle = 687;
case "Jupiter":
    PlanetaryCycle = 4329;
case "Saturn":
    PlanetaryCycle = 10753;
case "Uranus":
    PlanetaryCycle = 30664;
case "Neptune":
    PlanetaryCycle = 60152;
case "Pluto":
    PlanetaryCycle = 90557;
}

#########  Vertical Lines ##########

AddVerticalLine(BarNumber() == StartBar, "                                       " + Planet  + "   " + AsPrice(GetYYYYMMDD()) + "    " + AsDollars(close), Color.Blue, Curve.FIRM);

AddVerticalLine(BarNumber() == StartBar + (PlanetaryCycle / PartialOrbit), "                                                            "  + Planet  +  " "  + AsDollars(close), Color.Blue, Curve.FIRM);

AddVerticalLine(BarNumber() == StartBar + (2 * (PlanetaryCycle / PartialOrbit)), "                                                            "  + Planet  +  " "  + AsDollars(close), Color.Blue, Curve.FIRM);

AddVerticalLine(BarNumber() == StartBar + (3 * (PlanetaryCycle / PartialOrbit)), "                                                            "  + Planet  +  " "  + AsDollars(close), Color.Blue, Curve.FIRM);

AddVerticalLine(BarNumber() == StartBar + (4 * (PlanetaryCycle / PartialOrbit)), "                                                            "  + Planet  +  " "  + AsDollars(close), Color.Blue, Curve.FIRM);

AddVerticalLine(BarNumber() == StartBar + (5 * (PlanetaryCycle / PartialOrbit)), "                                                            "  + Planet  +  " "  + AsDollars(close), Color.Blue, Curve.FIRM);

AddVerticalLine(BarNumber() == StartBar + (6 * (PlanetaryCycle / PartialOrbit)), "                                                            "  + Planet  +  " "  + AsDollars(close), Color.Blue, Curve.FIRM);
 
D

dinodotcom

Member
2019 Donor
Can you recommend any resources to learn about this topic that stands out from others as being the best resources?
 
A

Ahmar824

Member
VIP
I know creativity is key in trading but come on, you really think the planets have any merit in the movement of stocks? Seems far fetched. I'll check this out.

Take a look at the Hurst cycle indicator. It's very interesting. See if you can come up with something like this


 
Last edited by a moderator:
M

Miket

Member
@Picard Take a look at this book The Delta Phenomenon. Similar concept. Any way we adjust the indicator to show future full moons?
 
d4dahl

d4dahl

New member
@mcdon030 Yes, there's value in your script for sure. You just got to know how to read it. Pay attention to where the planet's longitudes cross each other and see if there's any price reaction. I might add, if you could somehow write the script so that when a longitude crosses 360° and loops back down to 1° we don't get that vertical line (see Post #12), it'd be perfect. Great work for sure though.

@Picard please email me when you have a moment. I've been looking for a Gann buddy =)
 
Last edited:
M

mcdon030

Member
@d4dahl Then the above script which was posted earlier/at the beginning of this thread is not what you want and the one I posted actually has the longitude coordinates of our solar system. I did way more than what your suggestioning ; i can add it should you wish.
 
d4dahl

d4dahl

New member
@Picard I think I spotted an error in your script (from Post #1). Take Mercury for example, you must remember that 88 calendar days is different than 88 bars. You'll need to take into account weekends and non-trading days for this script to be accurate. This holds true for the other planets, too. Hopefully you can figure it out! I wish there was some way to DM each other... I'd like to chat.
 
Last edited:
d4dahl

d4dahl

New member
@mcdon030 If you are saying that you can edit your script (from Post #7) with no vertical lines like this picture below, then yes please do. I would be forever grateful.

 
Last edited:
M

mcdon030

Member
@Picard I think I spotted an error in your script. Take Mercury for example, you must remember that 88 days is different than 88 bars. You'll need to take into account weekends and non-trading days for this script to be accurate. This holds true for the other planets, too. Hopefully you can figure it out! I wish there was some way to DM each other... I'd like to chat.
Review the link with real time data planetary data and the script. The longitude coordinates, both heliocentric and geocentric perfectly align. I don’t understand you when you say, “you must remember that 88 day’s is different than 88 bars”. If you review the script, it’s not based on any data within the thinkscript. It literally gives you the position of the planets based on solar coordinates. As I was saying, the only peice left would be offsetting price in some manner.
 
d4dahl

d4dahl

New member
@mcdon030 Please understand that I've been talking about two separate scripts, Picard's and yours. Both are potentially very useful. I've went back and edited my posts to try and clarify them. Your script is incredible. In a perfect world I'd like there to be no "loopback-vertical-line" which I've illustrated in Post #12, but I can live with it should you not be able to do such a thing.

To illustrate my point on Picard's script only about Bars vs Calendar Days, see pic below. It's a day chart on LULU. What I'm saying is that as a "bar counter" the script will be inaccurate to actual planetary day cycles. If it were accurate, the length of both would be the same.

 
Last edited:

Similar threads

Top