Machine Learning, Neural Networks, Q-Learning, Kelly Criterion

Explore an autonomous AI trading bot using machine learning, neural networks, and Q-learning for gold trading on a 30-minute timeframe. Learn about its cognitiv

Published · Updated · Methodology: Mixed

Part of: AI-Assisted Trading

  • Methodology: Mixed
  • Content type: both
  • Timeframes: 30 minutes (for Gold backtesting example)
  • Markets: Gold (for backtesting example)

Indicators used

  • Regime Detector
  • Trend Intelligence Node
  • Anomaly Guardian
  • Random Forest
  • LSTM Network
  • IA Signal Filter Node
  • Adaptive Strategy Selector
  • Traffic Light (Smart Router)
  • Democracy (Voter)
  • Headhunter (Strategy Selector)
  • Q-Table

Source video

Decoded from: Agente de Trading con Machine Learning que Aprende Solo: Tutorial Completo 2026 by Ignacio Ayago | Trading con Bots — watch the original

Key timestamps:

  • 0:00 - Intro
  • 1:33 - Roadmap
  • 2:42 - Tier 1: The Analysts (Market Regime Detection)
  • 4:28 - Tier 2: Intuition (Machine Learning Models)
  • 5:28 - Tier 3: Filters and Quality Control
  • 6:26 - Tier 4: Orchestration and Decision Making
  • 10:03 - Building AI Bot Prototype
  • 15:34 - Backtesting MetaTrader
  • 25:26 - Tier 5: Intelligent Risk Management (Kelly Criterion)
  • 26:55 - AI Memory: Q-Table and Portability
  • 29:48 - Common Errors

Strategy overview

AI-assisted trading applies machine learning models to the decision itself — letting an algorithm classify conditions and filter or generate signals instead of hard-coding every rule by hand. What separates this entry is its ambition: it is decoded from Ignacio Ayago's Spanish-language tutorial "Agente de Trading con Machine Learning que Aprende Solo", which builds not a setup but an agent — a system meant to keep adjusting from its own trade history through Q-learning, with a memory table of past state-action outcomes, rather than staying frozen at whatever its backtest produced.

The video is organised as a roadmap through four tiers, and that layering is the real subject. Tier one is analysis: regime detection, deciding what kind of market is in front of the system before anything else fires. Tier two is what the creator calls intuition — the machine learning core, mixing tree ensembles with an LSTM so that both cross-sectional pattern recognition and price memory are represented. Tier three is quality control: filters whose job is to veto, blocking trades when volatility or signal confidence fall outside acceptable bounds. Tier four is orchestration, where a router, a voting mechanism and a selector decide which sub-strategy gets capital at a given moment, with the Kelly criterion informing how much. Gold on the 30-minute chart serves as the demonstration ground.

It is worth being clear about what this kind of build is and is not. An architecture like this has no single entry trigger to copy; it is an engineering project, and every tier adds parameters, training data requirements and failure modes of its own. Reinforcement learning in particular needs a large number of trades before its accumulated memory means anything, and Kelly sizing is famously sensitive to errors in the estimates it is fed. This page summarises the structure as presented in the source tutorial — the video itself is a build-along, and following it end to end is where the implementation detail lives.

Topics

ai trading bot · machine learning trading · q-learning strategy · neural networks trading · kelly criterion · algorithmic trading · gold trading strategy · 30 minute strategy · autonomous trading · trading strategy · pine script strategy · tradingview strategy · risk management strategy · quantitative trading

Frequently asked questions

What is a self-learning trading agent?

It is a system that updates its own decision-making from the results of its past trades rather than running a fixed rule set. In this tutorial that is done with Q-learning, which stores state-action outcomes in a memory table so the agent gradually favours the actions that worked in similar conditions.

What are the four tiers in this machine learning trading architecture?

The video structures the build as: market regime detection (identifying what kind of market it is), the machine learning core (models such as a random forest ensemble and an LSTM network), filters and quality control (conditions that can veto a trade), and orchestration (routing, voting and selecting which sub-strategy is active).

Why does the Kelly criterion appear in a machine learning trading system?

Kelly is a position-sizing formula that scales exposure to the estimated edge of a bet. In a multi-strategy agent it is a natural fit for the capital allocation layer, though it depends entirely on the quality of the probability estimates behind it — poor estimates produce oversized positions.

Is this a strategy I can trade directly, or a framework?

It is closer to a framework. There is no single entry signal to replicate; the tutorial walks through building an infrastructure that decides when and how to trade. Strategy Decoder catalogues strategies extracted from video sources like this one so you can see the structure before committing time to a build.

About this strategy page

This trading strategy was decoded by Strategy Decoder's AI from a public YouTube trading video and turned into a structured, reviewable specification. In the interactive app this page shows the full entry and exit logic, risk management settings, the indicators involved with their parameters, AlgoWizard-compatible logic and a Pine Script export ready for TradingView backtesting — plus an automated backtest verdict when one has been computed for this strategy.

Strategy Decoder catalogs 2,229 decoded strategies. Each one is extracted with confidence scoring, cross-linked to the indicators it uses, and kept up to date as new videos are processed daily. Load this page with JavaScript enabled to use the interactive tools, or start from the strategy explorer to filter by methodology, market and timeframe.

Other versions of this strategy

More decoded strategies