Write AI and MQL, and list 12 mistakes where AI went wrong
12 mistakes AI's mistakes listed | 1 mistake Found by a compilation error | 11 mistakes Compilation passed |
I am lab.aiueo, creating MT4/MT5 indicators and selling them on GogoJungle.
I have written embedded C for almost 20 years. The current indicator is being written with AI (Claude Code) together.
In development notes, the places where AI went wrong and the rules decided afterward remain. Today, I’ll list 12 items that later proved effective.
First, what I learned from listing them.
The remaining 11 seemed to compile and run, though they were wrong.
The heaviest one
1. A line in the validation script looked at future bars
- Symptom: In the validation of Gold's signal tool GD-Signal, win rate 87% and PF 2.21 appeared. Included on product page and article
- Cause: When rewriting MQL4 logic into Python, one line that decides stop loss forgot to reverse the direction of the bar sequence. The stop loss was placed under “the next six lows”
- How found: Running another signal tool as an EA in MT4 tester yielded only 52% win rate, not matching Python numbers
- Current rule: Do not trust numbers until the same value appears on real MT4 hardware. Verify that you are not looking at future bars, separate from review, one line at a time
This line remained even after the AI-written code passed through full-line reviews. GD-Signal was discontinued. No actual harm since there were no buyers.
Numbers were wrong
2. They evaluated past signals using current market conditions
- Symptom: In MT5 version of SMC-Signal, only sell arrows appeared on past charts
- Cause: When redrawing past bars, counted the direction of the higher timeframe at the moment the chart was loaded
- How found: A buyer contacted me
- Current rule: When redrawing past data, count everything using the information at that bar’s time
3. Lot truncation was always one step smaller
- Symptom: In RM-LOT, the calculation should have produced 1.43 lots but came out as 1.42
- Cause: 1.43 ÷ 0.01 equals 142.999… in computers. Truncating yields 142
- How found: Manually verifying numbers one by one on a demo account
- Current rule: Add a tiny number (0.00000001) before truncation. Do the math by hand
Damaged a file
4. Saving changed the character encoding
- Symptom: MT4 source saved from Shift-JIS to UTF-8
- Cause: AI’s editing tools rewrote Shift-JIS files in UTF-8
- How found: Noticed the change and restored from the last Shift-JIS version in git
- Current rule: Read MT4 sources in Python as Shift-JIS and write back as Shift-JIS
5. Replacements caused backslash to halve
- Symptom: In MQL strings, "\\" became "\" and "\r\n" became a real newline
- Cause: Among the commands AI typed, the backslash was parsed one level before being passed to Python
- How found: Compilation error. Of the 12 items, this was the only one with an error
- Current rule: Write scripts to files before executing replacements that include backslashes
6. Validation script left in a temporary folder
- Symptom: Win rate and PF numbers remained in notes, the script that produced them was in a temp folder
- Cause: AI writes disposable scripts to a temporary folder
- How found: In the first item, when I looked for the original script that produced the numbers, it was fading
- Current rule: Any script that outputs numbers must be in the repository. Do not leave numbers only in notes
Wrong screen
7. Placing the panel at the bottom of the screen caused a thin band
- Symptom: When placing SMC-Signal information panel at bottom-left corner, the background appeared as a thin band
- Cause: In MT4, bottom-corner-based placement does not work with a background square as expected
- How found: By looking at the chart; I’ve pointed this out many times
- Current rule: Place panels using the top-left as the reference and compute position from the chart’s width and height
8. Uninstalled indicator left arrows and panel behind
- Symptom: After removing the indicator from the chart, arrows, dots, and panel remained
- Cause: A delete function intended to retain things while running was also used at termination
- How found: Noticed while looking at the chart
- Current rule: Separate deletion functions for during operation and at termination
9. Before listing, panel text overflowed
- Symptom: In GD-Deck, two optional lines were off and overflowed the panel frame; subtle text color also difficult against the background
- Cause: Didn’t measure text width and color density by eye on screen
- How found: My note that gray text was hard to read prompted me to recalculate all lines
- Current rule: Measure text width with actual font and adjust color contrast before displaying
10. The panel appeared at bottom-left on MT5 as bottom-right
- Symptom: In MT5 version of SMC-Compass, selecting bottom-left caused panel to appear bottom-right
- Cause: The corner numbers for MT4 and MT5 differ; passed numbers as-is
- How found: By looking at the chart
- Current rule: Pass corner by named constants, not raw numbers
Wrote with assumptions
11. “MT4 cannot be built from command line” was written in the manual
- Symptom: MT4 indicators were compiled by opening MetaEditor each time
- Cause: The manual AI created said MT4 cannot be built from commands
- How found: When creating RM-LOT, tried the same method as MT5 and it worked
- Current rule: Test before writing that something cannot be done
12. Listing one extra scoring element in the listing text
- Symptom: In the SMC-Compass MT5 listing form and affiliate description, it stated “scored with 6 elements including BOS/CHoCH”
- Cause: Scoring has 5 elements. BOS/CHoCH are used only as a foundation for scoring
- How found: AI noticed and corrected during listing material creation
- Current rule: Align function descriptions with the manual, product page, and numeric levels
What listing together revealed
- Passing compilation does not prove correctness. Of the 12, 11 compiled
- Found items by considering chart appearance, buyers, manual number verification, and numbers produced by other methods
- AI mistakes appear in non-error form. Therefore, decide how to verify first
Array orientation, character encoding, and decimal rounding—all are not unique AI mistakes. Humans have made these mistakes for ages, and AI does them in the same ways.
What’s different is that AI writes much faster. If the verifier can’t keep up, mistakes accumulate quickly.
This article is my personal development log. It does not endorse or deny any specific AI service or tool. Investment decisions are your own responsibility.
Thank you for reading to the end.