Astro: Moon SizeThe Astro: Moon Size indicator, built using AstroLib , calculates the distance and visualizes the apparent size of the Moon based on astronomical positioning. This script is tailored for the 1D timeframe and provides insights into lunar perigees (closest approach) and apogees (farthest distance), making it useful for astrologically-informed trading strategies.
New Astro Indicators Feature:
By setting the Julian Date to X number of days in the future, and offsetting the plot by X number of bars accordingly, it is now possible to visualize future projections of TradingView indicators that reference the AstroLib . This feature has been long requested and is far overdue, so thank you to everyone who pushed for this feature release. Enjoy, time travelers from the future!!
Key Features:
Moon Size Calculation: Uses Julian Date (J2000) conversion and AstroLib functions to determine the Moon's apparent distance.
Future Projection: Displays the Moon's distance from 28 up to 500 days ahead, with color gradients indicating proximity/size.
Pivot Identification: Marks local maxima (apogees) and minima (perigees) with labeled date stamps for easy reference.
Dynamic Labeling: Adapts label positioning and size based on the Moon's current trend and relative size.
Usage Notes:
⚠️ Timeframe Restriction: For now, the script only functions on the 1D timeframe and will prompt an error otherwise.
⚠️ Asset Restriction: This script is meant to be loaded on charts for assets that trade 24/7, like BTCUSD historical index.
Lunar
Lunar Cycles Projected Forward; Moon phases into futureProjecting Lunar Cycles/ half-cycles forward in time
User sets the recent Full moon in history to anchor from; Indicator projects 1/2 cycles forward in time
//inputs//
-input number of full lunar cycles to project forward from input full moon time
-choose color/opacity/border color/text display
Moon Phases + Daily, Weekly, Monthly, Quarterly & Yearly Breaks█ Moon Phases
From LuxAlgo description.
Trading moon phases has become quite popular among traders, believing that there exists a relationship between moon phases and market movements.
This strategy is based on an estimate of moon phases with the possibility to use different methods to determine long/short positions based on moon phases.
Note that we assume moon phases are perfectly periodic with a cycle of 29.530588853 days (which is not realistically the case), as such there exists a difference between the detected moon phases by the strategy and the ones you would see. This difference becomes less important when using higher timeframes.
█ Daily, Weekly, Monthly, Quarterly & Yearly Breaks
This indicator marks the start of the selected periods with a vertical line that help with identifying cycles.
It allows to enable or disable independently the daily, weekly, monthly, quarterly and yearly session breaks.
This script is based on LuxAlgo and kaushi / icostan scripts.
Moon Phases Strategy
Year/Quarter/Month/Week/Day breaks
Month/week breaks
Moon Phases/Apogee & Perigee/Eclipses/North Node by BTThis script helps us to display date of different lunar properties on price chart. Simply following items could be used to see dates.
New moon
Full moon
Apogee
Perigee
North node
I've used following web site (fourmilab.ch) for obtaining exact dates, according to web site "All dates and times are Universal time (UTC); to convert to local time add or subtract the difference between your time zone and UTC"
Moon Phases Strategy [LuxAlgo]Trading moon phases has become quite popular among traders, believing that there exists a relationship between moon phases and market movements. This strategy is based on an estimate of moon phases with the possibility to use different methods to determine long/short positions based on moon phases.
Note that we assume moon phases are perfectly periodic with a cycle of 29.530588853 days (which is not realistically the case), as such there exists a difference between the detected moon phases by the strategy and the ones you would see. This difference becomes less important when using higher timeframes.
Settings
New Moon Reference Date: Date of a new moon to be used as starting point for the cycle calculation. Buy: Determine the condition to be used to open a long position Sell: Determine the condition to be used to open a short position
Description
The strategy can use different buy/sell conditions, these are determined in the Buy/Sell settings drop-down menu.
By default, the strategy goes long on a new moon and short on a full moon. This setup is common since full moons are said to be related to depressed mood. However, it is possible to use inverse conditions.
Users can also go long on higher moons (new moons or full moons occurring at a price that is higher than the previous one when a new/full moon occurred) and short on lower moons, this would return a trend following strategy, using the inverse conditions (buy lower moons/sell higher moons) would return a contrarian strategy.
The above chart displays the strategy using default conditions.
The above chart displays the strategy of going long on a higher moon and selling on a lower moon.
Quick Summary
We provide a quick summary of the strategy using default conditions (buy on a new moon, sell on a full moon) on various tickers using the 4h timeframe (note that using a lower timeframe would return a backtest executing a lower number of trades).
Constant position sizing is used and no frictional costs are considered.
BTCUSD
The moon phases strategy has been regularly tested with BTCUSD, with traders highlighting how moon phases tend to occur during tops/bottoms. We test the strategy from 2019-01-06 00:00.
Net Profit: $68544.86 Closed Trades : 67 % Profitability : 50.75 Max Drawdown : $18541.24 Max
TSLA
The strategy is tested from 2011-01-04 14:30
Net profit: $349.17 Closed Trades : 265 % Profitability : 54.34 Max Drawdown : $262.72
EURUSD
The strategy is tested from 2018-01-16 14:00.
Net profit: $-0.18 Closed Trades : 91 % Profitability : 50.55 Max Drawdown : 0.36