How to backtest a trading strategy - FBS

Backtesting Forex Strategies in Python

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?
submitted by AlfaPenguin to algotrading [link] [comments]

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

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 submitted by traderpulse to u/traderpulse [link] [comments]

How To Create your Own Forex Strategy and Know if Works - Backtesting

How To Create your Own Forex Strategy and Know if Works - Backtesting submitted by imcarlospro to selfpromotion [link] [comments]

How To Create your Own Forex Strategy and Know if Works - Backtesting

How To Create your Own Forex Strategy and Know if Works - Backtesting submitted by imcarlospro to shamelessplug [link] [comments]

How To Create your Own Forex Strategy and Know if Works - Backtesting

How To Create your Own Forex Strategy and Know if Works - Backtesting submitted by imcarlospro to Promote_Your_Channel [link] [comments]

How To Create your Own Forex Strategy and Know if Works - Backtesting

submitted by imcarlospro to advertiseyoutube [link] [comments]

How To Create your Own Forex Strategy and Know if Works - Backtesting

How To Create your Own Forex Strategy and Know if Works - Backtesting submitted by imcarlospro to SmallYoutubers [link] [comments]

How To Create your Own Forex Strategy and Know if Works - Backtesting

How To Create your Own Forex Strategy and Know if Works - Backtesting submitted by imcarlospro to IMadeThis [link] [comments]

How To Create your Own Forex Strategy and Know if Works - Backtesting

How To Create your Own Forex Strategy and Know if Works - Backtesting submitted by imcarlospro to GetMoreViewsYT [link] [comments]

How To Create your Own Forex Strategy and Know if Works - Backtesting

How To Create your Own Forex Strategy and Know if Works - Backtesting submitted by imcarlospro to AdvertiseYourVideos [link] [comments]

How To Create your Own Forex Strategy and Know if Works - Backtesting

How To Create your Own Forex Strategy and Know if Works - Backtesting submitted by imcarlospro to promote [link] [comments]

How To Create your Own Forex Strategy and Know if Works - Backtesting

How To Create your Own Forex Strategy and Know if Works - Backtesting submitted by imcarlospro to YouTube_startups [link] [comments]

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:
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.
submitted by chaddjohnson to algotrading [link] [comments]

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!
submitted by musiapolitan to IWantToLearn [link] [comments]

After 9 months of obsession, here is my open source Node.js framework for backtesting forex trading strategies [X-Post From /r/algotrading]

After 9 months of obsession, here is my open source Node.js framework for backtesting forex trading strategies [X-Post From /algotrading] submitted by serendipitybot to Serendipity [link] [comments]

Beginning of Trading Journey

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!
submitted by Aman-1127 to Forex [link] [comments]

Looking to get involved in Forex

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
submitted by foley589 to Forex [link] [comments]

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
submitted by emopatriot to Forex [link] [comments]

How do you guys backtest a strategy?

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.
submitted by Ogre-kun to Forex [link] [comments]

Just from what I've learned from babypips is this a viable setup?

Just from what I've learned from babypips is this a viable setup? submitted by NeatManagement3 to Forex [link] [comments]

Forex Trading Strategies

Hello!
Newbie here, just wondering what your thought processes are when it comes to creating a trading plan. I understand that failing to plan is a recipe for disaster, and I wanted to get some ideas on how to get started.
I'm interested in swing trading and position trading, as I don't have enough time to spare to look at charts all day.
Your feedback is greatly appreciated!
submitted by InfidelsUnited101 to Forex [link] [comments]

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.)
submitted by FxRaHe to Forex [link] [comments]

How I BACKTEST a Forex Trading Strategy in 2020 - YouTube How to backtest your trading strategy even if you don't ... How to BACKTEST a Forex Trading Strategy - YouTube How To Backtest a Forex Trading Strategy - YouTube How To Back Test Your Forex Strategy - YouTube How to Backtest Forex Strategies - YouTube Tutorial [Forex Trading] How to backtest a trading strategy

How to Backtest Your Forex Strategy. Once you set up everything, simply click on “Start Simulation”. You’ll immediately be taken to the “dashboard”, which looks like this: The different menus and options might look intimidating first, but don’t worry. If you continue reading this guide, you’ll quickly master the nuts and bolts of the platform. Let’s start by opening the charts ... Therefore, when you backtest a strategy it’s really necessary no to see the future of the chart so you remain unbiased towards the chart’s future. Best Ways to backtest Forex Strategies Manually. Here’s the list of the best ways for backtesting a forex trading strategy along with a complete tutorial for every one of them. When you found an interesting trading strategy (or designed it yourself), you need to check whether it worked in the past before you actually bet your money on it. This process of checking a strategy on the historical data is called “backtesting”. When you backtest your strategy, make sure that you observe its performance for enough time and during different market conditions (trends, ranges). Video: How to Backtest a Forex Strategy. Sign up for the Webinar Here! Backtesting is simply putting your strategy at work with previous market data. Successful traders do this to see how reliable their strategy is, how profitable it is and how it behaves in different market conditions. A good period of time to perform the backtesting of your strategy would be the previous 10 or 15 years ... To backtest a trading strategy follow these tips: Choose a forex pair or instrument to backtest your strategy on. Open a chart of the market and scroll back to a past period. Look for trade setups based on your strategy. Record the trade’s information such as entry and exit points, stop-loss and take-profit levels, and the trade result. Forex Kalender Market Heat Map Market Sentiment Indikation DAX30 Analyse EUR/USD Analyse Dow Jones Analyse Gold Analyse ... Es hat sich gezeigt, dass Trader, die für den Backtest ihrer Strategien Sorgfalt und gesunden Menschenverstand anwenden, oft mit beachtlichen Gewinnen belohnt werden. Im Gegensatz dazu erleiden Händler, die dafür ausschließlich die Rechenleistung einsetzen und die ... Learning how to backtest a trading strategy is boring for most, but necessary for success. If you want to have confidence in your trading strategy, backtesting is the answer. Whether you have a mechanical trading system, some basic discretion, or human input into your trading approach, backtesting remains mandatory.

[index] [15804] [20782] [6094] [12688] [25623] [8984] [26897] [29243] [19679] [16657]

How I BACKTEST a Forex Trading Strategy in 2020 - YouTube

RUELS TO WIN A CHANCE TO BE MENTORED BY BE FOR 1 MONTH 1. Subscribe to my channel 2. Like this video 3. Comment "Mentor Me" 4. Record a horizontal video of h... FREE: Advanced Pattern Tutorial - https://www.thetradingchannel.net/optinpage CHECK OUT: EAP Training Program - https://goo.gl/7RrMM5 JOIN: "Advanced Pattern... Today we kick off #TheTradingEssentials Series, starting out with How I Backtest a Forex Trading Strategy in 2020... ----- Trading Platform I Use: https:... 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 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/... In this training video, you’ll learn: 1. How to backtest your trading strategy without coding (for free) 2. The ONE thing you must have before you start back... In this video, I will show you how to backtest a trading strategy to make sure you know your strategy as the palm of your hand and can trade a proven system ...

http://65.21.85.17