Backtesting
Introduction to Backtesting
Step-by-Step Guide to Backtesting Your Trading Strategy
Step 1: Understanding the Date Range in Your Strategy
// BACKTESTING RANGE
// Start of back testing (Change defval numbers for day, month and year. This is when back testing starts)
fromDay = input.int(defval=1, title="From Day", minval=1, maxval=31)
fromMonth = input.int(defval = 12, title = "From Month", minval = 1, maxval = 12)
fromYear = input.int(defval = 2023, title = "From Year", minval = 1970)
// End of back testing (Change defval numbers for day, month and year. This is when back testing ends)
toDay = input.int(defval = 7, title = "To Day", minval = 1, maxval = 31)
toMonth = input.int(defval = 12, title = "To Month", minval = 1, maxval = 12)
toYear = input.int(defval = 2024, title = "To Year", minval = 1970)
Step 2: Viewing Backtest Results



Step 3: Troubleshooting Backtest Issues

Step 4: Interpreting Backtest Results

Conclusion
Last updated