OPEN-SOURCE SCRIPT

Winter Is Coming (Snowflake)

While attempting to draw a star using Pine Script, I ended up creating another nonsense indicator 🙂

How to Draw a Dynamic Snowflake? 🤦‍♂️
This indicator provides a customizable snowflake pattern that can be displayed on either a linear or logarithmic chart. Users can change the number of vertices and notches to make the pattern dynamic and versatile. (For added fun, the skull emojis that appear on each tick can be replaced with other symbols, like 🍺—because, hey, it’s Christmas!)

What Can You Learn?
Curious users analyzing this script can uncover practical answers to these questions:
How can line and label drawings be constructed using array functions?
How can trigonometric and logarithmic calculations be implemented effectively?

Details:
The snowflake is composed of symmetrical branches radiating from a central point. Each branch includes adjustable notches along its length, allowing users to control both their count and spacing. At the center of the snowflake, an n-point star is drawn (parameter: gon). This star's outer and inner vertices are aligned with the notches, ensuring perfect harmony with the snowflake’s overall geometry. The star is evenly spaced, with each of its points separated by 360/n degrees, resulting in a visually balanced and symmetrical design.

Best Wishes
I hope 2025 will be the year when we can create more peace, more freedom and more time to drink beer for the whole planet! Happy New Year everyone!
christmasPine utilities

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer