AI Trading Platform: From Losing to Winning - Our Optimization Story
Where We Started
In our last post, we built a solid evaluation framework. We could now test our trades fairly. But there was a problem: we were still losing money.
Our honest numbers showed:
| Metric | Value | Status |
|---|---|---|
| Profit Factor | 0.94 | |
| Win Rate | 4% | |
| Average Loss | -253% | |
| Risk/Reward | 0.59:1 |
A Profit Factor below 1.0 means you lose more than you win. We needed to fix this.
The Goal
We set clear targets:
- Profit Factor > 1.2 - Make more than we lose
- Win Rate > 50% - Win more trades than we lose
- Smaller losses - Each losing trade should hurt less
- Better Risk/Reward - Win more per trade than we lose
The Journey: 15 Versions
We did not find the answer quickly. We tested 15 different versions of our system. Here is what happened:
| Version | Change Made | Trades | Profit Factor | Result |
|---|---|---|---|---|
| v1-v4 | Very strict filters | 0 | - | No trades at all |
| v5 | Relaxed filters | 332 | - | All breakeven |
| v6 | Tight stops (1.0 ATR) | 200+ | 0.69 | |
| v7 | No breakeven stop | 150+ | 1.03 | |
| v11 | 0.75 ATR stops | 180+ | 1.09 | |
| v13 | Very strict filters | 2 | - | Too few trades |
| v14 | Earlier trailing | 160+ | 0.94 | |
| v15 | 0.6 ATR stops | 171 | 2.77 |
As you can see, we tried many things. Some made it worse. Some made it better. Finding the right balance was not easy.
What Was Difficult
Problem 1: Stop Losses Were Too Wide
Our original stop loss was 2.0 ATR (Average True Range). This means the price could move a lot against us before we exit. When we got stopped out, we lost an average of -253% per trade.
This was our biggest problem.
Problem 2: We Traded Bad Time Periods
We found that some time periods were very bad:
| Time Period | Average Loss | What Happened |
|---|---|---|
| 1 week | -33% | Very bad |
| 6 months | -99% | Disaster |
| 1 year | -78% | Terrible |
| 1 month | -45% | Poor |
Weekly and monthly charts showed huge losses. We did not know this until we looked at the data.
Problem 3: Some Stocks Do Not Work
We also found that META (Facebook) performed poorly:
| Symbol | Win Rate | Average Return |
|---|---|---|
| META | 33% | -0.43% |
Not every stock works with every system.
Problem 4: The Breakeven Stop Hurt Us
We had a feature that moved our stop loss to breakeven after a small profit. This sounds smart. But there was a problem: trading costs.
When you add fees, spread, and slippage, breakeven is actually a small loss. So many trades that hit breakeven were actually losing trades.
How We Fixed It
We made five key changes:
Fix 1: Tighter Stop Losses
We changed the ATR multiplier from 2.0 to 0.6:
| Condition | Old ATR | New ATR |
|---|---|---|
| Normal | 2.0 | 0.6 |
| High volatility | 2.0 | 0.85 |
| Low volatility | 2.0 | 0.5 |
Result: Average stopped loss went from -253% to -0.81%. This was the biggest improvement.
Fix 2: Earlier Trailing Stop
We changed when the trailing stop activates:
| Setting | Old Value | New Value |
|---|---|---|
| Trigger at profit | 1.0R | 0.7R |
| Trail distance | 0.5R | 0.4R |
This means we lock in profits earlier and follow the price more closely.
Fix 3: Block Bad Time Periods
We added a blacklist for time periods that lose money:
Blocked: 1 week, 1 month, 2 months, 3 months, 6 months, 1 year
Now the system will not trade these time periods.
Fix 4: Block Bad Symbols
We added a blacklist for stocks that do not work:
Blocked: META
Fix 5: Disable Breakeven Stop
We turned off the breakeven stop feature completely. It was causing more harm than good.
The Final Results
After all these changes, our results look very different:
| Metric | Before | After | Improvement |
|---|---|---|---|
| Profit Factor | 0.94 | 2.77 | +194% |
| Win Rate | 4% | 61.4% | +1435% |
| Total Return | Negative | +82.79% | |
| Average Loss | -253% | -0.71% | +99.7% better |
| Risk/Reward | 0.59:1 | 1.74:1 | +195% |
We went from losing money to making good profits.
Trade Statistics
Our final test ran 171 trades:
| Exit Type | Trades | Percentage | Average |
|---|---|---|---|
| Trailing stop (winners) | 114 | 66.7% | +1.13% |
| Stopped out (losers) | 57 | 33.3% | -0.81% |
| Category | Count | Average |
|---|---|---|
| Winners | 105 | +1.23% |
| Losers | 66 | -0.71% |
Lessons Learned
Here is what we learned from this optimization:
1. Tighter stops work better
We thought wide stops would give trades room to work. But in reality, wide stops just meant bigger losses. Tighter stops cut losses early.
2. Not all time periods are equal
Weekly and monthly charts were disasters for our system. Looking at data by time period showed us what to avoid.
3. Lock in profits early
Waiting too long to trail profits meant we gave back gains. Earlier trailing keeps more of what you earn.
4. Simple features can hurt you
The breakeven stop sounded like a good idea. But when you include trading costs, it was actually harmful. Always test features with real costs included.
5. Test many versions
We tested 15 versions before finding the right settings. Version 6 was worse than version 1. Version 7 was our first profit. Version 15 was our breakthrough. Do not stop after one or two tests.
Configuration Summary
Here are our final optimized settings:
| Parameter | Value |
|---|---|
| ATR Multiplier (normal) | 0.6 |
| ATR Multiplier (high volatility) | 0.85 |
| ATR Multiplier (low volatility) | 0.5 |
| Trailing trigger | 0.7R profit |
| Trail distance | 0.4R |
| Breakeven stop | Disabled |
| Min confidence | 50 |
| Blocked time periods | 1w, 1M, 2M, 3M, 6M, 1Y |
| Blocked symbols | META |
What Comes Next
We have achieved our first goal: Profit Factor > 1.2. Actually, we beat it by a lot (2.77).
Our next steps are:
- Walk-Forward Test - Test on completely new data
- Paper Trading - Trade with fake money in real time
- Real Trading - If paper trading works, try real money
The system is now ready for the next stage of testing.
Final Thoughts
Going from Profit Factor 0.94 to 2.77 was not easy. It took 15 versions and many hours of testing. But we learned something important: small changes can make big differences.
The biggest improvement came from one change: tighter stop losses. Cutting the ATR multiplier from 2.0 to 0.6 reduced our average loss from -253% to -0.81%. That single change transformed our system.
If your trading system is not working, look at your stop losses first. You might be surprised what you find.
Learn more about the platform: AI Trading Platform
Building a profitable trading system requires patience and systematic testing. The numbers do not lie—but you have to look at the right numbers.
Important: This is an experimental project. Past results do not guarantee future profits. Never invest money you cannot afford to lose.