OPEN-SOURCE SCRIPT
[PX] Moon Phase

Hello guys,
while scrolling through the public library, I was surprised that there was no Open-Source version of the Moon Phase indicator. All moon phase indicators in the public library were either protected or not exactly what I was looking for. There is a built-in "Moon Phase" indicator, but even for this one, we can't access its source code.
Therefore, I started searching for an algorithm that I could implement into PineScript.
So here we go, an Open-Source Moon Phase indicator. It comes with the option to color the background based on the recent moon. Compared to the built-in indicator, the moon is slightly shifted, because it is centered on the candle and not plotted between two candles like the built-in indicator is doing it.
Feel free to use the indicator for your analysis or build on top of it in an open-source fashion.
Happy trading,
paaax :)
Reference: This indicator is a converted and simplified version of the original javascript algorithm, which can be found here.
while scrolling through the public library, I was surprised that there was no Open-Source version of the Moon Phase indicator. All moon phase indicators in the public library were either protected or not exactly what I was looking for. There is a built-in "Moon Phase" indicator, but even for this one, we can't access its source code.
Therefore, I started searching for an algorithm that I could implement into PineScript.
So here we go, an Open-Source Moon Phase indicator. It comes with the option to color the background based on the recent moon. Compared to the built-in indicator, the moon is slightly shifted, because it is centered on the candle and not plotted between two candles like the built-in indicator is doing it.
Feel free to use the indicator for your analysis or build on top of it in an open-source fashion.
Happy trading,
paaax :)
Reference: This indicator is a converted and simplified version of the original javascript algorithm, which can be found here.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
🙋♂️Listed as "Trusted Pine Programmer for Hire"
💰Save $30 on your Tradingview subscription: bit.ly/3OtLyNz
🔓Indicator access: dize-trading.de/
🔒Trial access: discord.gg/DqwKjBZ8Qe
💰Save $30 on your Tradingview subscription: bit.ly/3OtLyNz
🔓Indicator access: dize-trading.de/
🔒Trial access: discord.gg/DqwKjBZ8Qe
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
🙋♂️Listed as "Trusted Pine Programmer for Hire"
💰Save $30 on your Tradingview subscription: bit.ly/3OtLyNz
🔓Indicator access: dize-trading.de/
🔒Trial access: discord.gg/DqwKjBZ8Qe
💰Save $30 on your Tradingview subscription: bit.ly/3OtLyNz
🔓Indicator access: dize-trading.de/
🔒Trial access: discord.gg/DqwKjBZ8Qe
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.