Investing & Trading


Lazy Trading Part 2: Set up your Trading Strategy Robot

Learn how Trading Robot Template is working and how to modify it to work with Decision Support System

4.25 (34 reviews)


3.5 hours


Jun 2021

Last Update
Regular Price

What you will learn

Using Automated Trading System in MQL4

Develop methodology to test and analyse Trading Strategy

Using version control to manage complex projects

Learn to set up Automated Decision Support Systems using R Statistical Software

Learn how to adapt Trading System Robot to specific Market Type

Replicate Decision Support System concept on other areas rather than Trading


About this Course: Set up your Trading Strategy Robot

The second part of this series will cover setting up our Expert Advisor or Trading Robot. At the end of this course we will have complete and ready to be used Algorithmic Trading System integrated with our Decision Support System:

  • Programming environment

  • Setting up Version Control Project

  • Overview of robot functions

  • How to customize to target market inefficiency

  • Integrate robot with Decision Support System (start/stop trading system from external commands)

  • Customize and record trades results

  • Rolling Optimization, automatic robot backtest

The same robot template will be used in other courses of the Lazy Trading Series

About the Lazy Trading Courses:

This series of courses is designed to to combine fascinating experience of Algorithmic Trading and at the same time to learn Computer and Data Science! Particular focus is made on building foundation of Decision Support System that can help to automate a lot of boring processes related to Trading.

This project is containing several short courses focused to help you managing your Automated Trading Systems:

  1. Set up your Home Trading Environment

  2. Set up your Trading Strategy Robot

  3. Set up your automated Trading Journal

  4. Statistical Automated Trading Control

  5. Reading News and Sentiment Analysis

  6. Using Artificial Intelligence to detect market status

  7. Building an AI trading system

Update: dedicated R package 'lazytrade' was created to facilitate code sharing among different courses

IMPORTANT: all courses will be short focusing to one specific topic. You will not get lost in various sections and deep theoretical explanations. These courses will help you to focus on developing strategies by automating boring but important processes for a trader.

What will you learn apart of trading:

While completing these courses you will learn much more rather than just trading by using provided examples:

  • Learn and practice to use Decision Support System

  • Be organized and systematic using Version Control and Automated Statistical Analysis

  • Learn using R to read, manipulate data and perform Machine Learning including Deep Learning

  • Learn and practice Data Visualization

  • Learn sentiment analysis and web scrapping

  • Learn Shiny to deploy any data project in hours

  • Get productivity hacks

  • Learn to automate your tasks and scheduling them

  • Get expandable examples of MQL4 and R code

What these courses are not:

  • These courses will not teach and explain specific programming concepts in details

  • These courses are not meant to teach basics of Data Science or Trading

  • There is no guarantee on bug free programming


Trading is a risk. This course must not be intended as a financial advice or service. Past results are not guaranteed for the future.


Lazy Trading Part 2: Set up your Trading Strategy Robot
Lazy Trading Part 2: Set up your Trading Strategy Robot
Lazy Trading Part 2: Set up your Trading Strategy Robot
Lazy Trading Part 2: Set up your Trading Strategy Robot



Specific Goals for this Course


Programming Environment

Getting to know our Programming Environment MQL4 Editor

Robot main structure

Types of Algorading systems: Rule, Model, Hybrid based

Adapting Robot Template

Get the code

Our Robot Template

Logging trading results to file

Reading commands from Decision Support System

How to understand and modify this robot?

Adding option to close all positions on Friday evening

Adding option to close all positions on Friday evening - video

Practical Activity

Optional challenge: Modify this bot

Deploy to learn!

Results and preview for Next Course!

Using MetaTrader Terminal Profiles to manage different setups

Keeping MT Terminals Profiles under Version Control

How to evaluate Trading [Strategy] Robot?

Goals of this Section

FALCON_D - simple trading robot

Why Periodic Optimization?

Optimization Method P1. Settings overview

Optimization Method P2. Collecting data during Trades Simulation

Analyse simulated trades

Evaluation of results

Activity to practice

Automatic 'Backtest' in MT4

Goal of this Section

Prepare configuration files


Conclusion for Part 2

Summary of this course



Florian29 August 2020

Instructor very active and helpful. Thanks a lot Vladimir. This course don't focus to you to copy a script but to understand it, which is very good to avoid a waste of time. The part " how to evaluate the strategy" is easy to implement using the R script given by the instructor, but yet I still have difficulty to understand the logic and use the report ( I need to review it again). Very satisfy of the course!!

Jose27 August 2020

Lo explica bien, y va directo a los conceptos que importan, es decir, te enseña LO QUE REALMENTE necesitas saber para "poner tu robot en marcha"... en ese sentido el curso esta bien, te enseña como podrias generarte tu propio robor de trading [suponiendo que se te ocurra-obtengas de por ahi alguna idea para la estrategia y "te mires tu por tu cuenta" el lenguaje de programación de MetaTrader4, al menos, el minimo imprescindible para gestionar indicadores tipo el RSI, el MACD,.., así como programarte señales tipo el precio de cierre de la vela ha cruzado a la media movil,...con lo cual, si por lo menos NO sabes programar en algun lenguaje, lo vas a tener bastante cuesta arriba.... yo, como hace muchos años que aprendi a programar, no es problema, pero no todo el mundo va a estar en mi caso]. Sin embargo, y a la vista de las expectativas que tenia, creo que se queda un poco corto... p. ej. el método para pasar la información desde el robot al sistema de soporte a la decisión, al ser vía fichero, es poco (más bien nada) interactivo, lo que hace que SOLO sirva para estrategias en time-frames elevados (si tienes p. ej. que andar re-optimizando una estrategia digamos sobre time frame de 1 minuto en tiempo real-casi real, al hacerlo así NO puedes, sino que p. ej y "como mucho" podrias hacerlo quizas una vez al día)... y claro, en esos time-frames tan pequeños, las condiciones de trading pueden cambiar bastante rapido, y encontrarte con que el robot está desincronizado con el mercado visto y no visto...hubiese estado bien algo más interactivo al respecto.... admás la parte de evaluación de los resultados tras la optimización (que es lo verdaderamente más interesante de todo) también se quedo "muy flojita", ya que lo soluciona con apenas dos gráficas, una con los beneficios totales acumulados de la ejecución en TODOS los activos juntos, y otra con lo mismo pero agrupado por activo y otra tabla con lo mismo pero agrupado por activo y tipo de orden: compra-venta,...). Quizás en cursos posteriores entre más en esa materia, pero lo dicho, esa parte en mi opinión se queda realmente muy, muy muy en los mínimos de lo mínimo.

Gordon10 February 2020

Great course to follow on from part one. It is a unique method of teaching that you present with this material, it is like looking over the shoulder of a tradesman at work. These lectures give an opportunity to follow the systematic approach on how to set up such a system to test and record trading strategies and data automatically. The potential of such a set up is enormous. I think you have been a very busy trader to devise this system and " lazy trader " is far from the truth. As feed back to your style of teaching I would say that you have shown all the components that go to make your system as a finished article but missed the opportunity to show in depth some of those components. As a student with limited experience of programming I would have welcomed one or two detailed looks at some of the functions coding. Getting an overview of how the coding achieves the strategy being implemented. Particularly the special functions that you added, their overall reason and implementation. This would for me be very enlightening. I think it is very important and valuable for a student to walk the thought process with the tutor in order to learn how to think and what to think. This said I gained a great deal out of this course. I am in for the follow on and hope to implement this content into my own efforts to achieve " Lazy Trader " status. HA! Many Thanks for sharing all this.

Jan8 November 2019

existing courses about setup of trading environment better. MQL4 EA copied from Lukas Liew "Black Algo Trading". I had this course already.

Eric10 April 2019

Lazy Trading part2 was interesting in its ability to help setting a trading environment. It even went on to provide clarity on version control from part one. I dont have questions here and am looking forward to move on and see what part 3 has to offer.

Roland20 October 2018

one good and modular trading robot template is probably better than hundreds of different pieces of code. ability to store results of trades and start stop robots is awesome


Udemy ID


Course created date


Course Indexed date
Course Submitted by