Strategy Creation

5 Principles for Writing Your First Automated Trading Strategy

Vivek Sahni

If you’re looking for massive profits in the market, you will have to build a capable strategy. Crypto markets are inherently volatile, which is both an opportunity and risk. Are you ready to find out what it takes to create a good trading strategy on Tuned? Here are 5 principles we think make a killer strategy:

1. Choosing the right indicators:

This is the most important step when creating a trading strategy. The right indicators are the barebones of any trading script. With Tuned, you can use various indicators and any combination of them to get the right entry or exit signals. Trend, volatility, volume and momentum indicators are some popular ways to gauge the market.

2. Choosing the right time frame:

Once you have written a trading strategy in the Tuned script editor, you’ll want to test it on different time frames. Choosing the right time frame can be the difference between profitability or loss. Some markets may favor 1D candles, while others are good on 1H candles. Our high bandwidth backtesting system makes it easy to discover these optimal parameters. 

3. Choosing the right asset:

The right asset is the one with good volume and a good trading history. If an asset has both of these, the chances of slippage is much less while executing trades. While Tuned, always try to add pairs with good volume and history, you should always do your own research when choosing the right asset which is being traded with good volume and chances of market manipulation are much less.

4. Risk Management:

The goal is to minimize loss when the market moves against you. Crypto markets move randomly, and are often heavily influenced by each other. In trading, when we talk about risk management, we talk about taking profits and stopping losses. Trailing take profits or trailing stop losses also help in capturing profits during bullish times and stopping losses during bearish movements. You can make use of all these techniques on Tuned to manage your risk. In addition to this, tuned script has some dynamic buy/sell configuration which is a great method to do this. Taking steps now to manage risk will help protect your capital during unexpected circumstances.

5. Avoid Overfitting:

Overfitting is a curse in algorithmic trading. It’s characterized by strong backtest results, but unexpectedly weak live performance. This happens because the strategy’s parameters have been optimized for the limited data it was tested on, rather than adaptability in the market.

To avoid this, keep in mind that “Less is more” which means to not use dozens of indicators in combination and try to fit the curve, but to use few indicators and get the job done by optimizing your parameters accordingly.

We have great community support on Discord, help articles and thorough documentation to help kickstart your trading journey. Whether that’s trading with your own automated strategies or licensing your work to other traders, without revealing your source code, we want to help.

Starting with the Tuned Terminal

The Tuned terminal is where traders write code. Either in Tuned Script or with our alpha release of Pine Script. You can visit the terminal by logging in to your tuned account and click on the pencil icon just like below.

Once inside the terminal, you’ll be presented with our default script, the  TMA/DMA crossover. Save it, click Update Summary, and it will show you the Profit/Loss summary. You will also see profitable trades and other common metrics like profit factor, max drawdown. These will be important considerations when making that amazing trading strategy a reality. From here, you’re free to do as you please!

I am not a pro coder. Where do I start ?

Don’t worry, we’ve got you covered too. Tuned has a public library of scripts created by our community of traders. To access this library you can click on the burger menu which will open up a window containing sample strategies in both Tuned Script and Pine Script.

Now, you have a library full of scripts, which can be played around with and could turn out to be that perfect trading strategy. At the very least, by looking at different scripts in the public library, you can get used to the syntax of both Tuned Script and Pine Script.

I got stuck with my script. Can I get some help?

If you get stuck while writing that amazing script, don’t worry. Tuned documentation is where you’ve got all the workings of tuned scripting. It has everything you might need in order to get things going again if you are stuck. 

Other important documentation resources :

Other than Tuned documentation, we have a great Discord community of professional traders who can help you at the time of need.

Disclaimer: The opinions expressed here are for general informational purposes only and are not intended to provide specific advice or recommendations for any specific security or investment product. You should never invest money that you cannot afford to lose. Before trading using complex financial products, please ensure to understand the risks involved. Past performance is no guarantee of future results.

Get started now

for free, in the cloud, wherever you are.

All investing involves risk, including the possible loss of all the money you invest, and past performance does not guarantee future performance. Historical returns expected returns, and probability projections are provided for informational and illustrative purposes, and may not reflect actual future performance.

Tuned is not a broker-dealer, exchange, custodian, wallet provider, or counterparty. Investing in cryptocurrency is highly speculative and volatile. Tuned is only suitable for investors who fully understand the risk of loss and may experience large drawdowns. Investors should never invest more than they can afford to lose.

Apple, the Apple logo, iPhone, and iPad are trademarks of Apple Inc., registered in the U.S. and other countries and regions. App Store is a service mark of Apple Inc.

Google Play and the Google Play logo are trademarks of Google LLC.