Easy Backtester PROWHAT IS EasyBacktester ?
EasyBacktester is a tool that helps you backtest trading strategies built by yourself with an included strategy builder and a multitude of options.
From within the parameters of the tool, you can specifically pick your entry settings across 12 most common indicators, such as "RSI", "MACD", "Moving Averages" etc... Then you can immediately visualise your setup's Stop-loss & Take Profit, your expected Profits & Loss and a lot of other statistics for your entry strategy. Once you are satisfied with your entry strategy, you are given a set of tools to optimize your setup using stop-loss rules, take profits rules, partial profits, trailing-stops, entry timing...
WHY IS THIS TOOL DIFFERENT ?
EasyBacktester is a backtesting engine with no coding skills required. TradingView allows for "Strategy Scripting" using PineScript, which is not an option for non-coder audience. EasyBacktester fills this gap and allow non-coders to get an idea of how their trading strategies may perform using mouse clicks only.
Some similar attempts have been made on TradingView, allowing some limited options, but none have the same capabilities EasyBacktester offers, for instance, as of April 2022 these features have not been seen in any other TradingView tools:
- partial take profits
- leverage simulation
- a multitude of trailing stop-loss possibilities including trail triggers and trail parameters
- visualisation of entries including stop-loss, take profits, partial take profits, and trailing stops. One can now visualize such complex setups.
- visualisation of Profits & Loss
- time in trade
- wait strategy after a signal: for example, when RSI is oversold, "WAIT until price retraces 100% of the original signal" amongst other possibilities
QUICK START GUIDE:
STEP 1: DEFINE YOUR SIGNAL STRATEGY
From the settings of the tool, find the "SIGNALS STRATEGY" section.
Select a type of entry you wish to simulate, for example "LONGs", and activate the checkbox right before "Simulate".
Right below, you will find 4 signal builder for you to play with and pick your strategy accordingly.
For example, to simulate a signal when RSI is oversold, follow these steps:
- On the 1st multiple choice box, select "RSI"
- On the 2nd multiple choice box, select "is below..."
- On the 3rd multiple choice box, select "OverSold level"
Don't forget to activate this rule by checking the checkbox in front of it.
After this first step, one should immediately see the chart affected with some plots. The dots represents the signal entry defined by the rule we just created, and the red/green boxes visually represent trades that could have been taken with this signal which, in this example, occurs "when RSI is below oversold level". Note that all specific parameters for RSI including its specific "oversold level" is customisable at the end of the tools settings along with all other indicators settings.
STEP 2: STATISTICS
By default, the "APPEARANCE" section only plots potential entry signals (materialized by dots) and actual entry boxes (materialized by red/green boxes).
But the user can easily add other precious statistics to the chart, and obviously the most important one for backtesting: Profits & Loss (P&L).
In the "STATISTICS" section please check the "P&L" box to see appear a chart of the simulated P&L for our example. You should immediately see a new graph below the chart representing the evolution of the P&L after each entry.
Other statistics are available to the user, including: Equity, Number of Trades, Time in Position, Number of trades Won, Number of trades Lost, Number of trades Stopped.
Play around with those to see them plotted on your chart.
STEP 3: OPTIMIZE YOUR ENTRY
Under the "ENTRY STRATEGY" section, one can pick how to enter AFTER the signal, which provides the user with an extensive flexibility to pick its timing.
Here there are a various set of choices offered, ranging from the default "Market Order at Next Candle Open", to "Limit Order: at signal's candle open" or even "Stop-Buy: at break of last candle high". As its name suggests, this option allows you to actually wait before randomly enter in trade.
It is important to also note that the user can totally prevent entry if the conditions are not filled after a customizable number of candles represented in "Max bars to wait for entry" (default being 1, meaning the engine will wait the condition to be filled during only 1 candle)
STEP 4: MANAGE YOUR RISK
Under the "RISK MANAGEMENT" section, the user is given a series of options to set the amount (s)he would like to risk.
This is extremely important to set, and is the result of a combination of customizable options including:
- the Initial Capital of the account
- the amount to risk per trade, and HOW to risk it: some fixed % the initial equity or adjust the stop-loss to the desired risk ?
- use of leverage or not
- initial stop-loss, as well as minimum and maximum
- trailing stop-loss: what should trigger the trailing ? and by how much should the engine trail ?
STEP 5: HAVE AN EXIT PLAN
Under the "EXIT STRATEGY", the user can define how to exit the trade.
For instance, here again a lot of options are given:
- Take Profit: exit at some level of profits defined by a multiple of the stop-loss, or a multiple of the ATR, or some % or points
- Partial Profit taking before exit
- Panic close position after some time spent on the trade
STEP 6: FURTHER OPTIMIZATIONS
Under the sections "Commissions" & "Calendar & Sessions", one can simulate real trading conditions by including commissions fees as well as filtering actual dates and trading sessions. These sections are straightforward for any user to use.
SETP 7: INDICATORS SETTINGS
Since EasyBacktester uses a predefined set of indicators to get started, those indicators are also customizable in the last section of the settings. Here, one can easily customize RSI periodicity, MACD lengths, Moving averages types & lengths, ATR, etc...
STEP 8: GOING FURTHER
This is only a start to give users an overview of how various options affect their trading performance. But of course, each trader has its special recipe and specific detailed setup that is not possible to embed in a single tool. For advanced simulation, EasyBacktester provides plug & play connectors for advanced users. Namely, there are 3 connectors:
- signal connector
- trail trigger connector
- exit connector
Each of these connectors are an opportunity to customize the engine signals, trail trigger and exit choices with the user's own options. This case does require a little bit of coding, but it can easily be implemented by copy-pasting existing resources or with a slight help of a professional. In fact, the only conditions to build a proper connector is to export a plot with the numbers 1 (for signals), 2 (for trigger trails) and 3 (for exits). Here is an example of custom SIGNAL connector compatible with EasyBacktester, to produce a signal when last RSI was below 30 and current RSI reads above 30:
============================================================
//@version=5
indicator("My custom RSI signal")
// when previous RSI 14 was below 30 and current RSI 14 is above 30, set "custom_signal" to 1, otherwise set "custom_signal" to 0
custom_signal = ta.rsi(close, 14) < 30 and ta.rsi(close, 14) > 30 ? 1 : 0
// Export a plot of "custom_signal", but do not display it
plot(custom_signal, title="my signal", display=display.none)
============================================================
Once this indicator has been built, the user only needs to connect it with EasyBacktester as follow:
1. Open a desired chart, and add both EasyBacktester indicator as well as the custom "My custom signal" we just created above.
2. Open EasyBacktester's settings, and in the first option, there is "Connect signals source" which by default is set to "close". In the multiple choices, find your custom signal which should be named something like "My custom RSI signal: my signal", generally speaking the name is built like this " : ".
3. Now the custom code is connected to EasyBacktester, but we need to indicate the engine we actually want to use it as custom signal.
4. Under the "SIGNALS STRATEGY" section, where we generally build signals rules, there is special rule for this specific connection named "Use external source as entry signal". Just check the checkbox to activate it and see how the chart took our custom signal into consideration.
That's it for the overview of EasyBacktester. Thank you for reading and happy trading :)
Backtests
Blackbox (Backtesting version)Blackbox Backtest version is a script with 12 built-in indicators, a list of different conditions you can check/uncheck to enter and exit the market on specific points and 3 different strategies styles.
Use this script to backtest different strategies.
It can't be used to create alerts.
If you found a good strategy and you want to do set alerts too you have to switch to Blackbox Alert version. It's the same script but without the strategy part.
Indicators:
Chaikin Money Flow
Chaikin Money Flow
Chaikin Oscillator
Volume Oscillator
Ichimoku Baseline
SSL
William R%
RSI
Bollinger Bands
ROC
RSI probability (custom)
EMAs
Aroon
ATR
... new indicators very soon
Conditions
Check/uncheck different conditions from setting panel for both entries and exits.
Combine them to create complex strategies and alerts.
This list is constantly updated.
Data Range
Set a data range to backtest.
From Year, Month, Day, Hour, Minute to Year, Month, Day, Hour, Minute.
Order size/settings
ATR Period
TP Multiplier (Used for Take Profit = ATR*TP Multiplier strategies)
SL Multiplier (Used for Stop Loss = ATR*SL Multiplier strategies)
Pips_tp Set a fixed amount of pips for your Take Profit level
Pips_sl Set a fixed amount of pips for your Stop Loss level
Select a strategy style
ATR as TP/SL
Fixed TP/SL
With Exit conditions
Stop Loss for exit conditions
Last update: 13/02/2020
Backtest PRO Suite+ (Plug & Play)Hello traders
I. SCRIPTS ACCESS AND TRIALS
1. For the trial request access, they have to be done through my website .
2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here : Daveatt
Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
3. Many video tutorials explaining clearly how all our indicators work are available on your website > guides section.
4. You may also contact me directly for more information
II. Backtest PRO Suite+ (Plug & Play)
2.1 Forewords
This indicator is available only to our PRO 12 months users. YES! I said indicator, and not strategy or backtest for an excellent reason.
We wanted to make it as generic as possible and allow anyone to connect any indicator of his/her choice in a few clicks only.
This is NOT possible (in TradingView) with a strategy/backtest, but only with an indicator - that's why we worked on recoding the whole backtest logic as an indicator.
The PRO edition does not handle any pyramiding/re-entry - as such enters only once per trend by design. This feature is reserved for our PREMIUM users.
2.2 🔎 Concept 🔎
This is an indicator that I saw on TradingView and was introduced by the @Pinecoders account on TradingView.
I inspired myself from his Backtest Engine to offer a version more adapted to my vision - The benefits of connecting yourself any indicator to our Backtest engine are amazing and huge.
The concept can't be more simple. Imagine using any indicator and connecting to a backtest system in a single click.
You may connect your Algorithm Builder also to this complete backtesting system in a single click.
What's better between paying thousands for a backtest, or connecting yourself your indicator to your backtest with a click?
That was a rhetoric question, but you can still share your answer with me if you want to :)
III. The amazing benefits of our🔌&🕹️ (Plug&Play) system
Issue #1 💲 A BACKTEST SYSTEM IS COSTLY 💲
Hiring a developer to code a custom indicator is costly. For a custom backtest it's even more expensive as those scripts are very often way more complicated.
Now imagine, that now that you see your idea live on a chart, you'll realize you'll have to finance another backtest system, as the one you have is not compatible with your new idea.
Solution #1 💲💲 YOU COULD BE SAVING SOME MONEY 💲💲
just because it won't be needed to hire someone else for each of your trading idea.
We will never guarantee your success on the market, but THIS I stand by it any day any hour.
You can connect any indicator or your choice by updating your indicator slightly and connecting it to our Backtest engine. We send the tutorial for doing it to all our customers.
Issue #2 🕔 IT'S TIME-CONSUMING 🕔
Even if someone is doing all the coding for you, it might require days/weeks depending on your overall trading strategy/idea.
Without even counting the time for you to test/validate the work done and all the back-and-forth to fix all the issues.
Solution #2 SAVING TIME MIGHT EQUATES TO SAVING MONEY : 🕔 = 💲💲💲
I wish it could be as easy as going from weeks of coding to "1 single click" :)
I did the heavy-lifting, but you'll have to make the last effort the cross the finishing line. I made it easy for you to play with it and find a configuration that makes sense to YOU and for your strategy/asset/timeframe
Issue #3 ❌ IT'S COMPLICATED ❌
Someone did a backtest code for you, but... you can't update it because you either :
- don't know anything in programming
- ... and don't have time to learn (most of us have a job/family/...life)
- The system you have is way too specific for one of your previous idea, but can't be updated easily for your next trading ideas. I see a lot of traders nodding right now thinking "that's soooooo true !!!!"
Solution #3 🎉 WE MADE IT EASY AND FUN 🎉
Our goal is to externalize the technical stuff that you don't want to take care of - so that you can finally focus on your trading and optimizing your ideas. #bold #statement
In case you're wondering, no we're not reading your mind :), but we're also traders who didn't know how to code before and had to hire external programmers to do the heavy work for us.
You can be sure that most of the frustrations (trading, technical, ...) you have/had, we had them also and that's why we created this backtest indicator.
III. 🔌&🕹️
Hope you're ready to be impressed. Because, what I'm about to introduce, is my best-seller feature - and available across many of my indicators.
In TradingView, there is a feature called "Indicator on Indicator" meaning you can use an external indicator as a data source for another indicator.
I'm using that feature to connect any external indicator to our Backtest PRO Suite+ (Plug & Play) - hence the plug and play name. Please don't make it a plug and pray :) it's supposed to help you out, not to stress you even more
Let's assume you want to connect your Algorithm Builder Single Trend+ to your Backtest PRO Suite+
I mentioned an Algorithm Builder but you may connect any oscillator (MACD, On balance volume, stochastic RSI, True Strenght index, and many more..) or non-oscillator (divergence, trendline break, higher highs/lower lows, candlesticks pattern, price action, harmonic patterns, ...) indicators.
THE SKY IS (or more likely your imagination) is the limit :)
Fear no more. The Plug&Play technology allows you to connect it and use it the backtest calculations.
This is not magic, neither is sorcery, but certainly is way beyond the most awesome thing I've ever developed on TradingView (even across all brokers I know). #bolder #statement
TradingView is the best trading platform by far and I'm very grateful to offer my indicators on their website.
To connect your external indicator to ours, we're using a native TradingView feature, which is not available for all users.
It depends on your TradingView subscription plan ( More info here )
If you intend to use our Algorithm Plug&Play indicator, and/or our Backtest Plug&Play suites, then you must upgrade your TradingView account to enjoy those features.
We value our relationship with our customers seriously, and that's why we're warning you that a compatible TradingView account type is required - at least PRO+ or PREMIUM to add more than 1 Plug&Play indicator per account.
We go in-depth on our website why the Plug&Play is an untapped opportunity for many traders out there - URL available on my profile status and signature
IV. 📊 Make it nice! 📊
Now we're getting right into the fun stuff.
Let's explore briefly each display option (symbolized by a 👁️🗨️ in the Backtest UI) :
- Color Traded Background : Color the chart background is green when in a BUY trade, in red when in a SELL trade. If the Backtest is not in a trade, then the background won't be colored.
- Show Entry/Exit Markers : Displays the entries (Enter Long/Enter Short), and exits (Exit Long/Exit Short) labels.
- Show Entry Level :Displays a blue level line to easily identify the entry price of a trade.
- Show Take Profit Level : Display a purple line to visualize where the Take Profit level is (we'll explain below how to set it up).
- Show In-Trade Stops : Display the stop-loss
V. Backtesting filters
A backtest should have some filters helping the traders testing a few hypotheses. Well.... we included a ton of them - even for the PRO version
Once again, thank you @Pinecoders for the help and support you gave me
5.1 ▄ █ Position sizing █ ▄
- 1. % of Equity: If selected, the position size used is the input to the right of 1. % of Equity.
Example: The trader starts with a capital of 100K. After a winning trade, your total capital is $103K - for the next trade the position size will be 3% of $103K
- 2. % of Capital: If selected, the position size used is the input to the right of 2. % of Capital.
In other words, the position size will always be the same position size as calculated on the initial capital.
Example: The trader starts with a capital of 100K. After a winning trade, your total capital is $103K - for the next trade the position size will be 5% of $100K. (As 100K is the initial capital used in our dummy example)
5.2⛔ Entry Stops and In-Trade Stops ⛔
We didn't reinvent the wheel here. Any good backtest should offer an entry stop-loss and an in-trade stop-loss.
Giving only here also an example among all the use cases. For instance, the trader sets a stop-loss 2% at the time of entry on your trade, but once the trade moves in the desired direction, the trader might want a trailing stop-loss using a 4% input.
Example: A trader goes LONG on only 1 "ABC" stock evaluated $10 per share.
1) The entry-stop loss will be 2% away so set at $8
2) A candle
3) The trailing stop will activate, and move the stop-loss from the entry stop-loss level (=$8) to $8.32 (=4% move up from $8) - and so on, and so forth for each time the price moves 4% up
The entry and in-trade stop losses can absolutely be identicals. There is no universal rule, and as always you know the drill - all depends on your backtest, and indicator configurations as a whole.
Last, but not the least, selecting an Entry stop-loss is mandatory, but the in-trade stop-loss is not. Up to you to decide if the in-trade SL is needed for your Backtest strategy.
5.3 ❌ Hard Exits ❌
We included the MACD hard exit indicator in the backtest - as we did also for the Algorithm Builders.
The hard exit (or invalidation) is a fundamental part of my trading method.
I explained numerous times on TradingView, our website, and social media channels why I "love" this concept so much, and how it saved my trading account numerous times from getting savagely wrecked by the market.
5.4 💲💲 Take Profit 💲💲
We only included 1 level of Take Profit so far. We'll work on adding at least one more soon.
You can set your Take Profit level based on either a:
1- Fixed value
2 - Percentage value
5.5 📆 Date Range Filtering 📆
If enabled, the backtest only uses the data between the starting and the ending dates of the defined range.
5.6 ❗❗ Fees and Slippage ❗❗
Too often completely ignored by many traders, the fees can eat gains out quickly/deepen one's capital faster than expected.
⚠️The fees vary between brokers, and asset traded - it could be recommended to check on your broker page what are the fees for the asset on your chart, and insert that percentage number.
Another cost ignored, even more, is the Slippage.
i.e. think about a Stop-Loss being hit, and we're so confused because we see on the chart that NEVER the price came even close to your SL level, but... it got hit anyway.
Yes! we know how frustrating it is, but that's the game we're playing, and trading should never be about blaming the game, but only blaming the players/traders/ourselves.
Blaming the game constantly is likely to not end with good performance results, but accounting for this "risk", and being able to quantify it is an incredible hedge. #bold #statement #level #10000
5.7 🔔 Alerts 🔔
By design, the alerts aren't available for strategy scripts. But this script is an... indicator so why should we not enjoy all the cards in our hands the fullest.
We enabled the alerts on those Backtest Entry/Exit signals. You're welcome :)
VI. 📝 Where are the backtest results? 📝
Answer: in the Data Window section of your TradingView
Now the cherry on the cake if we might say so. A backtest is cool, but visualizing results is actually the end goal here.
The Data Window is dynamic - it means whenever you'll mouseover at a give time on your chart, the data on that panel automatically updates.
Let's assume you're backtesting your idea between Sept 1st, 2019, and Oct 1st, 2019.
If your mouse cursor is located (or hovered) at a candle on Sept 14th, 2019 (data chosen randomly for this example), then the data displayed only includes the results between Sept 1st, and Sept 14th.
More info available on our website with a nice tutorial video. Data window metrics and filters explained on our website
Here's what the data window looks like: imgur.com
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators.
You only will judge and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave