Why publish open-source indicators?

TVC:GOLD   CFDs on Gold (US$ / OZ)

Curious or incredulous traders often ask me why I publish my indicators open-source. There are many reasons; this is the long version of the answer.


I 💙 TV
I love TradingView. I share and respect its co-founders' objectives to demystify trading and markets, to empower traders with powerful tools and provide an environment where traders can learn and share openly. It is an honor for me to try to contribute something to this fantastic and unparalleled community.

Don't be a sucker
Throughout the relatively short, few centuries-old history of markets, a constant influx of newcomers has tried their hand at trading. The vast majority of them make the costly mistake of underestimating how difficult it is to extract money out of markets. They erroneously assume that a few tricks from experts are all that is needed, which creates a permanent, ongoing rush for ready-made recipes for success. This pressure to fast-track the road to profits creates a need for products and services promising just that, which savvy entrepreneurs unsurprisingly cater to. The fact that wide-eyed suckers will find innumerable offerings promising to fulfill their futile quest​ reinforces this tragic dynamic, and the illusion that somewhere out there, some traders hold closely guarded, bullet-proof and mysterious tricks to magically identify and extract alpha by loading an indicator on a chart. Once that delusion takes hold, greedy newcomers work under the assumption that if only they can put their hands on those "professional" tools, they will replicate the more often than not fictional successes advertised by large numbers of shady vendors.

I strive to publish tools that can hopefully be useful to some traders and show there is no mystery in the models that can be used to analyze markets and trade mechanically. I want to do my small part in expanding concepts on market analysis so that traders can readily see how simple models can be used as building blocks to assemble more complete trading techniques or systems.

As in life in general, I believe there is lots of opportunity in the markets. I believe there is always alpha to be discovered in the sum of all markets at any given time, and an infinite variety of means to mine it. I cannot prove it, but it is the postulate I work from. Because of the sheer size of the combined markets and the large number of skills one must master to trade profitably, I don't think sharing open-source indicators will ever reduce my own chances of retrieving alpha out of markets. There can be no durable monopoly of alpha extraction; I think that greed, human ingenuity and the ever-morphing markets are powerful enough forces to prevent that from ever happening.

Paying it forward
I very much enjoy reading indicator code from others. I like to explore new ways to analyze markets, and just as I relish well-written and useful books by great authors, reading good, ingenious code by conscientious coders is a real treat for me. Like all curious coders, I have learned a great deal from other coders' open-source code. I feel immensely grateful to them; it is only natural that I try to repay some of that gratitude by also publishing open-source. Hopefully others, in turn, can now learn from my code.

Repeatable models
I do not believe that patterns manually drawn or intuitively identified on charts, which I mischievously call chartstrology, can be useful to my trading practice. My nature makes me more comfortable with mathematical or logical models that repeat reliably. Even if they are designed using my biases or errors in judgment, they are in the open, able to consistently recalculate their results for traders who choose to use them. I also like that by publishing open-source, traders interested in using my scripts can ascertain for themselves that they do what I say they do. They can vet my code and figure out for themselves if my models can be integrated to their trading practice. Moreover, publishing my indicators open-source allows attentive traders to identify errors or opportunities for improvement, so I can correct and refine my scripts.

I think many traders, like good poker players, are people who have no qualms backing their opinions with money. They are the problematic type of people — I confess being among them — who will frequently ask you if you want to bet against them in an argument. By publishing my indicators, many of which are based on models I use to trade, I am putting my time and code where my mouth is, so to speak.

Learning — in trading or anything else — cannot be delegated. Learning sources can be purchased: universities, training providers and book authors all participate in that market, yet no escape exists from the reality that we must do the learning part ourselves. It is typically a long journey. Paying for the right to use indicators or trading systems that promise you profits is not purchasing a learning source; it is delegating the responsibility of applying knowledge you do not have — but should. By publishing good-quality open-source indicators, some of which, I like to think, rival the best indicators sold by vendors, I hope to help newcomers realize that powerful tools alone will not make them winners in the markets. Mastering tools and achieving success by trading actively requires years of effort and continuous adaptation. In the meantime, unmanaged, your bankroll is mere food for the sharks who have done and continue to do their homework every day they trade.

While writing more complex scripts may not be trivial, by publishing them I hope that traders serious about learning to trade using mechanical models can see that it is not necessarily out of their reach. It is the reason why I published my Backtesting & Trading Engine from the PineCoders account. I wanted to share a framework that traders can use to build their own automated trading system right here on TradingView. I subscribe to the principles laid out in TradingView's Script Publishing Rules, which allow traders to freely reuse my code privately, but not reuse it publicly or in for-sale publications without permission.

Form and function
As is the case for the majority of authors, and should for all, my published code represents a small portion of the Pine code I write — but it is the most polished. While I very much enjoy the rare occasions where I can come up with a somewhat original model, I think that providing flexible options and well-designed visuals to increase a model's usability is just as important. When I come up with what I think is a worthwhile combination, presenting it to others in a neat package that works well, can sustain scrutiny and be understood is always a stimulating challenge I look forward to.

Every day I have the immense privilege of sharing with members​ of PineCoders, a small group of exceptional coders and brilliant humans who share my drive to contribute to the at-large community on TradingView. These amazing programmers/traders are a constant source of inspiration that helps me continue to learn and code in Pine. My open-source scripts are a way of putting to use what I learn from these remarkable intellects who tolerate this old man and so generously share code, ideas and precious critique. I am also very lucky because PineCoders cooperate with the team of gifted developers from TradingView who have built the Pine programming language and who make the whole TradingView platform tick. These software engineers have taught me a lot, and their relentless professionalism provides me with constant motivation to honor their dedication. Publishing open-source is a way to showcase the masterpiece of a product that TradingView is.


I know quite a few authors who share many of my views. While they may not express them publicly, their first-rate open-source scripts speak for them.
Warm thanks to all of you, brothers in arms. Together​, script by script, we are building a legacy. 💙

What Is Good Code? describes the sort of code I strive to publish.
You can see some of the authors I follow from my user profile.
The PineCoders account follows an eclectic list of good authors of open-source scripts and publishes ideas and scripts to help Pine coders.
The Pine Wizards are the authors who have contributed the most to the community of TradingViewers.
The TradingView account also publishes open-source scripts, among many other publications.
"The stock market is a device for transferring money from the impatient to the patient."
— Buffet

Tools and ideas for all Pine coders: