r/algorithmictrading • • Jun 26 '25

Backtest 42% ROI Trading Bot: Would This Be Viable for Prop Firms?

8 Upvotes

Hey all, I've been working on a gold (XAUUSD) trading bot.

Here are the current stats from a $2.5M virtual fund test:

- ROI: 42.12%

- Win Rate: 71.43%

- Max Drawdown: 5.99%

- Time in Market: 24.53% (swing trade/momentum)

The strategy uses simple moving average crossovers + confirmation on volume divergence and trend continuation signals. It avoids overtrading and only executes high-confidence setups (averages about 2–3 trades/day).

I've also tested this live on a $10k account with good tracking results.

My question:

Would a system like this even be considered on prop platforms like FTMO or MyForexFunds? I'm aware they often don’t allow bots — but if I were to trade the same logic manually, would this pass evaluations?

Open to feedback, critiques, or tips from anyone who’s tried algo-funding paths.

Here’s a screenshot from the backtest dashboard:

Happy to answer any questions on logic or structure. Not trying to brag — just genuinely trying to improve it and possibly get it funded.


r/algorithmictrading • • May 25 '25

Building Context-Robust Trading Signals: Regime Detection and the Power of Time-Invariant Features

Post image
8 Upvotes

r/algorithmictrading • • Aug 06 '24

Educational What is a good MAR Ratio?

8 Upvotes

I wanted to share a bit about how I use the MAR Ratio to measure my trading strategies. First of all, you shouldn't make a strategy with the goal of purely producing a high MAR ratio because then you will probably curve-fit your strategy. The MAR ratio is best used on a finished strategy to simply compare two similar kinds of strategies.

It's a slick way to measure risk-adjusted returns of different trading strategies by comparing their compound annual growth rate (CAGR) to their max drawdown (MDD). Basically, it tells you how much bang you're getting for your buck in terms of risk taken.

After testing over 800 strategies, I've found that most solid ones hover around a 0.2-0.4 MAR. But personally? I won't even consider adding a strategy to my portfolio unless it hits at least a 0.5 MAR. Might seem high, but it's saved me from some potential flops.

But here's where it gets interesting — when you apply the MAR to your entire portfolio. Since my portfolio mixes different strategies, timeframes, and assets, I aim for a minimum MAR of 1.0. This diversity helps smooth out the drawdowns and push up the MAR, optimizing my overall risk/return.

For those curious about the math: it's simply the CAGR of the strategy/portfolio divided by its max drawdown. Both need to be in positive percentages to make sense. I calculate CAGR based on the annual growth over time and MDD from the biggest peak to trough drop before a new peak.

Would love to hear if anyone else is using the MAR Ratio for strategy measurement or if you use anything else?


r/algorithmictrading • • Jun 20 '24

I created a python library for automated trading using E-Trade’s API

8 Upvotes

Hi Reddit!

I’ve been trading on E-Trade’s API for the past year and a half, and I want to share a project I created to make it easier for others to get started with automated trading. I found that existing E-Trade libraries lacked functionality that I needed in my trading, and I wanted to release something full-featured yet accessible. With that in mind, I wanted to announce wetrade: a new python library for stock trading with E-Trade that supports features including headless login, callbacks for order/quote updates, and many more. 

You can check out this link for our documentation which details wetrade’s full functionality, and I’ve also included a brief example below showing some sample wetrade usage. 

Install via pip:

pip install wetrade

Check out your account, get a quote, and place some orders:

from wetrade.api import APIClient
from wetrade.account import Account
from wetrade.quote import Quote
from wetrade.order import LimitOrder


def main():
  client = APIClient()

  # Check out your account
  account = Account(client=client)
  print('My Account Key: ', account.account_key)
  print('My Balance: ', account.check_balance())

  # Get a stock quote
  quote = Quote(client=client, symbol='IBM')
  print(f'Last {quote.symbol} Quote Price: ', quote.get_last_price())

  # Place some orders and stuff
  order1 = LimitOrder(
    client = client,
    account_key = account.account_key,
    symbol = 'NVDA',
    action = 'BUY',
    quantity = 1,
    price = 50.00)
  order1.place_order()
  order1.run_when_status(
    'CANCELLED',
    func = print,
    func_args = ['Test message'])

  order2 = LimitOrder(
    client = client,
    account_key = account.account_key,
    symbol = 'NFLX',
    action = 'BUY',
    quantity = 1,
    price = 50.00)
  order2.place_order()
  order2.run_when_status(
    'CANCELLED',
    order1.cancel_order)

  order2.cancel_order()


if __name__ == '__main__':
  main()

I hope this is helpful for others using E-Trade for automated trading, and I’ve created a discord group where you can get help using the library or just chat with other wetrade users. I’ll be reachable in the group to answer questions and help others who are building trading systems with wetrade. Looking forward to hearing everyone’s feedback and releasing new wetrade functionality in the coming weeks!


r/algorithmictrading • • Dec 22 '23

Lets build a simple Trend Following Strategy for trading BTC

8 Upvotes

Let's create a simple trend-following strategy with just two rules!You can trade this automated or manually.

All you need to do is place a 50-day moving average on the daily chart of Bitcoin. TradingView is a great option for this purpose.

Whenever the price of Bitcoin closes or moves above the 50-day moving average, start looking for potential trading signals.

  1. A - When Bitcoin moves above the 50-day moving average, it's time to look for an entry point.

B - If Bitcoin closes below the average, it's a signal to exit your position. No trading while Bitcoin remains below the average.

Check this example sceenshot: https://imgur.com/a/2QQ4ZAt

2. C - Sometimes, the market is indecisive. Always evaluate, upon the close of the daily candle, whether Bitcoin is closing above or below the average. Based on this, decide whether to look for an entry or not.

The key rule is to buy BTC when the daily candle closes above the 50SMA!

Check this example sceenshot: https://imgur.com/a/fflJi48

3. D - If Bitcoin is below the average, take a break and have a beer—no trading below an average price of the last 50 days!

Check this example sceenshot: https://imgur.com/a/ZBtNPiP

4. If Bitcoin's price closes below the moving average again, it's crucial to exit the position promptly! Trend following may have more bad trades compared to ones that close in profit, but the best happens when you make up for all the bad trades in just one trade once the real trend is confirmed.And that's the beauty of it—repeat this process each time for consistent results!

https://imgur.com/OFLsKMV

5. Now, let's dive into the results of a backtest. If we had traded this strategy from September 2017, we would have closed 34 trades up to now! Currently, this strategy is in an open trade that is not calculated in the backtest (another 60% more).

As you can see, this strategy alone generated over a 20x return compared to holding Bitcoin for the same period of time. Not to mention the drawdown on BTC can go up to -80%; by trading systematically, you reduce drawdowns by half.Backtest start in the end of 2017 until now with 0.15%/trade commision included: https://imgur.com/iL97N3Z

(The Pinescript used in the backtest is my private indicator, but anyone can replicate this by trading it manually or systematically.)

As you can see, this strategy alone generated over a 20x return compared to holding Bitcoin for the same period of time. Not to mention the drawdown on BTC can go up to 80%, by trading systematically you can reduce drawdowns by half.

Patience is a must in this strategy. There will be times where it would look very terrible, but only those who go through those market phases usually make the most money. A lot of traders are jumping from one strategy to another looking for the best ones, but this usually won't work out well.

Happy trading! :)


r/algorithmictrading • • Jun 24 '23

This Is Next Level Shit

8 Upvotes

https://www.mesasoftware.com/papers/ Ty John F. Ehlers for your great work and introducing a new era of trading indicators. 👌


r/algorithmictrading • • Dec 24 '22

Finally Starting Live Trading

Thumbnail
gallery
8 Upvotes

r/algorithmictrading • • Oct 12 '22

Intraday Stock Data

8 Upvotes

Anyone know where to download intraday stock data For free? Looking for 1m AAPL or 1m ROKU or 1m MSFT

A while back someone had shared a link that would download the whole market but can’t find it now.


r/algorithmictrading • • Sep 19 '22

Algo trading for dissertation

8 Upvotes

Hello, Im a mexican economics student currently undergoing my senior year in University. Im writing my dissertation on Portfolio selection with Machine Learning. Is there any broker or page I can acces to live data without the need to pay a subscription?

I have tried connecting TWS from Interactive Brokers with Rstudio without any success. Can anyone provide me with some advice? Im quite new at this, I have studied ML since the beginning of the year but until recently I've tried to apply it to finance.


r/algorithmictrading • • Oct 22 '21

Is there any paper trading site where i can implement algo trading!? NSFW

8 Upvotes

I am a college student, trying to do a project on algorithmic trading. I don’t want to test my algo’s on real time trading platforms. So if there are any paper trading sites with API please let me know


r/algorithmictrading • • Jun 14 '21

Option trading backtests environments

8 Upvotes

Hey guys,

I m planning on creating an option trading algo and want to backtest it first. Do you know any preset environments?

Any gits i could inspire myself from!

Thx in advance!!


r/algorithmictrading • • Apr 25 '21

How do I get started with algorithmic trading?

8 Upvotes

I recently stumbled upon algorithmic trading and it really caught my attention. I have been trying to find articles on how to get started with algorithmic trading, but I thought I would ask someone with experience for advice. I have the following questions:

  1. Do you have any tips that you wish you had gotten when you started out?

  2. What are the most important attributes to learn before starting?

  3. Is there any courses or books that you will recommend? I read about a course called Tensorflow developer, is that a good course for leaning about algorithmic trading?

Any answers is much appreciated:)


r/algorithmictrading • • Apr 19 '21

List of Low-Code/No-Code Algorithmic Trading Platforms in India

8 Upvotes

India is just getting started on its Algo-Trading journey. There were previously many barriers for a retail investor to start, but now things are very smooth with every broker releasing their APIs for their clients to trade programmatically.

But one barrier still exists, the programming barrier. There are very few people out there who understand the financial markets as well know how to code. This is a real barrier and hiring a freelancer to code is a painful process.

Fortunately, Fintech innovation is happening in India at the fastest pace, and a lot of Low-Code/No-Code platforms for algorithmic trading have come up in the last 2 years; here's a list for you to explore.

  1. Tradetron by Umesh

  2. Kuants by Ayush

  3. Robo-Matic by TRADELAB TECHNOLOGIES

  4. Streak AI Technologies Pvt Ltd by Jayalakshmi, Harsha & Vipul

  5. AlgoCrab

  6. AlgoBulls by Jimmit, Suraj & Pushpak

  7. KEEV by Monil & Harshil

  8. AlgoJi

  9. AlgoMojo by Rajandran R

  10. AlgoBaba by Rachit S

All of these platforms are unique in one or another way; you can read a comprehensive review of all in the new article on TradeWithPython.

If you are working on a similar platform but missing from this article, I am happy to add you; just ping me 😃

https://tradewithpython.com/list-of-low-codeno-code-algorithmic-trading-platforms-in-india


r/algorithmictrading • • Feb 03 '21

Algo tuning

8 Upvotes

I have some scripts that have performed pretty well (sharpe ratio of 1-2). The same script performs pretty poorly with other stocks. Does that mean that the approach is not going to be dependable over a long period of time or do you tune your scripts to each individual stock?

An example would be Tesla vs Netflix.

I’m not expecting to find a golden rule but wasn’t sure if each stock needs a fine level of tuning.


r/algorithmictrading • • Jan 05 '21

Beta version of GreenCrypto Swing Trade Strategy. Everyone can access next 48 hours.

8 Upvotes

It's currently in beta version we are giving full access to everyone for next 48 hours.🎈 You can access script directly using the below link. To access the script:

  • Open the below link

  • Click on "Add to Favourite Now you should be able to see this script under favourite section of the indicator list

https://www.tradingview.com/script/wDws61UM-GreenCrypto-PR-Swing-Trade-GC02-Beta/

Please drop a message if you have any queries. All feedbacks are welcome

Cheers💸


r/algorithmictrading • • Apr 11 '20

Beginner videos

8 Upvotes

Hi guys! I’ve been making some videos to help out all the budding traders out there! I hope you find them useful. if you do subscribe and leave a comment 😀

Thanks

https://m.youtube.com/channel/UCIeNu57DMxUW9EkHx3vzHtw


r/algorithmictrading • • Apr 03 '19

How Hidden ETF Transaction Costs Make Billions For Market Makers

Thumbnail
seekingalpha.com
8 Upvotes

r/algorithmictrading • • May 23 '18

Quantopian Risk Model

Thumbnail
quantopian.com
8 Upvotes

r/algorithmictrading • • Mar 31 '12

The Algorithmic Trader: Position Sizing Strategies - Kelly's F in C#

Thumbnail thealgorithmictrader.blogspot.co.uk
8 Upvotes

r/algorithmictrading • • Mar 30 '12

An amateur's intro to algotrading and c#

Thumbnail thealgorithmictrader.blogspot.co.uk
8 Upvotes

r/algorithmictrading • • 9d ago

Question What threshold would you choose to try OOS?

7 Upvotes

Very simple breakout strategy, the only parameter being exercised is the threshold.
The other parameters (TP, SL) are chosen according to ATR, so they are fixed.

What threshold would you choose to go to OOS and why?
I am looking for a plateau, but can't see it...

Thanks!

EDIT:

Added In Sample results for various metrics

Added some IS trade examples

I use tick data

EDIT 1:

Added the following charts:
(actual win rate - win rate for zero profit) x threshold
R x threshold

Here SL loss happens for both thresholds: 75 and 360:

Here SL at 75, profit at 360:


r/algorithmictrading • • Oct 24 '26

Question A Robust Fitness Function for Trading Strategy Optimization?

7 Upvotes

I'm looking for a robust, mathematically coherent fitness function for optimizing trading strategies using machine learning. I've experimented with various objectives, including Profit Factor, Sharpe Ratio, Pessimistic Return on Capital, and several risk-adjusted performance metrics. 

The problem is that the optimizer consistently finds pathological solutions that maximize the chosen metric while producing terrible equity curves. For example, some solutions achieve excellent fitness scores by making very few trades, generating most of their profits from isolated events, or exploiting mathematical weaknesses in the metric.

So far, the best-performing objective I've found is:

Fitness = Slope × R²

Where Slope and R² come from a linear regression of the equity curve over time.

I'm particularly interested in theoretically grounded approaches rather than another combination of Sharpe, drawdown, trade count, and manually chosen weights.

What objective function do you actually trust when letting an optimizer search aggressively for trading strategies?


r/algorithmictrading • • Sep 19 '26

Strategy Always blows my mind how people blatantly lie about strategies

7 Upvotes

Triple RSI rules on SPY (RSI(5) pullback + 200-day filter, exit when RSI(5) crosses 50). 10 years, 0.05% commission, 0.01% slippage.

34 trades. 65% win rate. +11.6% total. Buy-and-hold: +260.9%.


r/algorithmictrading • • Aug 05 '26

Question IB Gateway algo trading setup

7 Upvotes

Hi all!

For those who use IBKR and IB Gateway for automation, I am curious as to what y’all’s setup is in terms of infrastructure.

For me I currently have IB Gateway running with a custom C# trading engine I wrote to pull market data and check to execute trades daily.

My workflow:

  • Every morning at 9:25 am IB Gateway will auto restart and auto login. I am using the “Auto restart” feature in IB Gateway for this. This setup ensures that I don’t have to manually log in and authenticate the Gateway every day (although I believe it will require a login/authentication once a week to continue to work).

  • Windows Task Scheduler auto launches my C# application at 9:28am and I connect to the client and sleep the thread until 9:30:05 at which point I pull market data, analyze signals and push trades if needed. All of this is automated and executes in a few seconds right after the opening bell.

My concerns:

  • IB Gateway still logs me off for good sometimes and requires manual log on/ authentication.

  • if I need to travel with my laptop or internet drops the client won’t be able to establish a connection.

Instead of running things all locally I was considering offloading the program to run on a VM or server (the lower the cost the better).

Does my workflow make sense or is there a more efficient way to achieve full automation? Does everyone use servers instead of running everything locally?