The baseline is never edited
Twelve Expert Advisor builds, 815,029 cancelled orders and one rule that made algorithmic trading work measurable.
There's one rule at the top of the Centy Traders strategy ledger, in bold: the baseline is never edited.
It sounds bureaucratic. It's the most useful engineering decision on the project.
How strategies rot
An algorithmic strategy that works is fragile in a specific way. Someone notices a flaw, like a stop that's too tight or orders that churn, and fixes it. The fix is correct. Then another correct fix lands. Then another. A few weeks later the strategy is performing worse than it used to, and nobody can say which change did it, because every change was made to the same file.
What the audit found
One fork of our straddle strategy had a churn problem. The numbers were real: 815,029 order cancellations in 12 days, about 144 a minute, from orders being cancelled and re-placed on every tiny drift in price. The sell side had also effectively frozen: 63 sell orders in eleven days.
We fixed both. The fixes were individually right. And the combined build still didn't beat the untouched original. A more aggressive variant, with a virtual trailing stop and deeper rungs, blew an account.
The rule
So the original was frozen at a known commit, and every change since has become a new named product, with its own magic number, its own comment prefix, its own line in the ledger saying what changed, when, and whether data has validated it. No build can silently overwrite one that works, and two builds can never be confused on a live chart.
Two definitions came with it:
- Locked means do not edit this build.
- Proven means data has validated it.
They are not the same word, and the ledger never lets them be used as if they were.
Venue versus defect
The ledger also forced a better question when things went wrong. On one live broker, the baseline's stop closed 21 of 22 positions. It looked like a strategy bug. It was the venue: a spread of $0.31 against $0.04 on the demo account. The strategy was fine; the environment was different. Newer builds now refuse to start if their profit lock would sit inside the broker's spread or minimum stop distance, and the error names the input to change.
Takeaways
- Freeze what works, then make every change an experiment.
- Give every experiment a name a human can't confuse.
- Measure the venue before you rewrite the code.