Basics ยป Introduction


Preface

So you've binge-watched a few (dozen?) videos on YouTube where you've learned about various trading strategies and wondered whether they are as good as they appear to be.

A few years ago, we were in the same situation and asked the same question. Longing (no pun intended) for an answer, we have decided to turn some of the strategies into code and execute them on historical price data to give us an idea of how they performed in the past.

Running a trading strategy on historical price data is called backtesting. The theory behind backtesting is that if a strategy shows positive results when used in the last few years, it may indicate that it will continue to produce positive results in the coming years. The opposite is also true; if a strategy performed horribly in the past, it would likely continue to perform poorly in the future.

Well, at least that's the theory. But how true it is? Can past performance be indicative of future results? Try typing "past performance future results" into Google, and you will find that ~1.2 billion pages say that past performance does not guarantee future results...

So what is the point of backtesting if we cannot use past performance to predict future results?

That is an excellent question! We are not here to convince you whether backtesting "works" or not - you are encouraged to learn more about the concept to understand its limitations. All we are doing is that we provide you with tools to speed up the backtesting procedure. It is up to you to decide how you interpret the results and whether you will start trading a strategy based on what the backtesting results are showing you.

Our scripts can backtest a trading strategy on years* worth of price data. If you are happy with the backtesting results and want to live trade a strategy, the scripts can help you with this. Simply set up the strategy the way you desire, and enable the various Long and Short alerts. Then whenever the strategy decides to open or close a position, it can notify you to act accordingly. Alternatively, if you wish to auto-trade a strategy, you can also have the scripts send a webhook message to your chosen 3rd party trade execution platform (such as 3Commas, Alertatron, Capitalise.ai, Cryptohopper, etc.) to automatically open/close a position for you on your behalf.

*: Requires Premium TradingView subscription to access the Deep Backtesting feature.

Further reading