The Ultimate Beginner's Guide to Forex Backtesting ...
The Ultimate Beginner's Guide to Forex Backtesting ...
Forex Backtesting: The A-Z Guide to Backtesting Your Strategy
Best 6 Ways To Backtest Forex Trading Strategies Manually
How to Backtest a Trading Strategy
So testen Sie mittels Backtesting Ihre Trading Strategien
How to Backtest a Forex Trading Strategy Market Traders ...
How to Backtest a Strategy in Forex (Backtesting Guide ...
A place for redditors to discuss quantitative trading, statistical methods, econometrics, programming, implementation, automated strategies, and bounce ideas off each other for constructive criticism. Feel free to submit papers/links of things you find interesting.
I'd like to backtest some strategies with forex data, but I'm not sure where to look for a good solution. I have an Oanda practice account, but can't figure out how to get historical/backtest data. I've also used Backtrader for stock data, but can't figure out whether there's a way to pull in forex data. I work in primarily in Python but I'm familiar with R too. What do you use to backtest Forex strategies? Any APIs I should be looking at?
Time to get out of your lean phase Get the reliable forex tool which is backtested successfully for the unique strategy with which it does accurate predictions. Try it and move ahead in your forex trading. https://traderpulse.com/most-powerful-indicator-for-metatrader-range-band/#pricing
After 9 months of obsession, here is my open source Node.js framework for backtesting forex trading strategies
TL;DR There's lots more to the story. But the code is all open source now. Have at it. I'm too exhausted to continue with this. If you'd like more details, feel free to message me. If you happen to carry on with this project or use any ideas from it, I would greatly appreciate it if you could keep in touch on your findings. If anyone has any insights, please feel free to comment or message me. I've spent the last nine months working furiously on this. I started a project for backtesting strategies against data I exported from MetaTrader. I had a very powerful computer crunching numbers constantly, trying to find the most optimal configuration of strategy indicator inputs that would results in the highest win rate and profit possible. Eventually, after talking with a data scientist, I realized my backtesting optimizer was suffering from something called overfitting. He then recommend using the k-fold cross-validation technique. So, I modified things (in the "k-fold" forex-backtesting branch), and in fact it provided very optimistic results when backtested against MetaTrader data (60 - 70% win rate for 3 years). However, I had collected 3 months of data from a trading site (by intercepting their Web Socket data), and when I performed validation tests against that data using the k-fold results created from the MetaTrader data, I only got a ~57% win rate or so. In order to break even with Binary Options trading, you need at least a 58% win rate. So in short, the k-fold optimization results produce a good result when validation tested against data exported from MetaTrader, but they do not produce a good result when validation tested against the trading site's data. I have two theories on why this ended up not working with the trading site's data:
The trading site I collected data from uses Reuters data. The prices in the MetaTrader data I used are different from the prices in the the trading site's data. Basically the the trading site's data is offset and is slightly higher than the MetaTrader data (and there may be other differences). I suspect that the k-fold optimization may have produced a predictor that is tailored to the data exported from MetaTrader (data available here), but it does not work as well on the the trading site's data.
The script I used to collect data from the trading site disconnects from the trading site periodically for maybe 10 minutes every, and so when it does, the strategy indicator calculations used when validating against the collected data have to start all over due to gaps, and so potential trades are lost.
For the strategy I use the following indicators: SMA (Simple Moving Average), EMA (Exponential Moving Average), RSI (Relative Strength Index), Stochastic Oscillator, and Polynomial Regression Channel. forex-backtesting has an optimizer which tries hundreds of thousands of combinations of values for each of these indicators, combined, and saves the results to a MongoDB database. It can take days to run depending on how many configurations there are. Basically the strategy tries to detect price reversals and trade with those. So if it "thinks" the price is going to go down within the next five minutes, it places a 5 minutes PUT trade. The Polynomial Regression Channel indicator is the most important indicator; if the price deviates outside the upper or lower value for this indicator (and other indicators meet their criteria for the strategy), then a trade is initiated. The optimizer tries to find the best values for the upper and lower values (standard deviations from the middle regression line). Additionally, I think it might be best to enter trades at the 59th or 00th second of each minute. So I have used minute tick data for backtesting. Also, I apologize that some of the code is messy. I tried to keep it clean but ended up hacking some of it in desperation toward the end :) gulpfile.js is a good place to start as far as figuring out how to use the tools available. Look through the available tasks, and see how various "classes" are used ("classes" in quotes because ES5 doesn't have real class support). The best branches to look at are "k-fold" and "master", and "validation". One word of advice: never, ever create an account with Tradorax. They will call you every other day, provide very bad customer support, hang up the phone on you, and they will make it almost impossible to withdraw your money.
IWTL how to properly write and backtest forex trading strategies.
Before, I have used chart data in spreadsheets and back-tested all sorts of strategies, and then make trades manually, but I would prefer to be able to properly use MT4 or whatever platform and back-test properly, and then auto-execute trades. Do I write my own programs to run and execute trades? I don't understand how this is done!
Good afternoon, I am looking for beginner tips on how to get started I have already been looking at brokers and have been doing some research on forex analytics and forest park , What is a good starting point to invest ? I am not new to investing and trading as I have been dealing on the stock market and precious metals for over 8 years. Thank you for your time in reading this. Best regards
I recently finished the babypips course, and am excited to continue on to the next steps of my trading journey! I plan to post a summary of how my trading day went on this subreddit everyday I trade just as a method to monitor my own steps towards successful trading, and to get feedback from all of yall who read my posts! Today was the first day I started trading on my mt4 demo account. My strategy was to day trade the 4 hour EUUSD using a 10 SMA, 20 SMA, Stochastic, RSI, and ADX. My plan was to enter when the SMAs cross each other, the ADX indicates a strong trend (40 or above) and either the Stochastic or RSI indicates overbought and oversold conditions. I planned to exit when the market hit my stop loss of 100 pips or my tp of 200 pips, or when my MAs cross once again while the ADX indicates a weak trend (20 or below), and either the stochastic or RSI indicates an overbought/oversold market thats not in my favor. I planned on identifying trends on the initial movement with my stochastic, rsi, and MAs, and guaging the relative strength of the movement with the ADX. I decided to hold a position size of 1 mini lot per trade, risking 1% of my total account. My first mistake was not backtesting my strategy at all. I was super eager to test out my strategy, so I hoped on my account right away to find trades I could take. This leads into my second mistake. When I could not find a position to take on the EUUSD, I immediately hopped into the USD/JPY looking for other trades. Although I did manage to find one, I did not calculate my position size or properly scale my stop loss. Nevertheless I took the trade and waited. The trade moved in my favor about 50 pips, and then started to drop steady. As soon as I saw all my profits go down the drain I quickly tried to lock in my profits, which resulted in me closing my trade. After closing I opened a new one frantically trying to catch any profits I missed. which was a HUGE mistake. Eventhough the profits on my first trade were not huge, it was still profit. The second trade made me lose all my profit and even more. After my trade I recorded everything that happened in my trading journal. I made a note never to trade on emotion again, and to just let the market hit the stop loss instead. I also made note to add a trailing stop loss so that I can lock in my profits sooner, without having to worry about it mid trade. Starting tomorrow I will backtest my strategy FIRST before going into the market, making revisions as I go. Extra Note: This is my first post here and I know the grammar and formatting is kinda bad. Please bear with me I will get better overtime lol. Also all comments and feedback is welcome! I know that I have a long way to go, but I am eager to keep learning!
The importance of backtesting and sticking to a strategy
Hi all, I just wanted to share my trading experience with you so far, and maybe help some people who may be in the situation as I am. I started trading about 2-3 months ago. I started with baby pips, opened a demo account, and got cocky a couple weeks into it and made a live account with $100, and every other week or so put $20 extra in. (thank God I didn’t put it more than that). Today, my account stands at around $68, with a total P/L of -$131.76. I have been really uncomfortable losing money, even if it’s not a lot, and that uncomfortableness forced me to realize my mistake. I thought I could half ass a strategy and be a winner in forex, and the market humbled me extremely quickly. I actually didn’t have a strategy at all. It was a lazy mix of a bunch of different typical strategies I saw on YouTube. I also let my emotions get into trades, after a losing trade I would get back in the market in the opposite direction to try and make up for my loss. All bad, I know. I was too cocky. Just like anything difficult in life, you cannot half ass forex. I spent all of Friday testing an EXTREMELY simple strategy on 4 major pairs, and out of 93 total trades over the last 6 months, the win rate of my strategy is 73%. From now on, I vow to ONLY make a trade when my strategy presents itself. Moral of the story is, if you think you can half ass forex, you better wake up right now. Find a strategy, backtest it, and only trade said strategy. Have some discipline. Here is my extremely simple, backtested strategy with a 73% win rate that I got from The Trading Channel on YouTube: Indicators: 200 EMA Requirements: 2 wicks IN A ROW that TOUCH the 200 EMA, that have candle bodies that both close above or below the 200 EMA. If both candles close above the 200 EMA, go long. If both candles close below the 200 EMA go short. Stay extremely strict with the rules of the strategy. Here are the pairs that I have tested this strategy on over the past 6 months, that total a 73% win rate: -GBP/USD: 18/27 winning trades (67%) -NZD/USD: 15/27 winning trades (71%) -EUUSD: 15/20 winning trades (75%) -EUGBP: 20/25 winning trades (80%) All backtesting was done on the H1 chart. I tried on the daily and H4 charts but the frequency just wasn’t enough. In the video that I got this strategy from he was trying to highlight the importance of the frequency of your strategy. Even if it may have a really high winning percentage, if it only happens once a year it’s not a good strategy. Also on a side note, I’ve seen a lot of conflicting opinions on whether or not the US election will effect USD pairs, do you guys think the election will mess with my strategy this upcoming week, or should I just trade my strategy and pay not attention to the results of the election? Thanks for reading, and happy trading Sincerely, u/emopatriot
I'm posting a comment here. Hey! Every single strategy can be effective when backtested. But it has to be tailored to your particular psychology. You're a human being and you probably have a completely different mental makeup than me. I'll give you the practical breakdown for this strat. What you do is basically buy OTM calls or puts every single weekly expiry. The options which are worth around 10 rupees. Now, the probability of your trade is extremely low. Since 9 times out of ten, this option is priced this low for a reason. (Efficient market hypothesis). You know this based on your backtesting. I'm assuming youve gone back in time for a time period which covers all market cycles. (For the Indian market, it's 15 years since this last bull run lasted a while) However, the tenth time, the market might see a huge move in your direction and the option might expire at 100rupees. So you've lost 9 times. 9*10 rupee loss (multiplied by the lot size, but I'm ignoring that for this example so that it resonates across indices/stocks/commodities/forex) You've lost 90 rupees. But when you win that tenth week, you make 90 rupees! So it all evens out. This is the math. This is where your skill comes in. If you can figure out a way to be right 15% of the time instead of 10%, hey, you're rich! Coming back to psychology, are you okay with losing 9 weeks out of ten? In the real world, you could face eighteen straight weeks of losses. Followed by two great expires. Does your mentality allow you to stick to the plan even after eighteen straight losing weeks? If the answer is yes, then fantastic! Because mathematically speaking, the chances of the next week going in your favour have now exponentially increased! Also, huge thank you to Sir Stalking for taking time out and helping beginners. You're a real one, friend. ❤️
Double Supertrend Strategy Backtest (8500+ Trades on 28 Pairs)
Hi everyone, so a few months ago I discovered this post by u/AHoomanBeanz which is a strategy I've never heard of before. Basically, you have 2 Supertrends, a short-term one, and a long-term one and when both Supertrends go in the same direction you take a trade. I took the liberty of modifying the strategy by setting fixed TPs instead of trailing SL with the short-term Supertrend. Check out his post for more info about entries, SL, etc. In order to determine what way is the most efficient, I backtested this exact strategy on all 28 Majors and Minors and took five different approaches to TPs and moving of SL: - 1:1 RRR, No Breakeven SL - 1:1.5 RRR, No BE SL - 1:2 RRR, No BE SL - 1:1.5 RRR, Move SL to BE at 1:1 RRR - 1:2 RRR, Move SL to BE at 1:1RRR There would be many other ways to handle the TPs and SLs but it already took me months to backtest this but if anyone wants to extend this backtest, feel free. The Results Using all 5 ways there were 8 out of 28 pairs that weren't profitable at all. (EURGBP, EURCAD, GBPAUD, GBPNZD, AUDCHF, NZDJPY, CADCHF, CHFJPY) The remaining 20 pairs were profitable with at least one of the 5 ways. So I combined all 20 pairs and their most profitable TP/SL management methods and it turns out that the strategy isn't even that bad considering that you really just have to understand how Supertrends work. Now here are some quick stats: Backtest Period: Jan 2017 - Aug 2020 - Risk Per Trade: 1% - Winrate: 44.66% - Profit Factor: 1.65 - Average Monthly Return: 5.81% - Max Drawdown: 18.4% Notice that the drawdown is pretty high so if you're trading with a prop firm like FTMO you could just risk half as much (0.5% per trade) and your max DD would be 9.2%. Keep in mind that the return would also get cut in half. If you want to get a more detailed view, here's the backtesting spreadsheet (Before anyone asks: I spent 2-4h per day for around 6 weeks backtesting and tracking this stuff.)
I'm new to the forex trading and one of the advices that I often come across is to always backtest a strategy first. First thing that came to mind is to just go through the chart and start moving forward, simulating a trade and logging if the strategy wins or loses. I actually did this in a 15M chart for a range of 3 months, and while the results were enlightening (my strategy sucked only 36% win rate for that pair and strategy), I found the process very tedious. So my question is are there automated ways to back test a strategy? Like maybe excel or an application? I was looking into mt5 and expert advisors the other day, and I tried the strategy tester using a free expert advisor. Should I create a script that mimics my strategy and test it using mt5? I have a bit of programming but I don't know where to start.
So I have put together what I consider the definitive guide to backtesting Forex trading strategies, to help get you started. This guide is the result of my personal experience with backtesting and talking to dozens of professional Forex traders over the years. I hope that it helps you get started and see the value in the process. More importantly perhaps, I also hope that it is something that ... However, backtesting is just the start because the immediate step is to forward test your strategy. The primary purpose of backtesting is to prove you have valid trade ideas. If your Forex strategy has a proven edge, you’ll be more confident to pull the trigger when the next trade signal shows up. In other words, you’ll be able to better ... Backtesting Strategien müssen zu 100% verlässlich sein. Sie sollten jedes Mal ähnliche Ergebnisse erhalten, wenn Sie Backtesting einer Trading Strategie durchführen. Dies ist das ideale Szenario, das aber nicht in allen Fällen eintritt. Backtesting kann niemals eine perfekte Darstellung realer Märkte sein. Wichtige Vorkommnisse wie ... Forex Tester is a popular strategy backtesting tool for MT4. The tool requires no coding and it even provides traders with some pre-formed strategies. With Forex Tester, you can also apply multiple time frames and the tool automatically tracks your trading results whenever a trade is closed. Maybe you’ve been working hard to make money as a trader, but haven’t been backtesting your strategies. This is a huge mistake; it just might be enough to prevent you from being profitable. The ironic reality is that if you stop focusing so much on chasing pips and instead focus on flawlessly executing your strategy, you’ll start getting results. However, executing your strategy ... Forex tester 4 is the most complete tool you can find for backtesting Forex trading strategies and suitable for the traders who want to do professional backtesting on a functional well-designed software. It’s not a plug-in or add-on for MT4. Instead, it’s a separate software that looks like MT4 very much but it has some additional features. Forex Tester 4 Features and Comparison to Soft4fx ... Manually Backtesting a Forex Strategy. Manual backtesting is when you manually scroll the chart on your trading platform to a previous period, and then manually go forward, bar by bar, with the “forward” arrow on your keyboard. Doesn’t sound exciting? Well, this the best way to see how your strategy will perform in various market conditions, and where it needs improvement. There are four ...
Tutorial [Forex Trading] How to backtest a trading strategy
Building and back testing a potentially profitable forex strategy or theory is a very important task to all new traders. This allows you to not only increase... https://easycators.com -- More of Josiah's TOS trading resources New thinkorswim tutorial on how to program your own stock, futures, or forex trading strateg... This video covers how to backtest forex strategies. Backtesting forex pairs is the best way to gain confidence in your strategies. Keep it simple and do it a... This video shows how anybody can test their own trading strategies using Excel. I demonstrate how to use historic price data and to calculate technical indic... #Forex #Strategy #Backtesting Disclaimer: The content covered in this video is NOT investment advice and I am not a financial advisor. The material covered and the resources offered are for ... Free Training: 3 - Part Reversal Series - https://goo.gl/QKaxzV Advanced EAP Training Program - https://goo.gl/5cP1Z5 - More videos about predictive analysis... This video will show you How to Backtest a Forex Trading Strategy, as well as 3 TIPS on BACKTESTING... Trading Platform I Use: https://www.tradingview.com/... Here's how to backtest your pairs in forex! In order to be profitable, you need to practice your trading strategy over and over again! Don't get frustrated i... FREE: Advanced Pattern Tutorial - https://www.thetradingchannel.net/optinpage CHECK OUT: EAP Training Program - https://goo.gl/7RrMM5 JOIN: "Advanced Pattern... Backtesting Forex Strategies With My Team In this video Jay Wayne will show you how he backtest forex strategies with his team. .....