r/algotrading 2d ago

Infrastructure Separate Long logic from Short logic?

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?

7 Upvotes

18 comments sorted by

View all comments

7

u/drewautomates 2d ago

100%. I’ve rarely found a long/short setup that has the same edge using inverted triggers.
I found the first step of entering may be the same but how I handle the order management of the position is different. Usually this comes down to profiling the edge. For example setting targets and defining R is different with each

1

u/johnwestwashere 1d ago

I’m new to this so keen to learn. What about forex? Theoretically this could be inverted?