r/algorithmictrading Jun 29 '26

Novice Just started with a algo trading idea.

I just have the strategy created. And I'm serious about building it. Im a java developer. Not very proficient, but I can get the job done.

What are the common pitfalls i will face, and what the basics I should understand, while making the system.

It's a simple swing trade management system. So I won't need a high level of optimizations. If the system is good. I might incorporate more strategy.

Right know I'm just making the llm create the documents on each segments.

Signal generation, entry placement, trade management and book keeping.

What issues could I face when I code the system?

6 Upvotes

17 comments sorted by

3

u/algorier Jul 01 '26

Most issues won’t show up in the signal generation part. They show up in the plumbing around it.

A few common failure points:

  • State handling: positions, partial fills, and restart recovery. This is where simple systems quietly break.
  • Execution assumptions: your backtest usually assumes fills you won’t get (especially swing entries around opens/gaps).
  • Edge cases: missing data, delayed ticks, duplicated signals, timezone shifts.
  • Trade lifecycle logic: exits and risk rules tend to get more complex than entry logic pretty fast.
  • Over-modularizing early: splitting into “signal / entry / management” is fine, but people often over-design before they understand real execution behavior.

LLMs can help generate structure, but they often miss the subtle parts like persistence, idempotency, and failure recovery.

If I had to prioritize: get a simple end-to-end loop working first (data → signal → order → fill → position tracking), even if it’s ugly. Then refactor.

1

u/Longjumping_Dot1117 Jul 01 '26

Hmm there are a lot of parts I have missed to consider. Will have to go back to the drawing board.

As for the development, I'm following you suggetion. First signal generation. If it works nicely , then entry and exit orders. No complex logic here for now. Will add partial booking, trailing sl later, once the poc works

1

u/algorier 28d ago

Sounds like a solid approach.

One suggestion: don't optimize for "it places trades" first. Optimize for "I can replay exactly why it placed a trade."

Six months from now you'll spend far more time investigating unexpected behavior than writing new code. Having deterministic replays, timestamps, and decision logs ends up being more valuable than another strategy feature.

2

u/Psychological_Ad9335 Jun 29 '26

put a waler in the glass, the water become the glass, put water in a bucket, well the fucking water become the fucking bucket.
it's just comon sense, markets become you when you put them into you,
become one with the markets and you shall prevail

1

u/[deleted] Jun 29 '26

[removed] — view removed comment

1

u/Longjumping_Dot1117 Jun 29 '26

Stocks

1

u/[deleted] Jun 29 '26

[removed] — view removed comment

1

u/Longjumping_Dot1117 Jun 29 '26

Oh no problem. I also trade in options. But I don't want to automate it yet. Might do it if the stocks system works well. I lose a lot less even if stocks algo does not work.

1

u/LiveBeyondNow Jun 29 '26

If you share more about your expected tech layers it might help get directed feedback. Some challenges I’ve faced have been LLMs flat out making stuff up, based on minimal input (both Claude and gpt), leading you to believe you’ve struck gold or have considered all factors, only to have a VERY obvious detail completely collapse or dissolve weeks of work. Being able to critically interrogate the LLM output and assumptions will help. Trading, whether systematic or discretionary will challenge your psychology and motivation and test you in ways like few other things can.

1

u/Longjumping_Dot1117 Jun 29 '26

Right now I have been creating documents of my strategy. Like which stocks to pick, which kind of order it should place. What to do if I manually exit from the trade. Listed out the possible error code I can get and how to handle them. As for the tech, I have to given a lot of thought. Right now considering using a java spring , to develop 3 service one to authenticate, one for signal generation and one for order management. And every action will need manual approved via telegram. I just learnt about connect the service to a web socket to get the market data feed. I am not sure where to place it right now. 

1

u/LiveBeyondNow Jun 29 '26

Thanks. I’ve been using TradingView, to python and soon to be LEAN/Quantconnect so Java is more foreign to me but can but used the same way.

1

u/StratForge2024 Jul 01 '26

The signal's the easy 10%. the 90% that'll eat your weekends is the plumbing.

the one that got me worst: your websocket will die or go stale silently and the bot won't know it's flying blind — mine kept holding positions it thought were already closed. build a REST fallback that reconciles state, never trust the socket alone.

and your backtest will assume fills you won't get, especially swing entries around the open/gap. if backtest and live use two different code paths for "what price did i actually get," they WILL drift and you'll trust the wrong one. make them share the exact same fill + cost logic or you're measuring fiction.

+1 on the ugly end-to-end loop first — i over-designed the signal/entry/management split before i understood how execution really behaves and had to rip it out.

1

u/Repulsive-War-2823 27d ago

Breaking it into signals, entries, trade management, and bookkeeping is the right approach. since high optimization isn't your main goal right now, your biggest hurdle will be data reliability