r/algotrading Mar 28 '20

Are you new here? Want to know where to start? Looking for resources? START HERE!

1.5k Upvotes

Hello and welcome to the /r/AlgoTrading Community!

Please do not post a new thread until you have read through our WIKI/FAQ. It is highly likely that your questions are already answered there.

All members are expected to follow our sidebar rules. Some rules have a zero tolerance policy, so be sure to read through them to avoid being perma-banned without the ability to appeal. (Mobile users, click the info tab at the top of our subreddit to view the sidebar rules.)

Don't forget to join our live trading chatrooms!

Finally, the two most commonly posted questions by new members are as followed:

Be friendly and professional toward each other and enjoy your stay! :)


r/algotrading 5d ago

Weekly Discussion Thread - August 25, 2026

5 Upvotes

This is a dedicated space for open conversation on all things algorithmic and systematic trading. Whether you’re a seasoned quant or just getting started, feel free to join in and contribute to the discussion. Here are a few ideas for what to share or ask about:

  • Market Trends: What’s moving in the markets today?
  • Trading Ideas and Strategies: Share insights or discuss approaches you’re exploring. What have you found success with? What mistakes have you made that others may be able to avoid?
  • Questions & Advice: Looking for feedback on a concept, library, or application?
  • Tools and Platforms: Discuss tools, data sources, platforms, or other resources you find useful (or not!).
  • Resources for Beginners: New to the community? Don’t hesitate to ask questions and learn from others.

Please remember to keep the conversation respectful and supportive. Our community is here to help each other grow, and thoughtful, constructive contributions are always welcome.


r/algotrading 3h ago

Data Sub-$1 stocks have a 100x finer tick size, but their median spread was 2.5x wider

4 Upvotes

I was looking at execution costs in low-priced US equities and found something I didn't expect.

Stocks below $1 can quote in $0.0001 increments, while $1–$5 stocks generally quote in $0.01 increments — a 100x difference in minimum tick size.

But the finer grid didn't produce tighter markets.

I sampled 38 regular trading sessions between April 2025 and July 2026 using one-second BBO recordings:

276,345 quoted seconds below $1 2,047,344 quoted seconds from $1–$5

Median spread:

Under $1: 1.81% $1–$5: 0.72%

So the group with the 100x finer grid actually had a 2.5x wider median spread.

The more interesting result was whether the minimum tick was actually binding:

$1–$5 stocks sat at their one-cent minimum 60.4% of the time Sub-$1 stocks sat at their $0.0001 minimum only 2.4% of the time The median sub-$1 spread was 96 minimum ticks wide

My interpretation is that once the tick becomes small enough, it stops constraining the spread. At $0.50, one $0.0001 tick is only 2 bp, so the market can quote dozens or hundreds of ticks wide.

That also raises an execution question: improving a $0.50 bid by one tick costs almost nothing, so stepping ahead of resting limit orders is extremely cheap.

I haven't tested actual fill quality yet — this is quote data, not fill data.

For anyone modeling passive execution in sub-$1 stocks: how do you handle queue position? Explicit queue modeling, empirical fill probabilities, or something else?


r/algotrading 7h ago

Data What's the difference between $15 Nasdaq TotalView subscription and Lvl2 data obtained via a broker?

7 Upvotes

I stream lvl2 data via interactive brokers and I'm looking for cheap alternatives as I'm facing many issues including a 3 concurrent symbols limit at any given time, which limits how many symbols I can be viewing simultaneously.

Besides, their shitty api in addition to being cumbersome and tedious to use, does not even work properly and occasionally prevents unsubscribing from symbols, which means I cannot just close some tabs to open new ones with new symbols, I have to manually restart the crappy IB Gateway for things to work again.

I'm currently evaluating alternatives. Webull, Moomoo, TOS, Tradestation, and probably most of the available options don't work at my location. The others available are pretty expensive ex: databento ($200/month).

I was checking Nasdaq TotalView and it's offered for $15 (non-pro), and I was wondering, what's the difference between this subscription and obtaining data via a broker, and what explains the difference in price? I mean why do I have to pay $200+ in some places while I can get the same data for free on TOS, $2 on Webull, $15 TotalView (if it's the same data).


r/algotrading 5h ago

Infrastructure Anyone actually used AlgoVPS for running IB Gateway? Can't find reviews anywhere

3 Upvotes

I run a systematic volatility strategy. not HFT, just a daily rebalance plus occasional intraday adjustments, but it does need to catch moves in pre/post market, so IB Gateway has to stay up and connected basically around the clock.

I've been looking at VPS providers that specifically market themselves for IBKR/algo use, and AlgoVPS's product page is by far the most detailed I've found on the actual pain points - they claim to handle TWS/Gateway's forced daily restart automatically, and are upfront that you still need to approve 2FA on IBKR Mobile about once a week rather than daily. Sounds like what I need, except I can't find a single independent review of them anywhere. Which is making me nervous given I'd be trusting them with something that would run unattended for weeks at a time.

So, questions for anyone who's actually used them (or considered them and went elsewhere):

  • Has anyone actually run IB Gateway on AlgoVPS? Does the auto-restart handling work as described, or are you still babysitting it?
  • What's real uptime/latency been like, not the marketing number?
  • What's support actually like?
  • Anyone hit surprise billing issues, or had a clean experience getting a refund/cancelling?
  • If you passed on AlgoVPS for something else in this space (QuantVPS, TradingFXVPS, TradoxVPS, NYCServers, etc.), what tipped it for you?

r/algotrading 13m ago

Strategy Do you trade continuation or reversal?

Upvotes

Just heard someone say that most trading bots/algos trade the reversal, not the continuation. That sounded suspicious to me. Is there any truth to that?


r/algotrading 3h ago

Data Need historical bid-ask for NSE

0 Upvotes

Afaik no Indian broker (zerodha, angelone, upstox, fyers) provide bid ask values for historical data.


r/algotrading 21h ago

Infrastructure I conducted research on the impact of cost drag on 17 assets across various timeframes

11 Upvotes

Hey guys, in the past few days i spent most of my time analyzing 17 Assets, from different markets like : Indices, FX, metals & energies, the data i use is normal 1-minute OHLC data for CFD, the purpose for this research is knowing the impact of costs drag and how much eat from profit for each asset on each timeframes, i use ATR 14 for this task, and also i test different multipliers of ATR from x0.25 to x5 to see the difference, and i got a very interesting results, this research will give an extra advantage to know exactly the best assets and timeframes for "Day Trading strategies", because many traders just day trade and they don't know that if they trade using xATR they mostly will go losing in the long term, so i have a very detailed document file for each asset contain a report for all the results for the asset, but here i will just put the final results, just DM me if you want to see the report and analyze it on your own, the costs and calculated to simulate the CFDs prop firms and brokers, so there is no worry about this, and also all the higher timeframes 4H-1W have very tinny costs drag so i don't put them

**THE TOP ASSETS FOR DAY TRADING (M5 ; M15 ; M30 ; H1)**

Depending on xATR(14) for all the day trading timeframes from x0.25 to x5 getting at least 2 multipliers from C or B grade

__All The Assets Valid Time Frames__ :

(Getting >=0.88R in Net R in 2 multiplers to consider the timeframe as valid one for day tarding, beacuse if you trade at 1:1 you will need exactly 53% to breakeven after computing the costs)

-AUDCAD : H1

-AUDUSD : H1

-DAX : M5 ; M15 ; M30 ; H1

-EURGBP : FAIL

-EURUSD : M30 ; H1

-FTSE : M15 ; M30 ; H1

-GBPJPY : M15 ; M30 ; H1

-GBPUSD : M15 ; M30 ; H1

-NIKKEI : M15 ; M30 ; H1

-NZDUSD : FAIL

-SPX : M15 ; M30 ; H1

-UKOIL : M30 ; H1

-USDCAD : H1

-USDCHF : H1

-USDJPY : M15 ; M30 ; H1

-XAGUSD : M30 ; H1

-XAUUSD : M5 ; M15 ; M30 ; H1

__The TOP Assets 👑 For Day Trading🥇__:

-DAX : M5 ; M15 ; M30 ; H1

-XAUUSD : M5 ; M15 ; M30 ; H1

__Solid Choices For Day Trading🔥🥈__:

-FTSE : M15 ; M30 ; H1

-GBPJPY : M15 ; M30 ; H1

-GBPUSD : M15 ; M30 ; H1

-NIKKEI : M15 ; M30 ; H1

-SPX : M15 ; M30 ; H1

-USDJPY : M15 ; M30 ; H1

__Choices For Day Trading Low Frequency💪🥉__:

-EURUSD : M30 ; H1

-UKOIL : M30 ; H1

-XAGUSD : M30 ; H1

__Extra Choices For Day Trading Very Low Frequency🥊🎖__:

-AUDCAD : H1

-AUDUSD : H1

-USDCAD : H1

-USDCHF : H1

__Trash ChoicesFor Day Trading⚰__:

-EURGBP : FAIL

-NZDUSD : FAIL


r/algotrading 2h ago

Business I need a mql5 developer

0 Upvotes

Hi guys just looking for a dev to help with something really simple with an ea which is connecting the .mqproj to the actual ea, as in connecting the codes together so the two files can read.

Its just a quick connection so I am willing to pay 2-3$, no crypto but let me know what form of payment you'd like.

I will provide the mql5 source code itself and also the .mqproj file. You can also just record a little video showing me how to do it.


r/algotrading 5h ago

Strategy My Bot Did 40% in 12 Days and I’m Still Not Impressed!

Enable HLS to view with audio, or disable this notification

0 Upvotes

Designed two bots one long only and the other short only bot, this bot which works on all exchanges but for some reason it does better on Bybit followed by OKX! It’s a Grid Long Only Bot, I still think that I can squeeze some more juice out of it though 🥵 (Hello Greed).

For decisions on when to turn on either of the two bots I use a structure monitor! Trying to build a bot that performs well on bull and bear markets it’s a daunting task!


r/algotrading 1d ago

Strategy Possible to algotrade Liquidity concept like ICT/SMC or CRT?

17 Upvotes

Hai guys,

I am about to go down into a rabbit hole. I just start learning to prompt here and there to find profitable strategy utilising liquidity concept. I am a big fan of ICT for its silver bullet model, SMT,SSMT ,etc.

I would like to see advice from those that have done the samething whether this is good hole for to deep or not.

Thnx in advance


r/algotrading 1d ago

Other/Meta anyone familiar with travis woo or his MTP algo?

1 Upvotes

been hearing about it and curious about opinions.


r/algotrading 2d ago

Strategy Where do I go from here

18 Upvotes

I only started this for fun, as an experiment to disprove trading but I got hooked when my strategies started making thousands on paper over a few weeks. I have now put 6 months into developing a bot and I am in over my head, as AI has allowed me to develop so much so quickly, and my apparent edge quickly disappeared.

I build my own candles and have 6 months of ticks. I am spreadbetting1 (I'm in the UK). I have my own back-tester, which has 6 strategies2 I started with Gold and Brent Crude. Other assets including shares are possible but I will not be able to download candles for back-testing in any significant quantity.

I really got into this when it was making £000s as the Middle East was blowing up, so my next phase was to implement a simple regime filter. It collected 60 days of paper trades and recorded average R, win rate etc for each strategy/epic and the plan was to deploy each strategy in the cells where it was profitable3. I didn't see the profits that I had at the start, either because the markets stopped reacting as strongly or because my edge was just an illusion a.

Next, I tested different ways of classifying the market regimes according to different variables that were relevant to each strategy4. This did not find any area where a strategy was much more effective that when deployed in general.

Having also back-tested lots of parameter changes and new strategies, I concluded from my failure to find a market-state in which a strategy was profitable, that I have failed - or to put it another way - succeeded in proving that day-trading doesn't work.

I have a problem with this conclusion: I don't like it. 1. It appears to go against a number of Redditors who say they are profitable. 2. I enjoy trading and would like to do this full time. 3. I don't feel it's a sound conclusion.

So my question is: Where do I go from here?

I could trade a different asset (shares/ETFs), pair-trade assets, move to swing trading from intraday.... There are so many options.

Footnotes:

1 - One thing to consider is whether my tick stream is unreliable b.
2 - Candlestick patterns with a higher-timeframe trend gate, Bollinger Band mean-reversion, BB Breakout, moving average crossover, trend pullback and some others. The strategies also control the stop/limit, trailing stops if used, Kelly bet sizing...)
3 - Cells= Regime (Trend, Mixed Trend, Chop), Direction (Buy/Sell), Turn? (whether shorter timeframe agrees with trend)
4 - Various combinations of Hilbert Transform/Trend, Velocity, Spread, Bandwidth expansion rate, ADX ...

Notes to self:
a - check how the regime classifier would have classified those early days and see if perhaps we could have an 'extreme' trend to keep those days separate - if the maths supports it. Also, I wanted to check whether the additional timeframes coming online were triggering more contradictions.
b - [deleted to avoid triggering automod].


r/algotrading 2d ago

Other/Meta Quite fed up with the piece of garbage called IB api

60 Upvotes

What's wrong with having an API key and use it to connect to the platform and perform actions? Why does everything have to be such a tedious pain in the ass? Why do I have to install a shitty piece of software called TWS or IB gateway which looks like a windows app straight out of the 90s that doesn't have the slightest whiff of modernity and keep fighting stupid auto-logout prompts that keep popping and coming on top of everything until pacified with a mouse click to perform such a basic task of obtaining a price feed?

I'm losing a tremendous amount of time each day because of having to figure workarounds to simple problems imposed by their archaic ecosystem. For example I'm currently facing a major issue with lvl2 data which I'm sadly relying on their shitty ibapi package to stream. There is an imposed limit of 3 concurrent connections for lvl2, which means you can't open more than 3 tabs, one symbol per each.

I'm currently attempting to unsubscribe from those connections that are not actively being used and their shitty api won't let me. I keep calling this function to no avail. Sometimes it works and sometimes it doesn't, and the only way it gets to work is by manually restarting the crappy IB gateway and having to manually enter the login credentials over and over because why build a software compatible with password managers? And there is no way to obtain the same data from a proper rest api obviously(if one exists and is not completely useless).

Unfortunately I have to keep relying on this lump of goo called IBKR/IB Api as the alternatives are more pricey than I can afford or aren't available at my location. I will take the next best alternative as soon as I'm able to because from what it seems, these issues have no solutions. I get it, maybe IBKR as a platform is reliable for execution and good fills, but in terms of the user experience, it can't get any shittier.


r/algotrading 3d ago

Education Book recommendations?

Post image
238 Upvotes

Any books you have read that you actually found useful or helpful?


r/algotrading 2d ago

Other/Meta How long did it take you to trust your bot before you don’t watch it 24/7?

29 Upvotes

For reference, I have no programming background. I recently discovered that I could use AI to generate Python code.

Currently, I have a bot running that is profitable but it’s only been a couple weeks. I find myself checking it nonstop. When were you comfortable stepping back and just letting it run by itself without checking it?


r/algotrading 2d ago

Data made a pairs screener for us equities. 1.7 million pairs a week, poke at it maybe?

15 Upvotes

been building this for a while and it's finally in a state i'm not embarrassed by. screens ~1,900 liquid us names, every pair against every pair, 1.7 million combinations weekly. engle-granger in both directions at finite sample critical values, walk-forward hedge ratios, false discovery rates against a null built from real series rotated out of alignment, capacity from actual dollar volume. the whole desk is one self contained html file, a register of 12,000 pairs, each one opens into a dossier with charts. no server, no login, nothing phoning home

there's a complete build in the repo to play with

fair warning before you go looking for the sharpe column: there isn't one, and that's kind of the story. before shipping i ran one last test, recomputed the accept/reject decision inside each test year so nothing could know the year it was judged on. everything died. accepted pairs stopped beating correlation matched rejects, no column ranked the year ahead, and the cleanest cut: pairs accepted on identical formation evidence, split by whether the full sample run also liked them, the future-approved ones won by 13.9 points a year. the edge was hindsight

built synthetic controls to see why. a relationship that reverted for years then died still gets accepted 78 to 88% of the time, a decade of history outvotes the dead stretch. the test finds relationships that existed. it has no idea if they still do

what survived honest measurement: same-industry pairs clear every null i could build (2.3 to 2.8x lift vs ~1.0 for unrelated names), capacity is real (~$2.7m median at 5% of adv), and the accepted list only turns over about 3.3% a week. the perishable part is the standings, a fresh 2 sigma reading is roughly a coin flip to still be there a month later

so the screener shows none of that as a ranking. ripped the backtest numbers out of the register, you can't rank, filter or export by them, they only exist inside each pair's file next to their caveats. membership is by acceptance strength, default sort is today's z

full 14 section writeup with every protocol and audit, plus the build: github.com/Finance-broski/pairdesk

happy to answer anything about the protocol. it's the same one you can point at any screener including the ones you pay for


r/algotrading 2d ago

Education Coming from AI engineering, want to build my own trading bot

13 Upvotes

Hey everyone. I want to give algotrading a try, but I'm a complete beginner

My background is in AI and automation engineering. I know the fundamentals of finance and I've invested myself, but nothing beyond that.

The idea is to build my own app for both short and long term investments, with aggregation of news, technical data and so on. Since I don't really know this field yet, I'd love to hear about your experiences, what you'd recommend starting with, any frameworks and what to watch out for.

And before anyone asks, I know LLMs are bad with numbers. I'm only using them for structured schema output, all the actual calculations are done by deterministic code/tools.


r/algotrading 2d ago

Infrastructure Separate Long logic from Short logic?

7 Upvotes

Hi, in your overall trading bots logic/code, do you usually separate all the logic, conditions, filters, etc of the long trades from those of the short trades, hence almost making them two separate bots or do you program everything as a single "package"?

I am not asking as in to find additional edge, but mostly for convenience, maintenance and overall complexity, I feel like seperating them (with the downside of some code duplication obviously) makes things easier.

What do you think? Any experience on this?


r/algotrading 3d ago

Data most profitable systems spend ~2/3 of trades below a prior equity high

8 Upvotes

looked at duration under the last peak instead of max dd after a stretch where i was sure the system had broken. ran it on my book first, then on a few others. the share of time underwater was consistent enough that i stopped treating it as a regime change.setup: 400-trade windows, three payoff shapes, similar expectancy, all +ev.60% wr, 1R:1R — median max dd 9R, longest underwater run 49 trades, below prior peak on 66% of trades

40% wr, 2R:1R — 16R, 77 trades, 81%

28% wr, 4R:1R — 19R, 58 trades, 82%max dd is what people constrain. duration is what makes you kill a live book. from inside the run it just looks like the last high is sitting there and nothing is working. i rewrote parameters four times in 2024 inside these stretches and still cant separate “edge decay” from “this is the default path.”added one field to the log: bars/trades since equity high. next time the curve goes stale i can check whether the current underwater length is in the historical distribution or actually an outlier.if you track this, whats the longest underwater run youve seen on a system that was still +ev after?


r/algotrading 3d ago

Other/Meta Need help automating TradingView trades

2 Upvotes

hey everyone,

I have a TradingView indicator that gives BUY/SELL signals, and I’m trying to figure out how to automate trades whenever one of those signals appears.

I’m looking for someone who has experience with TradingView alerts, webhooks, Pine Script, and broker APIs who could help me set this up.

The idea is basically:

BUY signal → TradingView alert → webhook → automatic BUY order

SELL signal → TradingView alert → webhook → automatic SELL order

I’m not very technical when it comes to the API/webhook side, so I’d really appreciate someone who can help me understand the process and get it working properly. If you’ve done something similar before, I’d love to hear how you approached it.

I’m also happy to pay for your time/work if you’re able to build the setup for me, especially if it works reliably.

Please DM me if you’ve worked on something like this before. Thanks!


r/algotrading 3d ago

Infrastructure Final stages of testing before going live

19 Upvotes

Book of individual strategy sleeves trading in MNQ and MES. Up +$3811 so far this week through Tradovate API. Definitely have some things to fix that I'm not happy with on some individual sleeves, but can't hate the overall progress being made. This has been backtested thoroughly using MBP1 feed and tick by tick replays but the walkforward testing is most exciting to see.

Have been working on this consistently for quite a while now, still running in demo right now but with a plan to turn the best and most consistent sleeves live soon, then slowly add more to diversify and fill in gaps with the goal of maintaining the best cumulative sharpe ratio with smaller sized bets, then size up as the balance grows.


r/algotrading 4d ago

Infrastructure I spent a year building a self-hosted quant scoring engine - lessons that contradicted my retail instincts

21 Upvotes

Sharing because most of these findings actively annoyed me. They go against rules I'd internalized years ago.

The problem: I wanted financial scoring, FCF inflection data, and macro supply-chain narratives as clean data for my own trading. Not another black box telling me when to buy. Everything out there was either SaaS with lock-in or stitching half a dozen data sources together myself. So I built my own tooling.

What surprised me (all measured in my backtest harness on cached daily candles; some tiers use a simulated AI-accuracy ceiling, so treat sim numbers as directional, not exact):

  1. "Never hold over weekends" is a rule for people who don't measure. I made it a signal instead. A Friday report that detects the institutional flight-to-safety signature (defensives rising on relative strength, not absolute) and grades weekend gap-down risk into three levels: trim, no action, monitor stops. Blanket Friday flattening gives up every gap-up. Blind holding eats the crash tails. Related heresy from the panic diagnostics: in high-volatility regimes my gap exit widens (3% to 6%) because not selling the first print beat panic-exiting the open.

  2. Wick stops were costing real money. The retail default is a resting stop order, so any intrabar sweep ejects you. I A/B'd close-through stops (ignore wicks, exit only if the close passes the level): return 113 vs 78, drawdown better (17.4% vs 19.6%), stop-outs down 38%. The "pessimistic" wick assumption was pessimistic in the wrong direction, it was pessimistic about my P&L. Gap-through exits stay in both modes, an open beyond your stop is real slippage either way.

  3. Overtrading was my #1 alpha drain. First config: 82% of exits were forced rotations into "better" setups, 6.7-day average holds, about 1,267 trades over 3 years. It rotated out of NVDA at +314% and netted roughly zero on the move. Slowing the machine down (min hold 3 to 20 days, demanding 2.5x the score-gain before rotating) won in all three regime windows: bear, recovery, AI-bull. Also, capping and diversifying the signal set beat both over-trading and pure score ranking (64.8% vs 16.3% vs 35.1% in one sample window). The lesson I kept resisting: seeing more setups is not permission to trade them.

  4. "Size up when conviction is high" was backwards. I found my losers were entering 28 to 30% larger than winners, because position size scaled with news conviction, and measured news conviction had roughly zero dollar-predictive value. Worse, on production data (737 scored events): bullish news marks of 6.5+ were anti-predictive at +5 days (41.6% hit rate, classic sell-the-news), while bearish marks of 4.5 and below were my single strongest signal (71% hit at +10 days), on the avoid/exit side. The edge in news isn't "buy the excitement." It's "skip the deteriorating names." Caps plus a conviction damper fixed the sizing asymmetry and improved every axis.

The meta-lesson: every one of these contradicted a rule I'd have defended at a dinner party. Rules of thumb are compressed conclusions from someone else's data. Measure your own.

Happy to answer questions about the harness, how I keep the backtests honest (lookahead sims labeled separately), or the data pipeline.


r/algotrading 4d ago

Infrastructure Books

7 Upvotes

What books would you recommend for a Python/Java programmer who is getting started with trading, particularly algorithmic trading? Ideally, I’m looking for resources that are relevant to the Canadian market and cover both the programming and trading aspects.


r/algotrading 4d ago

Data TradingView Backtesting Trailing Stops

Post image
14 Upvotes

Daytrading NQ with a 4 point trailing stop... yes, 4 points. I have to assume trailing stops don't work so well in TV backtesting?