Table of Contents
As technology continues transforming the financial market, TradingView has emerged as one of the leading online platforms for financial traders and investors. TradingView platform provides an intuitive, user-friendly interface that gives traders and investors a sophisticated charting package. It is a comprehensive and robust market analysis tool that allows traders to set indicators, test trading strategies, and share insights with other investors worldwide.
Please read our latest article on Tradingview to learn how to calculate pips.
The TradingView platform also provides an effective backtesting environment that allows users to test their trading strategies using historical price data. Traders can test custom-made indicators, systems, or automated trading algorithms Scripts (EA ) that can be retested multiple times using the latest data to ensure that strategies remain effective in the long term. In addition, the platform provides backtesting data for various securities, including equities, derivatives, and forex, in the last 50 years.
How to Backtest on TradingView?
To Backtest trading strategy scripts on TradingView, you need to do the following steps:
- Choose a backtesting chart timeframe (from 1 minute up to 12 months chart)
- Choose trading asset (EURUSd, GBPUSD, Gold, S&P500, etc. )
- Find strategy: Go to the “Indicators” section, and in the vertical menu, choose “Technicals.” and then “Strategies.”
- Choose strategy: From the list of systems, select a preferred strategy. You can also search for customized strategies.
- Set inputs: In the down part of the Window, you can press the wheel icon (settings) to set inputs for your strategy in Strategy Tester.
- Analyze the result performance.
Please see the video from my fxigor YouTube channel with detailed instructions and a good strategy example:
Let us see in detail how to backtest on Tradingview:
How do you Choose a backtesting chart timeframe in TradingView?
The chart timeframe in TradingView can be set if you press the button in the left upper corner of the screen (see image below):
How do you choose a backtesting asset in TradingView?
To choose an asset in TradingView, press the icon in the upper left corner of the screen. Next, you will get a Window to search for wished trading assets. See the image below:
How do you choose a script for backtesting in TradingView?
To choose a script for backtesting, press the “Indicators, Metrics & Strategies” option in the upper menu. Next, you will see Window. Choose the “Technicals” option in the vertical menu and press the “Strategies” option. Here, you can choose a wished strategy like in the image below:
How do we change inputs in the strategy Script for backtesting in TradingView?
To change input values in Script in TradingView, press the Strategy tester wheel icon (see image) to go to settings. You can change input values, trading size, and various preferred settings in Strategy tester settings.
How to change the date range for backtesting in TradingView?
To change the backtesting date range in TradingView, you need to add code to your script. If you add this code to your script, you will add a Date Inputs option ability for the trader to add a Date range for testing:
Please see the code:
// From Date Inputs
fromDay = input(defval = 1, title = “From Day”, minval = 1, maxval = 31)
fromMonth = input(defval = 1, title = “From Month”, minval = 1, maxval = 12)
fromYear = input(defval = 2018, title = “From Year”, minval = 2015)// To Date Inputs
toDay = input(defval = 1, title = “To Day”, minval = 1, maxval = 31)
toMonth = input(defval = 1, title = “To Month”, minval = 1, maxval = 12)
toYear = input(defval = 2019, title = “To Year”, minval = 1970)// Calculate start/end date and time condition
startDate = timestamp(fromYear, fromMonth, fromDay, 00, 00)
finishDate = timestamp(toYear, toMonth, toDay, 00, 00)
time_cond = time >= startDate and time <= finishDate
Conclusion
TradingView’s backtesting option offers traders an incredibly powerful tool for analyzing and improving their trading strategies. With the ability to see up to 2000 trades and use backtesting Date range in the last 50 years in just a few seconds, traders can quickly and easily test different scenarios and identify patterns that may not be immediately apparent through manual analysis.
This feature allows traders to optimize their trading strategies, minimize risk, and maximize profits. TradingView’s backtesting option’s convenience and efficiency make it a must-have tool for any serious trader looking to stay ahead of the curve in today’s fast-paced financial markets.
If you want to unlock TradingView (advanced features), click button and visit this page below: