Summary and Next Steps

Overview

By this point in the MQL5 Learning Roadmap, you have walked through the entire basic workflow of algorithmic trading in MetaTrader 5. You started with simple scripts, learned how to use Print() and logs for debugging, explored indicators and their values, created basic Expert Advisors, and ran them in the Strategy Tester with configurable parameters. This section summarizes what you have learned and suggests clear next steps for deepening your skills and building real trading systems.

Ad

What You Will Be Able to Do

  • See how each previous section connects into one complete development workflow.
  • Identify which areas you should review or practice again (scripts, indicators, EAs, testing, or parameters).
  • Plan your own small MQL5 project as the next milestone.
  • Understand how this roadmap relates to more advanced topics and the printed book.

Code Example

The following simplified example shows how many concepts from earlier sections come together in one Expert Advisor. It uses input parameters, reads indicator values, and writes messages to the log inside OnTick().


//+------------------------------------------------------------------+
//|                                              RoadmapSummaryEA.mq5 |
//+------------------------------------------------------------------+
#property version   "1.00"
#property strict

// Parameters (from "Working with Parameters")
input double Lots      = 0.10;
input int    MaPeriod  = 20;

// Handle for a Moving Average indicator (from "What Are Indicators" and
// "Reading Indicator Values")
int ma_handle = INVALID_HANDLE;

// Called at EA initialization
int OnInit()
  {
   Print("RoadmapSummaryEA initialized on ", _Symbol);

   ma_handle = iMA(_Symbol, PERIOD_CURRENT, MaPeriod, 0, MODE_SMA, PRICE_CLOSE);
   if(ma_handle == INVALID_HANDLE)
     {
      Print("Failed to create MA handle.");
      return(INIT_FAILED);
     }

   return(INIT_SUCCEEDED);
  }

// Called on every tick (from "The OnTick Function")
void OnTick()
  {
   // Read the latest MA value (from "Reading Indicator Values")
   double ma_value[];
   if(CopyBuffer(ma_handle, 0, 0, 1, ma_value) != 1)
     {
      Print("Could not read MA buffer.");
      return;
     }

   double bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);

   // Debug output (from "Understanding Print" and "Reading the Log")
   Print("Bid = ", DoubleToString(bid, _Digits),
         ", MA(", MaPeriod, ") = ", DoubleToString(ma_value[0], _Digits));

   // Here you would normally add trading logic (from "What Is an Expert Advisor"
   // and "Before Using OrderSend")
  }

// Called when EA is removed
void OnDeinit(const int reason)
  {
   Print("RoadmapSummaryEA deinitialized.");
   if(ma_handle != INVALID_HANDLE)
      IndicatorRelease(ma_handle);
  }
Ad

Execution Steps

  1. Create a new Expert Advisor in MetaEditor named RoadmapSummaryEA.
  2. Paste the example code above and compile it with F7.
  3. Attach the EA to a chart in MetaTrader 5 and open the Experts tab.
  4. Watch how the EA logs the current Bid price and Moving Average value on each tick.
  5. Experiment with changing the Lots and MaPeriod input parameters, and re-run tests in the Strategy Tester.
  6. As a next step, extend the logic by adding simple entry/exit rules and order checks before sending real trades.

Key Point

All the topics you studied—scripts, indicators, Expert Advisors, OnTick(), parameters, and logs—are building blocks of one continuous workflow. By combining them, you can design, test, and refine complete automated trading strategies in MQL5.

Ad

Next Section

→ Next: About the Printed Book
In the next section, you will learn how the printed book complements this roadmap and where to go next for more detailed examples and advanced topics.