Forex review blog for you

My Forex review blog for you

img

How to Backtest a Trading Strategy Even if You Don’t Know Coding

/
/
/
13 Views


Has this ever happened to you?

You learn a new trading strategy and it seems to work for a while.

But shortly… you encounter a series of losing trades and you conclude your trading strategy isn’t working anymore.

So, you start looking for another trading strategy and the cycle rinse repeat itself.

That’s until you give up on trading or, you find a conviction to stick to your trading strategy.

Now you’re probably wondering:

“How do I find conviction in my trading strategy?”

Well, you need to learn how to backtest a trading strategy.

And don’t worry if you have no coding experience because I’ll share a few ways you can go about it.

You ready?

Then read on…

The ONE thing you must have before you can backtest any trading strategy

Before I begin, let’s make sure you understand the meaning of backtesting.

Here’s my definition of it:

Backtesting refers to testing your trading strategy on historical data and see how it performs over time.

You might be wondering:

“Why do I want to backtest my trading strategy?”

Here’s why…

  • Backtesting your trading strategy tells you whether you have an edge in the market without risking any real money
  • If your trading strategy works, it gives you the confidence to stick to it — while other traders doubt themselves and their strategy (especially during a drawdown)

But before you can backtest any trading strategy, you must have a trading plan (a set of rules that guides your trading decisions).

Because you don’t want to look at a chart and wonder:

Should I enter a trade now?

Where do I set my stop loss?

How do I exit my winning trades?

This ruins your backtest and you’ll have inaccurate results.

So if you don’t want this to happen to you, then your trading plan must answer these 7 questions…

  1. What are the conditions of your trading setup?
  2. How much do you risk per trade?
  3. Which timeframe are you trading?
  4. Which markets are you trading?
  5. What is your entry trigger?
  6. Where is your stop loss?
  7. How will you exit your winners?

Once you’ve developed your trading plan, then you’re ready to backtest your trading strategy.

And here’s how…

How to backtest trading strategies in MT4 or TradingView

This is an approach to backtest your trading strategy if you have no programming knowledge.

The idea is to “hide” the future data and go through the chart bar by bar, and objectively trade the markets (as though it’s live).

You might be wondering:

“How do I do it?”

You can use a free charting platform like MT4 or TradingView.

Here’s how…

  1. Select the market you want to backtest and scroll back to the earliest of time
  2. Plot the necessary trading tools and indicators on your chart
  3. Ask yourself if there’s any setup on your chart
  4. If there is, mark your entry, stop loss, profit target, and record the results of the trade
  5. If there isn’t, press F12 and move the chart forward bar by bar (and it’s the à arrow key for TradingView)
  6. Repeat steps 3 – 5

Now, go watch this training video below for a detailed explanation…

The pros:

  • No coding required
  • It is free

The cons:

  • It is tedious
  • Easy to make mistakes when tracking your results
  • You’ll suffer from look-ahead bias that will skew your results (this means you know ahead what happens on the charts which affect your current backtesting trading decisions)
  • It’s difficult when your trading takes into consideration multiple timeframes
  • Limited historical data available

If you agree there are many downsides to manual backtesting, then the next backtesting approach will make your life easier.

Read on…

Forex Tester: How it can help you backtest your trading strategy with ease

So what is Forex Tester?

It’s a paid backtesting software for Forex traders that overcomes some of the downsides of manual backtesting.

Now, it’s not within the scope of this article to explain how to use Forex Tester. But if you want to learn more, you can check out Forex Tester here.

The pros:

  • No coding required
  • More historical data to work with
  • You can apply multiple timeframes in your backtesting
  • It tracks your trading results whenever a trade is closed

The cons:

  • It’s a paid program
  • It’s only for Forex markets and nothing else
  • It is tedious (but not as bad as manual backtesting)
  • You’ll suffer from look ahead bias that will skew your results

Amibroker: How to backtest a trading strategy without suffering from look-ahead bias

You probably realized that the look-ahead bias is something you can’t prevent if you’re doing manual backtesting.

So is there a solution to it?

You bet!

And the beauty is… you still don’t need to know a single line of code.

Allow me to introduce you… Amibroker.

Amibroker is a powerful trading platform that lets you backtest your trading strategy (and it usually requires you to have programming knowledge).

However, there’s a feature called AFL Code Wizard that lets you convert English sentences into the code.

This means you don’t need to know programming to backtest your trading strategy — and you don’t suffer from the look-ahead bias.

The pros:

  • You can backtest your trading strategy without suffering from look-ahead bias
  • A powerful backtesting software that’s used by Professional Systematic Traders

The cons:

  • If you want to exploit the full features of Amibroker, you must learn to program
  • There’s a learning curve involved
  • It’s a paid software

At this point…

I’ve shared with you 3 ways you can backtest your trading strategy. However, it will only get you so far.

If you want to know whether your trading strategy works, you must trade it in the live markets.

And in the next section, I’ll share more details about it…

Forward testing: How to stress test your trading strategy in real time

You might be wondering:

“What is forward testing?”

Well, it’s testing your trading strategy in real time and not on historical data. So, you have confidence that your trading strategy actually works.

The approach to forward testing is similar to backtesting. But the difference is you’re doing it in real time.

Here’s how:

  1. Plot the necessary trading tools and indicators on your chart
  2. Watch the live markets for your trading setups
  3. If there’s a setup, take it and record down the results
  4. Rinse repeat till you have 100 trades

And here are the metrics you’d want to record:

Date – Date you entered your trade

Time Frame – Time frame you entered on

Setup – Trading setup that triggers your entry

Market – Markets you’re trading

Lot size – Size of your position

Long/Short – Direction of your trade

Tick value – Value per tick

Price in – Price you entered

Price out – Price you exited

Stop loss – Price where you’ll exit when you’re wrong

Profit & Loss in $ – Profit or loss from this trade

Initial risk in $ – Nominal amount you’re risking

R – Your initial risk on the trade, in terms of R. If you made two times your risk, you made 2R.

An example below:

The pros:

  • No coding required
  • You don’t suffer from the look-ahead bias
  • You can do it on demo without risking any real money

The cons:

  • If your trades are on the higher timeframe, it can take you months or even years to come up with 100 trades

Trading backtesting software and tools

Here’s a list of software and tools to help you backtest your trading strategy…

TradingView

A free cloud-based charting platform that lets you do manual backtesting and forward testing.

MT4

A free charting platform that lets you do manual backtesting and forward testing.

Simple Forex Tester

Note: I’ve not used this before so please do your own due diligence.

For those of you who prefer to do your backtesting within the MT4 software, this is a paid add-on that allows you to do it.

Forex Tester

A paid trading software that lets you do manual backtesting with ease.

Amibroker

A paid trading software that lets you do automated backtesting even if you don’t know coding.

Conclusion

So here’s what you’ve learned:

  • Why you must define your trading strategy objectively before backtesting it
  • How to backtest a trading strategy on MT4 and TradingView
  • The pros and cons of different backtesting approach
  • How to forward test your trading strategy
  • Trading backtesting software and tools you can use

Now, here’s what I’d like to know…

How do you backtest your trading strategy?

Leave a comment below and let me know your thoughts.





Source link

  • Facebook
  • Twitter
  • Google+
  • Linkedin
  • Pinterest

Leave a Comment

Your email address will not be published. Required fields are marked *

This div height required for enabling the sticky sidebar