tradeforopp

Spongebob [TFO]

This Spongebob indicator is an experiment with the newly released polyline drawing features in Pine Script. As someone that enjoys a challenge, I thought of a complex subject to draw with polylines, and Spongebob was one of the first things that came to mind due to his wavy body shape. Although, other features like the shoulders, shoes, and hands proved to be much more difficult than the body shape itself.


With this indicator enabled, Spongebob will be automatically be drawn on the last confirmed bar of the current chart, and should mostly auto-fit to any symbol's price axis through use of the Average True Range (ATR) function. ATR allows us to get the average range of the most recent bars (in this case I used 50 bars). I used this as a base value from which to scale and determine various heights of each body shape, like the radius of the eyes, the length of the pants, etc. - that way, it would scale to any price axis, from forex to index futures.


Attached is a picture of the indicator (left) compared to my subject reference (right). I'm honestly surprised at how well it came out, and how intuitive it was to form the majority of my shapes using polylines. I'm really happy with how this project turned out, and may have to attempt more drawings in the future!


Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?