How a trading bot thinks — and why the answer is: it doesn't
A bot has no intuition, no memory of yesterday's fear, and no ability to notice something you did not tell it to look at. Understanding that is how you write a good one.
Vizanix engineering · about the author
- SECTION
- Essays
- PUBLISHED
- 2026-08-28
- CHAPTERS
- 6
- READ NEXT
- 3
- LANGUAGE
- written in English
“What does the bot think about this market?” is a question we are asked often, and the honest answer is that it does not think anything. It evaluates. The distinction is not pedantry — it determines what you can reasonably expect from it.
One loop, no continuity
Strip a trading bot to its essentials and you get a loop: an event arrives, state updates, a function is evaluated, the result is compared to thresholds, an action is emitted or not. Then it happens again, from scratch.
Nothing carries over except what you explicitly stored. If the bot should know that this instrument has stopped out three times today, that fact must exist as a counter in a state object. It will not remember. There is no residue.
def on_event(event, state):
state.update(event) # everything the bot knows lives here
features = compute(state) # from state alone, nothing implicit
signal = strategy.evaluate(features) # a number, compared to a threshold
if signal is None:
return log_skip(reason(features)) # why nothing happened is also output
return risk.evaluate(signal, state) # which may still say noThat is genuinely the whole architecture. Everything else — the layers in architecture, the state machine in order handling — is machinery to make this loop correct under adversarial conditions.
No context, and no way to acquire it
A human trader looking at a chart brings everything: that the exchange had an outage this morning, that a listing was announced, that this pattern has been failing lately, that the whole market feels thin. None of it is in the price series, and all of it informs the decision.
A bot sees the numbers you piped into it. If the exchange had an outage, the bot sees a gap in the candles and treats it as a large move. If liquidity has collapsed, it sees the same bar shape at a tenth of the depth and sizes as usual — unless you gave it a liquidity feature and told it what to do with one.
This is a feature, mostly
The absence of intuition is also the absence of everything intuition drags along. The bot does not get attached to a position. It does not need to be right. It feels nothing about the loss it took twenty minutes ago and does not “make it back”. It applies the same rule to the thousandth signal as to the first.
That is the entire value proposition of automation, and it is purchased with the context loss above. It is a trade, not an upgrade.
Where a model changes the picture, and where it does not
Adding machine learning does not add intuition; it adds a more flexible function between features and a number. Our microstructure engine uses gradient boosting as the decision engine rather than as an indicator — three heads producing direction, maximum favourable excursion and maximum adverse excursion — and every one of them still sees only the features it was given.
A model can find interactions you would not have written by hand. It cannot see outside its inputs, and it fails in a specific way that is worth internalising: confidently. A rule-based bot in an unfamiliar regime typically does nothing, because no condition matches. A model extrapolates, and returns a number that looks exactly like the numbers it returns when it is right.
The discipline this imposes
Because nothing is implicit, everything has to be stated — and that requirement improves strategies before a line of trading code runs.
- “Enter on a strong move” becomes: how many bars, what minimum percentage each, what body-to-range ratio, what happens on a doji.
- “Avoid dead coins” becomes: what fraction of flat bars over what lookback disqualifies an instrument.
- “Don't overtrade” becomes: a concurrent position cap, a daily trade count, a loss-streak blacklist.
- “Cut losses” becomes: a stop level, computed how, moved when, under which conditions never.
Our reversal strategy records the specific reason a signal was rejected — series too short, doji in the sequence, expansion filter failed, RSI not extreme, impulse outside the corridor. That list did not exist before someone had to make the rules explicit enough for a machine. Writing it down is where most of the improvement happens.
What to expect, stated plainly
A trading bot is a rule follower with perfect consistency, unlimited attention, no judgement and no context beyond its inputs. It will do exactly what you specified — including in the situations you did not think about, where “exactly what you specified” is precisely the problem.
Which is why the interesting work is not the trading logic. It is the boundaries: the risk rules, the limits, the kill switch, and the monitoring that tells you when the machine is confidently doing something stupid.
This article describes engineering practice. It is not investment advice. Vizanix develops software and does not promise trading returns.