Discover Professional Price Action Strategies That Work So You Can Profit In Bull & Bear Markets—Without Indicators, News, Or Opinions

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

Last Updated: September 6, 2023

By Rayner Teo

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 with you a backtest trading strategy and a few ways you can go about it when 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 time frame 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 backtesting forex with 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 a 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
  • Using MT4 is mostly limited to backtesting forex

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

backtesting

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 backtesting trading strategies
  • 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.

backtesting

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 when it comes to backtesting trading strategies — 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

MetaTrader 4 & 5: How to create your Expert Advisor to backtest and trade automatically

MetaTrader 4 & 5 is the most popular platform in the Forex space.

Do you agree?

Now…

I’m sure you can also agree with me how popular Expert Advisors or trading robots are.

Gurus promises you double returns in just a few months if you purchase their trading robot.

The result?

You either:

  • Get scammed
  • Bend the rules
  • See your trading account trickle down to zero

So…

What if you can create your trading robot even if you can’t code.

At the same time, you don’t need to learn a new trading platform you’re unfamiliar with?

All that is possible with EA Builder.

backtesting, b, B

It is a flexible platform where you have vast amounts of options to choose on what your entries and exits should be.

backtesting, b, B

The best part?

It even lets you upload your indicator to add to the selection!

backtesting, b, B

In the end, the platform generates your selection into code, and all you have to do is press download and insert it to your MetaTrader 4/5 platform.

backtesting, b, B

Yes, all of those codes are generated by the platform itself.

All you have to do is copy and paste or download the Expert Advisor itself.

Sounds good, right?

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:

backtesting

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.

There you go.

If you want to know how to back test trading strategy, then you can always refer to this guide anytime.

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.

Leave a reply

  • BY HAND

    Either live or on replay.

    If you do not then you do not really know your system inside and out.

    The ONLY exception is if it is a coded one that cannot be done by hand and is too complex. Then you need to run test after test after test after test. Thousands are necessary. Ten thousand test when coding is necessary. One thousand by hand. THOSE ARE MINIMUM’S!

  • Ray, I would suggest using Trading Simulator. Download Admiral Market’s Mt4. It comes with A trading simulator that will allow traders to ‘Simutrade’. Load up any time period n test you strategy out. Test your decision making process.

  • I have used Ninjatrader to backtest. It has an interface that allows you to do a lot without any coding knowledge but this does limit your testing. However I have found coding remarkably simple to do following help instructions that come with Ninjatrader.

  • Hi Rayner
    Yesterday i read ur price action strategy, i was just wondering to forward test n today u send the email of backtest n forward test, now without a second thought i will do it tomorrow….. Thnx

  • For MT4 I use a Simulator EA from Soft4FX which costs about US$100 one time payment, which allows to download tick data from a couple of different sources back to around 2003. It can basically be used with any custom indicators or templates on MT4 and you can’t see what’s coming. There are also a heap of stats functions that go with it. It is something I use a lot as it is just that good. Cheers.

  • It’s really very helpful your all post and mail. I get very frustrated after some lose but when I joined you I feel some relief. But steel my past is not leaving me.

  • Hi Rayner
    I have been looking at ProRealTime for backtesting.It has OK charts, but main drawback is delayed daily data unless you subscribe (I have not yet). Apparently when you subscribe, you have a choice of connecting to execute via Interactive Brokers or IG. If active, subscription is waived, so this not a problem if you are active.
    If not an experienced coder, they have a “no-experience necessary” strategy builder, but I am finding this a little clunky…. maybe it is just me though.
    I have also been using the replay mode of TradingView…. but you know this platform.
    Regards
    Richard

  • Hi Rayner,

    Currently I’m using the bar replay feature in TradingView for backtesting.
    Still can do it similar to forward testing.

    Just use the feature Go To Date (to go back to certain date in the past), then activate the bar replay to hide all the future candlestick and start back testing from there. Then manually Forward/Play the price one candle at a time like a live market, but the only difference is we forward it by hand. Quite a great feature in TradingView.

    Make a journal like usual, and review it.
    Thanks.

  • Woah! I’ve actually been doing this since the I started trading whenever I learn a new strategy, I try to backtest it this way and nobody has ever taught anything about backtesting to me though. Anyway, very nice read. I could still learn a thing or two in this blog entry that you wrote.

    Thanks! Rayner.

    Best Regards,

  • Thanks for the review, Rainer. I can share another tester https://youtu.be/nUPRlnOZ45c
    I liked that they have the ability to add any characteristics to each operation and the function of quick lot calculation – it really saves your time. Then you can analyze when your strategy works better or worse.

    All the best, Andy

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
    >