Building a Trading Bot to Pass a Prop Firm Challenge

  • January 22, 2023
Using a trading bot to pass a forex prop firm challenge

Robot trading or algorithmic trading, as it’s known, has grown in popularity in the retail trading community over the last few years, with thousands of new systems being developed. The prop firm industry is now feeling the effects of this, as many traders are either creating trading robots, or trying to use them to obtain funded trading accounts. But, is it really possible to build a trading bot to pass a prop firm challenge?

Yes, it’s entirely possible to build a profitable trading robot to pass prop firm challenges, but it’s not simple. In this article, we’ll look at some key components to a trading robot and what you should consider when embarking on this journey. Let’s get into it…

Building A Trading Bot To Pass A Forex Prop Firm Challenge

It’s not a secret that human error plays a massive part in losses, in the forex markets. Humans are impulsive, emotional and can find it challenging to follow elementary instructions, every so often. This is where trading bots come in. They’re typically fully automated, meaning the human has no/very little interaction with open positions. The robots are typically coded on either MT4 or MT5 (for retail traders) and will scan the market for positions that fit the criteria of the strategy. Prop firm funding is a great way to obtain huge amounts of capital, but the small loss and drawdown limits can make it stressful for traders with fully subjective systems. This is why traders are favoring objective systems and even look to coding their systems into robots.

So, how do you even go about getting started in creating a trading algorithm?

Finding A Trading Strategy

 The first step, before you even worry about coding, is finding an objectively profitable trading strategy. This is what most traders spend their lives trying to do, but it doesn’t need to be that complicated. If you look online, there are many papers published on profitable trading strategies, most of which are incredibly simple to follow. These strategies will not be golden geese, but they will be profitable over the long term. An example of a breakout strategy comes to mind. There is a very successful hedge fund owner in the Netherlands that uses an elementary price breakout strategy as one of their key algorithmic strategies. This proves that it doesn’t always need to be complicated. Once you have a trading strategy that you believe to be profitable, we need to make this 100% rule based. Most of this will be easy to do. However, there will be some harder bits to figure out. For instance, you might want to buy at the break of a high. Well, what defines a high? You’d have to implement some kind of logic making it the highest price in the last X candles. This will then bring in additional losses that you hadn’t thought about when back testing…

Working with objective logic is certainly the best idea for long-term profitability, but it takes a lot of trial and error.

So, you’ve got a strategy, now what?

What To Include In A Forex Trading Bot

Now that we have a trading strategy, we can start building the bot. This can either be done yourself or by paying a freelancer. There are plenty of ‘drag and drop’ style tools for creating an algorithm, so this is what I’d recommend doing at first.

Foremost, you’ll code the inputs and trading conditions into the algorithm. This is essentially your trading strategy. Beyond that, there will be various controls that you should also look to implement…

  • Risk management rules. This will be dependent on which prop firm you’re trading with. Having drawdown and losing streaks in mind – you need to maintain your funded account, so ensure the risk per trade is low.
  • Trade management. You’ve taken a trade, now what? Having a take profit isn’t enough. What if price moves back towards the stop loss after being in profit? What if the price stalls for X number of candles at 1:0.5 RR, is it worth taking a loss at that point? There are many variables to consider.
  • An exposure override. Are you going to leave past pending orders open? When should they be closed? Should your bot continue opening trades at a certain point?
  • A time filter. Do you want to be trading when spreads are high? Market rollovers can cause huge volatility and price action that makes little sense – is this when you want to be taking positions in the markets? 

As you can see, there is a huge number of variables to consider, these are only a handful. This is why testing an algorithm, even if you have a profitable strategy, can take many months to do. Most traders, when working manually, won’t even be considering most of these important variables. If you’re looking at trading fully manually, you’ll need to build a robust trading plan.

What To Avoid Using In A Forex Trading Bot

Now we know what we should be including, let’s look at things to avoid using in a trading bot…

  • Martingale strategies. Martingale strategies can prove some great results in the short term. However, when you hit a losing streak, you’re going to ruin your trading account balance and most likely lose your funded trading account. Utilize proper risk management, rather than Martingale.
  • No stop loss. I see many EA’s not opening trades with stop losses. This is a sure fire way to get banned from a prop firm, by not showing discipline with risk management.
  • Huge amounts of positions. How many positions is too many positions? Opening 100 trades and getting bled dry on commissions is not the smart move, usually.
  • 1 pip scalps. With slippage, latency, and spreads, unless you have direct market access, utilizing a take profit of 1 pip is typically not going to result in the most profitable trading system.

The key takeaway here is Martingale. I’d highly recommend against using it. Many bots are sold, showing a crazy returns chart of a few months. They’re showing you those few months for a reason… The reality is that after that, the losses mount up, the drawdown reaches a giant percentage and the traders lose the account.

Create a system with strong risk management around it, not gambling tactics.

Testing Your Trading Bot For Prop Firms

Once you’ve built your trading bot, you’ll have many iterations, trying to make it more profitable. This is why I recommend learning to code or use a tool yourself, rather than paying freelancers for each iteration. When it comes to testing, you’ll need to have access to high-quality data. The typical data you’re going to find on MT4 or MT5 may be ok, but I’d recommend purchasing high-quality tick data. Tick data will be the only kind of accurate data – candlestick data will ignore price movement during that 1H candle, for example, which is useless for any kind of scalping system. You’ll want to back test the tick data for years, as many as possible. If this is proving to be profitable, you’ll, I’m certain, notice many amendments to make to the bot. Once these changes have been made, run the tests again.

In an ideal world, you’re looking to bring your profitability up and draw down as low as possible, as well as your losing streaks. Once you’re there, I’d recommend live testing for a few weeks to make sure that the results are being matched in real market conditions with fluctuating spreads, slippage and latency. If they are, you’re good to go!

 In Conclusion – Can You Build A Trading Bot To Pass A Prop Firm Challenge?

 In summary, it’s more than possible to build a profitable trading robot to pass a prop firm challenge. As a matter of fact, thousands of traders rely solely on bots and algorithms for their funded accounts. If you’re struggling with manual trading, this could be a great avenue for you to go down, testing and developing trading systems.

If you’re looking to become a funded trader, work with Lux Trading Firm now!