{"id":22437,"date":"2026-11-13T10:49:03","date_gmt":"2026-11-13T07:49:03","guid":{"rendered":"https:\/\/roboforex.com\/blog\/?p=22437"},"modified":"2026-11-13T10:49:06","modified_gmt":"2026-11-13T07:49:06","slug":"automated-trading-strategies","status":"publish","type":"post","link":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/","title":{"rendered":"Automated Trading Strategies: How to Turn Your Idea Into Rules a Robot Can Execute"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<html><body><div class=\"ats-wrap\">\n<div class=\"ats\">\n\n  <p>Automated trading strategies are sets of exact rules that an <a href=\"https:\/\/roboforex.com\/beginners\/info\/expert-advisors\/\" data-internallinksmanager029f6b8e52c=\"21\" title=\"expert advisors\">Expert Advisor<\/a> (EA), a trading robot in <a href=\"https:\/\/roboforex.com\/forex-trading\/platforms\/metatrader5-mt5\/\" data-internallinksmanager029f6b8e52c=\"8\" title=\"metatrader 5\">MetaTrader 5<\/a>, follows to open, manage and close trades without manual input. This guide shows which strategy types are easiest to automate and how to write your own idea as five blocks of rules, ready to hand to a developer or ChatGPT.<\/p>\n\n  <div class=\"ats-tldr\">\n    <div class=\"ats-tldr-label\">TL;DR<\/div>\n    <ol>\n      <li>Systems with clear <a href=\"https:\/\/roboforex.com\/blog\/education\/signals-on-forex-where-to-search-how-to-find-filter-and-create\/\" data-internallinksmanager029f6b8e52c=\"101\" title=\"Signals\">signals<\/a> from standard MT5 <a href=\"https:\/\/roboforex.com\/blog\/education\/top-10-forex-indicators-that-every-trader-needs\/\" data-internallinksmanager029f6b8e52c=\"99\" title=\"Indicators\">indicators<\/a>, such as moving averages and <a href=\"https:\/\/roboforex.com\/blog\/education\/bollinger-bands-indicator-description\/\" data-internallinksmanager029f6b8e52c=\"62\" title=\"Bollinger Bands\">Bollinger Bands<\/a>, are the easiest to automate.<\/li>\n      <li>A robot needs five blocks of rules: entry, exit, <a href=\"https:\/\/roboforex.com\/blog\/education\/what-is-stop-loss-and-take-profit\/\" data-internallinksmanager029f6b8e52c=\"228\" title=\"Stop Loss\">stop loss<\/a>, trading filters and position size, each written with numbers.<\/li>\n      <li>The rules template below turns your idea into a brief for a programmer or a prompt for ChatGPT.<\/li>\n    <\/ol>\n  <\/div>\n\n  <h2><span class=\"ez-toc-section\" id=\"What_Is_an_Automated_Trading_Strategy\"><\/span>What Is an Automated Trading Strategy?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n  <p>An automated <a href=\"https:\/\/roboforex.com\/blog\/education\/7-trading-strategies-for-beginners-and-advanced\/\" data-internallinksmanager029f6b8e52c=\"141\" title=\"Trading Strategy\">trading strategy<\/a> is a step-by-step algorithm that opens, manages and closes trades by itself when preset conditions are met. The program has no opinion, intuition or feel for the chart. It runs only the logic it was given, and each change in price or in an indicator triggers one defined action.<\/p>\n  <p>A manual trader can miss a signal through tiredness, doubt or emotion. A robot follows its rules whenever the market is open, as long as the terminal keeps running on your computer or on a <a href=\"https:\/\/roboforex.com\/clients\/services\/forex-vps\/\" data-internallinksmanager029f6b8e52c=\"14\" title=\"vps for forex\">VPS<\/a>. The price of that discipline is precision at the start: every rule has to be written out in full before the robot can use it. If even one condition is vague, the EA cannot make a decision or opens trades you never intended.<\/p>\n\n  <h2><span class=\"ez-toc-section\" id=\"Which_Trading_Strategies_Can_You_Automate\"><\/span>Which Trading Strategies Can You Automate?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n  <p>Strategies whose entries and exits come from formulas, indicator readings or fixed price levels are the easiest to automate. Approaches built on a subjective reading of chart <a href=\"https:\/\/roboforex.com\/blog\/education\/trading-chart-patterns\/\" data-internallinksmanager029f6b8e52c=\"60\" title=\"Patterns\">patterns<\/a> are the hardest to put into code. Three types cover most first robots. For manual systems to compare them with, see <a href=\"https:\/\/roboforex.com\/blog\/education\/7-trading-strategies-for-beginners-and-advanced\/\">7 Effective Trading Strategies for Beginners and Advanced<\/a>.<\/p>\n\n  <h3>Trend Following<\/h3>\n  <p>Trend strategies identify a directional price move and enter in the direction of that move. The classic automated example is a crossover of two exponential moving averages (EMA) with different periods, such as EMA 50 and EMA 200. When the shorter-period line crosses the longer-period line from below, the EA opens a buy. On the opposite crossover it closes the position or opens a sell. This approach translates into code easily because every signal comes from indicator values.<\/p>\n\n  <figure class=\"wp-block-image size-large\"><a href=\"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/Automated_Trading_Strategies_pic1.png\"><img height=\"1572\" loading=\"lazy\" width=\"2358\" decoding=\"async\" src=\"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/Automated_Trading_Strategies_pic1.png\" alt=\"USDCAD H1 chart in MetaTrader 5 with a fast moving average in blue crossing above a slow moving average in red before a steady rise\"><\/a><figcaption class=\"wp-element-caption\">Trend following on USD\/CAD H1: the fast <a href=\"https:\/\/roboforex.com\/blog\/education\/what-is-a-moving-average\/\" data-internallinksmanager029f6b8e52c=\"68\" title=\"Moving Average\">moving average<\/a> (blue) crosses above the slow one (red), the moment a crossover EA reads as a buy signal. Source: MetaTrader 5.<\/figcaption><\/figure>\n\n  <h3>Mean Reversion<\/h3>\n  <p><a href=\"https:\/\/roboforex.com\/blog\/education\/how-to-use-mean-reversion-indicator-settings-and-trading\/\" data-internallinksmanager029f6b8e52c=\"136\" title=\"Mean Reversion\">Mean reversion<\/a> strategies assume that after a strong deviation the price may return to its average. Bollinger Bands are a common way to find these moments. If a candle closes above the upper band and a later candle closes back inside the bands, the algorithm can open a short position and close it when the price reaches the middle line of the indicator. The buy signal is the mirror image: a close below the lower band, then a later close back inside, a long position and an exit at the middle line. In a strong trend the price can stay outside a band for many candles, so a trend filter often sits next to this rule. More on the approach is in <a href=\"https:\/\/roboforex.com\/blog\/education\/creating-a-trading-strategies-based-on-the-mean-reversion-and-momentum\/\">Creating Trading Strategies Based on Mean-Reversion and Momentum<\/a>.<\/p>\n\n  <figure class=\"wp-block-image size-large\"><a href=\"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/Automated_Trading_Strategies_pic2.png\"><img height=\"1567\" loading=\"lazy\" width=\"2360\" decoding=\"async\" src=\"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/Automated_Trading_Strategies_pic2.png\" alt=\"EURUSD H4 chart in MetaTrader 5 with Bollinger Bands drawn around the price and candles touching the upper and lower bands\"><\/a><figcaption class=\"wp-element-caption\">Bollinger Bands on <a href=\"https:\/\/roboforex.com\/beginners\/info\/charts\/forex\/eurusd\/\" data-internallinksmanager029f6b8e52c=\"35\" title=\"EUR\/USD\">EUR\/USD<\/a> H4. A mean reversion EA waits for a close outside a band and a later close back inside it. Source: MetaTrader 5.<\/figcaption><\/figure>\n\n  <h3>Breakout<\/h3>\n  <p>Breakout strategies look for the price leaving a narrow range after a period of low volatility. For example, the EA marks the range by the highest high and the lowest low of the last 20 candles. If the range is no wider than 40 pips, the EA treats it as narrow. When a new candle closes above the upper boundary, the EA opens a long position. A close below the lower boundary opens a short one.<\/p>\n\n  <figure class=\"wp-block-image size-large\"><a href=\"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/Automated_Trading_Strategies_pic3.png\"><img height=\"1565\" loading=\"lazy\" width=\"2352\" decoding=\"async\" src=\"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/Automated_Trading_Strategies_pic3.png\" alt=\"EURUSD H1 chart in MetaTrader 5 with a shaded box marking a narrow sideways range after a sharp decline\"><\/a><figcaption class=\"wp-element-caption\">A narrow range on EUR\/USD H1 after a decline. A breakout EA opens a trade only when a candle closes above or below the box. Source: MetaTrader 5.<\/figcaption><\/figure>\n\n  <div class=\"ats-table-wrap ats-table-wide\">\n    <table class=\"rf\">\n      <thead><tr><th>Strategy type<\/th><th>Entry rule in one line<\/th><th>Market conditions<\/th><th>How easy to automate<\/th><\/tr><\/thead>\n      <tbody>\n        <tr><td data-label=\"Strategy type\"><strong>Trend following<\/strong><\/td><td data-label=\"Entry rule in one line\">The shorter moving average crosses the longer one from below<\/td><td data-label=\"Market conditions\">A market with a clear direction<\/td><td data-label=\"How easy to automate\">Easy, built on standard indicators<\/td><\/tr>\n        <tr><td data-label=\"Strategy type\"><strong>Mean reversion<\/strong><\/td><td data-label=\"Entry rule in one line\">A candle closes outside the Bollinger Bands, a later candle closes back inside<\/td><td data-label=\"Market conditions\">A sideways market with no strong direction<\/td><td data-label=\"How easy to automate\">Easy, uses clear numeric boundaries<\/td><\/tr>\n        <tr><td data-label=\"Strategy type\"><strong>Breakout<\/strong><\/td><td data-label=\"Entry rule in one line\">After a narrow 20-candle range, a candle closes above its top or below its bottom<\/td><td data-label=\"Market conditions\">The end of a quiet period and a possible strong move<\/td><td data-label=\"How easy to automate\">Medium, needs an exact calculation of the range width and boundaries<\/td><\/tr>\n      <\/tbody>\n    <\/table>\n  <\/div>\n\n  <p>Arbitrage and high-frequency trading are automated too, though they depend on execution speed and direct market access that a private trader does not have, so this guide stays with the three types above.<\/p>\n\n  <h2><span class=\"ez-toc-section\" id=\"Which_Rules_Does_a_Robot_Need_to_Execute_Your_Strategy\"><\/span>Which Rules Does a Robot Need to Execute Your Strategy?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n  <p>A robot needs five blocks of rules: entry, exit, stop loss, trading filters and position size. Vague conditions such as \"a strong trend\" or \"a small stop\" cannot be translated into code. Each rule needs exact parameters: price levels, indicator periods, position size and the moment the signal is checked, for example after a candle closes.<\/p>\n  <ul>\n    <li><strong>Entry rule.<\/strong> The exact condition for opening a long or short position, with the timeframe and the moment the signal is checked.<\/li>\n    <li><strong>Exit rule.<\/strong> The condition for closing the position: a target level, an opposite indicator signal or a set time.<\/li>\n    <li><strong>Stop loss.<\/strong> The price level at which the position closes to limit the loss, set in pips from the entry price or as a fixed price.<\/li>\n    <li><strong>Trading filters.<\/strong> Conditions under which no new trades open: trading hours, a maximum spread between the buy and sell price, or the direction of the long-term trend.<\/li>\n    <li><strong>Position size.<\/strong> A fixed volume, or a volume calculated from the share of the account you accept to risk on one trade.<\/li>\n  <\/ul>\n  <p>The wider process of designing a system around these blocks is in <a href=\"https:\/\/roboforex.com\/blog\/education\/how-to-create-your-own-trading-strategy\/\">How to Create Your Own Trading System<\/a>.<\/p>\n\n  <h3>How to Turn Words Into Numbers for a Robot<\/h3>\n  <div class=\"ats-table-wrap ats-table-wide\">\n    <table class=\"rf\">\n      <thead><tr><th>Block<\/th><th>In words<\/th><th>With exact conditions<\/th><\/tr><\/thead>\n      <tbody>\n        <tr><td data-label=\"Block\"><strong>Entry<\/strong><\/td><td data-label=\"In words\">Buy when a confident uptrend begins<\/td><td data-label=\"With exact conditions\">Open a long position when EMA 50 crosses above EMA 200. Check the signal after the candle closes on the one-hour chart.<\/td><\/tr>\n        <tr><td data-label=\"Block\"><strong>Exit<\/strong><\/td><td data-label=\"In words\">Close the trade when the profit is enough or the move weakens<\/td><td data-label=\"With exact conditions\">Close the position at 60 pips of profit or after EMA 50 crosses back below EMA 200 on the one-hour chart.<\/td><\/tr>\n        <tr><td data-label=\"Block\"><strong>Stop loss<\/strong><\/td><td data-label=\"In words\">Place it at a safe distance from the price<\/td><td data-label=\"With exact conditions\">For a long position, set the stop loss 30 pips below the entry price. For a short position, 30 pips above it.<\/td><\/tr>\n        <tr><td data-label=\"Block\"><strong>Filter<\/strong><\/td><td data-label=\"In words\">Do not trade at night<\/td><td data-label=\"With exact conditions\">Open trades from 09:00 to 20:00 in the time zone of the trading platform.<\/td><\/tr>\n        <tr><td data-label=\"Block\"><strong>Position size<\/strong><\/td><td data-label=\"In words\">Use a small volume to limit risk<\/td><td data-label=\"With exact conditions\">Size the position so that a stop-loss hit loses no more than 1% of the current account balance.<\/td><\/tr>\n      <\/tbody>\n    <\/table>\n  <\/div>\n\n  <div class=\"ats-promo\">\n    <div>\n      <div class=\"ats-promo-title\">Test Your Rules on a Free Demo Account<\/div>\n      <div class=\"ats-promo-sub\">Open a RoboForex demo account and run your first robot with virtual money.<\/div>\n    <\/div>\n    <div class=\"ats-promo-actions\">\n      <a class=\"ats-promo-btn\" href=\"https:\/\/my.roboforex.com\/en\/register\/\" target=\"_blank\" rel=\"nofollow\">Open a Demo Account<\/a>\n    <\/div>\n  <\/div>\n\n  <h2><span class=\"ez-toc-section\" id=\"How_to_Turn_a_Strategy_Into_Rules_A_Worked_Example\"><\/span>How to Turn a Strategy Into Rules: A Worked Example<span class=\"ez-toc-section-end\"><\/span><\/h2>\n  <p>Take a simple trend strategy on EUR\/USD with the one-hour chart. The example shows how a trading idea becomes a sequence of rules. It is educational only and carries no trading recommendation.<\/p>\n  <ol>\n    <li><strong>Entry rule.<\/strong> After each H1 candle closes, the EA checks EMA 50 and EMA 200. If EMA 50 crosses above EMA 200, the EA opens a long position as the next candle starts. If EMA 50 crosses below EMA 200, it opens a short position. Only one position can be open at a time.<\/li>\n    <li><strong>Exit rule.<\/strong> The target is 60 pips above the entry price for a long position and 60 pips below it for a short one. The position also closes after the opposite crossover of EMA 50 and EMA 200, confirmed by a closed H1 candle.<\/li>\n    <li><strong>Stop loss.<\/strong> A stop loss is placed 30 pips from the entry price when the position opens: below the entry for a long position, above it for a short one.<\/li>\n    <li><strong>Time filter.<\/strong> New positions open from 09:00 to 20:00 platform time. An open position can stay active after 20:00 and closes at the target, at the stop loss or on the exit signal.<\/li>\n    <li><strong>Position size.<\/strong> Every trade is 0.01 lot. A fixed volume keeps the first test simple; the 1% risk rule from the table above can replace it later.<\/li>\n  <\/ol>\n  <p>Here are the same conditions as step-by-step pseudocode for a programmer or ChatGPT. Exits are checked before entries, so an opposite crossover first closes the open trade and then opens the reverse one.<\/p>\n\n  <div class=\"ats-code\">\n    <div class=\"ats-code-head\"><span>Pseudocode<\/span><button type=\"button\" class=\"ats-copy\" data-ats-copy=\"ats-pseudo\">Copy<\/button><\/div>\n<pre class=\"ats-code-text\" id=\"ats-pseudo\">Symbol = EURUSD\nTimeframe = H1\nFast EMA = 50\nSlow EMA = 200\n\nOn every candle close\n    If Fast EMA crosses below Slow EMA on the latest closed candle\n    and a long position is open\n        Close the long position\n    If Fast EMA crosses above Slow EMA on the latest closed candle\n    and a short position is open\n        Close the short position\n\n    If platform time is from 09:00 inclusive to 20:00 exclusive\n    and no open positions exist\n        If Fast EMA crosses above Slow EMA on the latest closed candle\n            Open a long position with a volume of 0.01 lot\n            Set stop loss 30 pips below the entry price\n            Set <a href=\"https:\/\/roboforex.com\/blog\/education\/what-is-stop-loss-and-take-profit\/\" data-internallinksmanager029f6b8e52c=\"56\" title=\"Take Profit\">take profit<\/a> 60 pips above the entry price\n        If Fast EMA crosses below Slow EMA on the latest closed candle\n            Open a short position with a volume of 0.01 lot\n            Set stop loss 30 pips above the entry price\n            Set take profit 60 pips below the entry price<\/pre>\n  <\/div>\n\n  <h2><span class=\"ez-toc-section\" id=\"How_Do_You_Check_That_the_Rules_Are_Complete\"><\/span>How Do You Check That the Rules Are Complete?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n  <p>The rules are complete when every situation has a rule, every condition has a number, signals use closed candles, conflicting signals have a set <a href=\"https:\/\/roboforex.com\/blog\/education\/main-order-types-in-trading\/\" data-internallinksmanager029f6b8e52c=\"311\" title=\"Order\">order<\/a> and the end of the session is covered. Check your description against these five points before you hand it to a developer or ChatGPT.<\/p>\n  <ul>\n    <li><strong>Every situation has a rule.<\/strong> The description says when the robot opens and closes a trade and what it does when there is no signal.<\/li>\n    <li><strong>Conditions are exact.<\/strong> Words such as \"fast\" or \"strong move\" are replaced with numbers and periods.<\/li>\n    <li><strong>Only available data is used.<\/strong> Conditions are checked on closed candles, or on the current price if the strategy calls for it. A rule that reads a candle still forming can give a signal that disappears before the candle closes, and a <a href=\"https:\/\/roboforex.com\/blog\/education\/how-to-test-a-trading-strategy\/\" data-internallinksmanager029f6b8e52c=\"296\" title=\"Test a strategy\">backtest<\/a> of such a rule looks better than live trading.<\/li>\n    <li><strong>Rules do not contradict each other.<\/strong> The description says what happens when several conditions fire at once, for example an exit and a new entry on the same candle.<\/li>\n    <li><strong>The end of the session is covered.<\/strong> The description says whether an open trade stays active or closes.<\/li>\n  <\/ul>\n  <p>Fill in the template with your own strategy. It builds a plain-text description you can copy into a brief or a ChatGPT prompt.<\/p>\n\n  <!-- Rules template (rf-widgets). Vanilla JS, no storage. Output is plain\n       text set with textContent from ASCII strings and the reader's own input.\n       Copy uses the Clipboard API with a select-and-copy fallback. -->\n  <div class=\"ats-builder\" id=\"ats-builder\">\n    <div class=\"ats-builder-head\">\n      <div class=\"ats-builder-title\">Strategy rules template<\/div>\n      <div class=\"ats-builder-hint\">Empty fields use the EUR\/USD example.<\/div>\n    <\/div>\n    <div class=\"ats-builder-body\">\n      <div class=\"ats-builder-fields\">\n        <label class=\"ats-builder-field ats-builder-full\"><span>Symbol and timeframe<\/span><input type=\"text\" id=\"ats-symbol\" placeholder=\"EURUSD, H1\"><\/label>\n        <label class=\"ats-builder-field ats-builder-full\"><span>1. Entry rule<\/span><textarea id=\"ats-entry\" rows=\"2\" placeholder=\"Buy when EMA 50 crosses above EMA 200 on a closed candle, sell on the opposite cross\"><\/textarea><\/label>\n        <label class=\"ats-builder-field ats-builder-full\"><span>2. Exit rule<\/span><textarea id=\"ats-exit\" rows=\"2\" placeholder=\"Take profit 60 pips, or close on the opposite EMA 50 \/ EMA 200 cross\"><\/textarea><\/label>\n        <label class=\"ats-builder-field ats-builder-full\"><span>3. Stop loss<\/span><input type=\"text\" id=\"ats-sl\" placeholder=\"30 pips from the entry price\"><\/label>\n        <label class=\"ats-builder-field ats-builder-full\"><span>4. Trading filters<\/span><textarea id=\"ats-filter\" rows=\"2\" placeholder=\"New trades from 09:00 to 20:00 platform time, open trades may stay after 20:00\"><\/textarea><\/label>\n        <label class=\"ats-builder-field ats-builder-full\"><span>5. Position size<\/span><input type=\"text\" id=\"ats-size\" placeholder=\"0.01 lot\"><\/label>\n      <\/div>\n      <div class=\"ats-builder-out-label\">Your strategy rules<\/div>\n      <pre class=\"ats-builder-out\" id=\"ats-out\"><\/pre>\n      <button type=\"button\" class=\"ats-copy\" data-ats-copy=\"ats-out\">Copy rules<\/button>\n    <\/div>\n  <\/div>\n\n  <p>If any field stays vague after you fill it in, the robot will be vague in the same place, so rewrite it with a number before you move on.<\/p>\n\n  <p>One risk appears only after testing. If you keep adjusting the periods until the history looks perfect, the robot fits the past and often fails on new data. Keep the rules simple and check them on a stretch of history you did not use to choose the numbers.<\/p>\n\n  <h2><span class=\"ez-toc-section\" id=\"What_Comes_After_the_Rules\"><\/span>What Comes After the Rules?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n  <p>Once the rules are written and checked for contradictions, they become the brief for an Expert Advisor in MetaTrader 5. Expert Advisors are written in MQL5, the programming language of MetaTrader 5, and edited in MetaEditor. There are three ways to build one.<\/p>\n  <ul>\n    <li><strong>Write the code yourself.<\/strong> With basic programming skills you can put the rules into MetaEditor, following <a href=\"https:\/\/roboforex.com\/blog\/education\/first-mql5-expert-advisor\/\">Your First MQL5 Expert Advisor: A Ready-Made Robot You Can Copy and Launch Today<\/a>.<\/li>\n    <li><strong>Generate the first draft with ChatGPT.<\/strong> Give the copied rules to ChatGPT as the task for an MQL5 Expert Advisor. The prompts for writing and fixing the code are in <a href=\"https:\/\/roboforex.com\/blog\/education\/chatgpt-trading-bot\/\">ChatGPT Trading Bot<\/a>. The file it returns still needs checking and fixes.<\/li>\n    <li><strong>Configure a ready-made robot.<\/strong> For strategies on standard indicators you often do not need to write anything. Download a suitable robot from the MQL5 Market as shown in <a href=\"https:\/\/roboforex.com\/blog\/education\/expert-advisor-download-mt5-mql5-market\/\">Expert Advisor Download for MT5<\/a> and change its settings to match your rules.<\/li>\n  <\/ul>\n  <p>Whichever path you take, the robot then goes through four stages before it trades a standard account.<\/p>\n\n  <ol class=\"ats-stages\">\n    <li><span class=\"ats-stage-title\">Strategy Tester<\/span><span class=\"ats-stage-text\">History shows whether trades open where the rules say<\/span><\/li>\n    <li><span class=\"ats-stage-title\">Demo account<\/span><span class=\"ats-stage-text\">Live quotes check execution with virtual money<\/span><\/li>\n    <li><span class=\"ats-stage-title\">ProCent account<\/span><span class=\"ats-stage-text\">Real spreads and execution, with the balance shown in cents<\/span><\/li>\n    <li><span class=\"ats-stage-title\">Standard account<\/span><span class=\"ats-stage-text\">Only after the robot works steadily at every earlier stage<\/span><\/li>\n  <\/ol>\n\n  <p>Start with the step-by-step test in <a href=\"https:\/\/roboforex.com\/blog\/education\/a-15-minute-backtest-how-to-test-a-trading-robot-in-metatrader-5\/\">A 15-Minute Backtest: How to Test a Trading Robot in MetaTrader 5<\/a>, then run the robot on a demo account. For a first test with real money, the <a href=\"https:\/\/roboforex.com\/forex-trading\/trading\/cent-account\/\">ProCent account<\/a> shows the balance in cents. Results on history and on a demo account do not guarantee the same performance in the future. Two common ways to build and test a full system are compared in <a href=\"https:\/\/roboforex.com\/blog\/education\/building-algorithmic-trading-systems-2-main-approaches-testing-tools\/\">Building Algorithmic Trading Systems<\/a>.<\/p>\n\n  <div class=\"ats-promo\">\n    <div>\n      <div class=\"ats-promo-title\">Run Expert Advisors in RoboForex MetaTrader 5<\/div>\n      <div class=\"ats-promo-sub\">Desktop MT5 with MetaEditor, algo trading and the Strategy Tester built in.<\/div>\n    <\/div>\n    <div class=\"ats-promo-actions\">\n      <a class=\"ats-promo-btn\" href=\"https:\/\/roboforex.com\/forex-trading\/platforms\/metatrader5-mt5\/\" target=\"_blank\">Get MetaTrader 5<\/a>\n    <\/div>\n  <\/div>\n\n  <h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n  <p>A trading idea is ready for automation once its entry and exit conditions, stop loss and take profit, trading filters and position size are all written with numbers. That description becomes a clear task for a developer or ChatGPT. Start with the EUR\/USD crossover example, put your own numbers into the template and run the finished robot in the Strategy Tester before a demo account.<\/p>\n\n  <div class=\"ats-cta\">\n    <a href=\"https:\/\/my.roboforex.com\/en\/register\/\" target=\"_blank\" rel=\"nofollow\">Open a Demo Account and Test Your Rules<\/a>\n  <\/div>\n\n  <h2><span class=\"ez-toc-section\" id=\"FAQ\"><\/span>FAQ<span class=\"ez-toc-section-end\"><\/span><\/h2>\n  <div class=\"ats-faq\">\n    <details class=\"ats-faq-item\">\n      <summary class=\"ats-faq-q\">Can any trading strategy be automated?<\/summary>\n      <div class=\"ats-faq-a\">A strategy can be automated when its rules can be written as unambiguous conditions. Approaches based on a subjective reading of the market, intuition or visual search for chart patterns are much harder to put into code.<\/div>\n    <\/details>\n    <details class=\"ats-faq-item\">\n      <summary class=\"ats-faq-q\">Do I need to know programming to automate a strategy?<\/summary>\n      <div class=\"ats-faq-a\">You do not need deep programming knowledge to describe a strategy. With detailed rules, ChatGPT can generate the base of the code. Basic familiarity with MetaEditor helps when you compile and adjust the Expert Advisor.<\/div>\n    <\/details>\n    <details class=\"ats-faq-item\">\n      <summary class=\"ats-faq-q\">Which automated trading strategy suits beginners?<\/summary>\n      <div class=\"ats-faq-a\">A simple moving average crossover is a good start. It uses standard terminal indicators, has few settings and makes the logic of every trade easy to follow when you test it on history.<\/div>\n    <\/details>\n    <details class=\"ats-faq-item\">\n      <summary class=\"ats-faq-q\">Is automated trading allowed in MetaTrader 5?<\/summary>\n      <div class=\"ats-faq-a\">Yes, MetaTrader 5 supports automated trading with Expert Advisors, which are written in MQL5 in MetaEditor. Before launch, check how the robot works in the Strategy Tester and that algo trading is enabled in the platform.<\/div>\n    <\/details>\n    <details class=\"ats-faq-item\">\n      <summary class=\"ats-faq-q\">How much money do I need to start automated trading?<\/summary>\n      <div class=\"ats-faq-a\">Learning the platform and checking a robot's logic costs nothing, since the tests run on history and on a demo account. For a first step with real money, <a href=\"https:\/\/roboforex.com\/forex-trading\/trading\/cent-account\/\" data-internallinksmanager029f6b8e52c=\"48\" title=\"Cent accounts\">cent accounts<\/a> such as ProCent start from 10 USD, and even that trading carries risk.<\/div>\n    <\/details>\n  <\/div>\n  <script type=\"application\/ld+json\">\n  {\n    \"@context\": \"https:\/\/schema.org\",\n    \"@type\": \"FAQPage\",\n    \"mainEntity\": [\n      {\n        \"@type\": \"Question\",\n        \"name\": \"Can any trading strategy be automated?\",\n        \"acceptedAnswer\": {\n          \"@type\": \"Answer\",\n          \"text\": \"A strategy can be automated when its rules can be written as unambiguous conditions. Approaches based on a subjective reading of the market, intuition or visual search for chart patterns are much harder to put into code.\"\n        }\n      },\n      {\n        \"@type\": \"Question\",\n        \"name\": \"Do I need to know programming to automate a strategy?\",\n        \"acceptedAnswer\": {\n          \"@type\": \"Answer\",\n          \"text\": \"You do not need deep programming knowledge to describe a strategy. With detailed rules, ChatGPT can generate the base of the code. Basic familiarity with MetaEditor helps when you compile and adjust the Expert Advisor.\"\n        }\n      },\n      {\n        \"@type\": \"Question\",\n        \"name\": \"Which automated trading strategy suits beginners?\",\n        \"acceptedAnswer\": {\n          \"@type\": \"Answer\",\n          \"text\": \"A simple moving average crossover is a good start. It uses standard terminal indicators, has few settings and makes the logic of every trade easy to follow when you test it on history.\"\n        }\n      },\n      {\n        \"@type\": \"Question\",\n        \"name\": \"Is automated trading allowed in MetaTrader 5?\",\n        \"acceptedAnswer\": {\n          \"@type\": \"Answer\",\n          \"text\": \"Yes, MetaTrader 5 supports automated trading with Expert Advisors, which are written in MQL5 in MetaEditor. Before launch, check how the robot works in the Strategy Tester and that algo trading is enabled in the platform.\"\n        }\n      },\n      {\n        \"@type\": \"Question\",\n        \"name\": \"How much money do I need to start automated trading?\",\n        \"acceptedAnswer\": {\n          \"@type\": \"Answer\",\n          \"text\": \"Learning the platform and checking a robot's logic costs nothing, since the tests run on history and on a demo account. For a first step with real money, cent accounts such as ProCent start from 10 USD, and even that trading carries risk.\"\n        }\n      }\n    ]\n  }\n  <\/script>\n\n  <div class=\"ats-read-next\">\n    <div class=\"ats-read-next-label\">Read next<\/div>\n    <ul>\n      <li><a href=\"https:\/\/roboforex.com\/blog\/education\/trading-robot-ai\/\">How to Launch an AI Trading Robot: A Step-by-Step Guide for Beginners<\/a>: the full route from a trading idea to a robot on a chart.<\/li>\n      <li><a href=\"https:\/\/roboforex.com\/blog\/education\/chatgpt-trading-bot\/\">ChatGPT Trading Bot: Prompts That Write, Fix and Explain MQL5 Code<\/a>: turn the rules from the template into MQL5 code.<\/li>\n      <li><a href=\"https:\/\/roboforex.com\/blog\/education\/first-mql5-expert-advisor\/\">Your First MQL5 Expert Advisor: A Ready-Made Robot You Can Copy and Launch Today<\/a>: a complete crossover robot to compare with your rules.<\/li>\n      <li><a href=\"https:\/\/roboforex.com\/blog\/education\/a-15-minute-backtest-how-to-test-a-trading-robot-in-metatrader-5\/\">A 15-Minute Backtest: How to Test a Trading Robot in MetaTrader 5<\/a>: the first test for any robot built from your rules.<\/li>\n    <\/ul>\n  <\/div>\n\n  <div class=\"ats-disclaimer\">\n    <em>Any information provided in articles on this website is based solely on the personal opinions of the authors. These articles should not be construed as trading recommendations or a call to action. The authors and RoboForex accept no responsibility for the results of any trades made on the basis of these recommendations and reviews. Past performance is not indicative of future results. Trading <a href=\"https:\/\/roboforex.com\/forex-trading\/assets\/stocks\/\" data-internallinksmanager029f6b8e52c=\"10\" title=\"invest in stocks\">stocks<\/a> and CFDs involves a high risk of capital loss.<\/em>\n  <\/div>\n\n  <script>\n  (function () {\n    function copyText(text, btn) {\n      var label = btn.innerHTML;\n      function done() {\n        btn.innerHTML = 'Copied';\n        setTimeout(function () { btn.innerHTML = label; }, 1500);\n      }\n      function fallback() {\n        var ta = document.createElement('textarea');\n        ta.value = text;\n        ta.setAttribute('readonly', '');\n        ta.style.position = 'absolute';\n        ta.style.left = '-9999px';\n        document.body.appendChild(ta);\n        ta.select();\n        try { document.execCommand('copy'); done(); } catch (e) {}\n        document.body.removeChild(ta);\n      }\n      if (navigator.clipboard && navigator.clipboard.writeText) {\n        navigator.clipboard.writeText(text).then(done, fallback);\n      } else {\n        fallback();\n      }\n    }\n    var buttons = document.querySelectorAll('.ats [data-ats-copy]');\n    for (var i = 0; i < buttons.length; i++) {\n      buttons[i].addEventListener('click', function () {\n        var src = document.getElementById(this.getAttribute('data-ats-copy'));\n        if (src) copyText(src.textContent, this);\n      });\n    }\n\n    var box = document.getElementById('ats-builder');\n    if (!box) return;\n    var out = document.getElementById('ats-out');\n    function val(id) {\n      var el = document.getElementById(id);\n      if (!el) return '';\n      var v = el.value.replace(\/^\\s+|\\s+$\/g, '');\n      return v || el.getAttribute('placeholder') || '';\n    }\n    function build() {\n      out.textContent =\n        'Strategy rules for a MetaTrader 5 Expert Advisor\\n' +\n        'Symbol and timeframe: ' + val('ats-symbol') + '\\n' +\n        'Check signals on closed candles only.\\n\\n' +\n        '1. Entry: ' + val('ats-entry') + '\\n' +\n        '2. Exit: ' + val('ats-exit') + '\\n' +\n        '3. Stop loss: ' + val('ats-sl') + '\\n' +\n        '4. Trading filters: ' + val('ats-filter') + '\\n' +\n        '5. Position size: ' + val('ats-size') + '\\n\\n' +\n        'If an exit and a new entry fire on the same candle, process the exit first.';\n    }\n    var fields = box.querySelectorAll('input, textarea');\n    for (var f = 0; f < fields.length; f++) {\n      fields[f].addEventListener('input', build);\n    }\n    build();\n  })();\n  <\/script>\n\n<\/div>\n<\/div>\n<!-- ==================== \/BLOCK 1 ==================== -->\n\n<!-- ==================== BLOCK 2: STYLES ==================== -->\n<style>\n:root {\n  --green:        #5ab02b;\n  --green-hover:  #489022;\n  --link:         #0384c6;\n  --text:         #2E3A59;\n  --text-light:   #666666;\n  --heading:      #2E3A59;\n  --border:       #e0e0e0;\n  --table-head:   #f5f5f5;\n  --table-stripe: #fafafa;\n  --toc-bg:       #f9f9f9;\n  --promo-bg:     #f8f8f8;\n  --promo-border: #e8e8e8;\n  --radius:       4px;\n  --font:         'Roboto', Arial, sans-serif;\n  --max-w:        1160px;\n}\n\n\/* Outer wrapper. No side padding, decision 0014. *\/\n.ats-wrap {\n  box-sizing: border-box; max-width: var(--max-w); margin: 0 auto; padding: 0;\n}\n\n\/* Base prose *\/\n.ats {\n  font-family: var(--font);\n  font-size: 20px;\n  line-height: 1.7;\n  color: var(--text);\n  max-width: var(--max-w);\n}\n.ats.ats, .ats.ats * {\n  font-family: 'Roboto', Arial, sans-serif !important;\n}\n.ats p { margin: 0 0 20px; }\n.ats p a,\n.ats li a,\n.ats figcaption a,\n.ats td a,\n.ats .ats-faq-a a,\n.ats .ats-disclaimer a {\n  color: var(--link);\n  text-decoration: none;\n}\n.ats p a:hover,\n.ats li a:hover,\n.ats figcaption a:hover,\n.ats td a:hover,\n.ats .ats-faq-a a:hover,\n.ats .ats-disclaimer a:hover {\n  text-decoration: none;\n}\n.ats strong { color: var(--heading); font-weight: 700; }\n.ats em { font-style: italic; }\n.ats ul {\n  padding-left: 22px; margin: 0 0 18px;\n  display: flex; flex-direction: column; gap: 6px;\n}\n.ats ol { padding-left: 26px; margin: 0 0 20px; }\n.ats li { font-size: 20px; line-height: 1.7; color: var(--text); }\n\n\/* Headings. No border-bottom, no padding-bottom. No H1 rule. *\/\n.ats h2 {\n  font-size: 32px; font-weight: 700; color: var(--heading);\n  margin: 40px 0 16px; scroll-margin-top: 68px;\n}\n.ats h3 {\n  font-size: 22px; font-weight: 700; color: var(--heading);\n  margin: 28px 0 12px; scroll-margin-top: 68px;\n}\n\n\/* TL;DR, decisions 0024, 0031 *\/\n.ats .ats-tldr {\n  background: var(--promo-bg); border: 1px solid var(--border);\n  border-radius: var(--radius); padding: 18px 24px; margin: 24px 0 28px;\n}\n.ats .ats-tldr-label {\n  font-size: 14px; font-weight: 700; letter-spacing: .08em;\n  text-transform: uppercase; color: var(--text-light); margin: 0 0 8px;\n}\n.ats .ats-tldr ol { margin: 0; padding-left: 22px; }\n.ats .ats-tldr li { font-size: 17px; line-height: 1.6; margin: 0 0 6px; }\n.ats .ats-tldr li:last-child { margin-bottom: 0; }\n\n\/* Stage sequence: ring nodes with grey connectors, decision 0033.\n   Numbers come from a CSS counter, ASCII only. *\/\n.ats ol.ats-stages {\n  list-style: none; margin: 28px 0 32px; padding: 0;\n  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));\n  gap: 16px; counter-reset: ats-stage;\n}\n.ats ol.ats-stages > li {\n  position: relative; counter-increment: ats-stage;\n  padding: 52px 0 0; margin: 0;\n  display: flex; flex-direction: column; gap: 4px;\n}\n.ats ol.ats-stages > li::before {\n  content: counter(ats-stage);\n  position: absolute; top: 0; left: 0; z-index: 1;\n  width: 40px; height: 40px; box-sizing: border-box;\n  border: 2px solid var(--green); border-radius: 50%; background: #fff;\n  display: flex; align-items: center; justify-content: center;\n  font-size: 18px; font-weight: 700; color: var(--heading); line-height: 1;\n}\n.ats ol.ats-stages > li::after {\n  content: ''; position: absolute; top: 19px; left: 40px; right: -16px;\n  height: 2px; background: var(--border);\n}\n.ats ol.ats-stages > li:last-child::after { display: none; }\n.ats .ats-stage-title {\n  font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--heading);\n}\n.ats .ats-stage-text { font-size: 15px; line-height: 1.5; color: var(--text-light); }\n@media (max-width: 900px) {\n  .ats ol.ats-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }\n  .ats ol.ats-stages > li:nth-child(2n)::after { display: none; }\n}\n@media (max-width: 600px) {\n  .ats ol.ats-stages { grid-template-columns: 1fr; gap: 0; row-gap: 0; }\n  .ats ol.ats-stages > li { padding: 6px 0 22px 56px; min-height: 40px; }\n  .ats ol.ats-stages > li::after,\n  .ats ol.ats-stages > li:nth-child(2n)::after {\n    display: block; top: 40px; bottom: 0; left: 19px; right: auto;\n    width: 2px; height: auto;\n  }\n  .ats ol.ats-stages > li:last-child::after { display: none; }\n}\n\n\/* Read next, decision 0028 *\/\n.ats .ats-read-next {\n  border-top: 1px solid var(--border);\n  padding: 20px 0 0; margin: 36px 0 28px;\n}\n.ats .ats-read-next-label {\n  font-size: 14px; font-weight: 700; letter-spacing: .08em;\n  text-transform: uppercase; color: var(--text-light); margin: 0 0 8px;\n}\n.ats .ats-read-next ul { margin: 0; padding-left: 22px; }\n.ats .ats-read-next li { font-size: 17px; line-height: 1.6; margin: 0 0 6px; }\n.ats .ats-read-next li:last-child { margin-bottom: 0; }\n\n\/* Table. Three-column table uses the full width. *\/\n.ats-table-wrap {\n  max-width: 720px; overflow-x: auto; margin: 24px 0;\n  border: 1px solid var(--border); border-radius: var(--radius);\n}\n.ats-table-wrap.ats-table-wide { max-width: none; }\n.ats table.rf {\n  width: 100%; border-collapse: collapse; font-size: 16px; margin-bottom: 0;\n}\n.ats table.rf thead tr { background: var(--table-head); }\n.ats table.rf th {\n  padding: 10px 14px; text-align: left; font-size: 16px; font-weight: 700;\n  color: var(--heading); border-bottom: 2px solid var(--border);\n}\n.ats table.rf td {\n  padding: 10px 14px; border-bottom: 1px solid var(--border);\n  vertical-align: top; line-height: 1.45; color: var(--text);\n}\n.ats table.rf tr:last-child td { border-bottom: none; }\n.ats table.rf tr:nth-child(even) td { background: var(--table-stripe); }\n\n@media (max-width: 600px) {\n  .ats-table-wrap { border: none; overflow-x: visible; }\n  .ats table.rf thead { display: none; }\n  .ats table.rf tr {\n    display: block; margin-bottom: 12px;\n    border: 1px solid var(--border); border-radius: var(--radius);\n  }\n  .ats table.rf td {\n    display: block; border-bottom: 1px solid var(--border);\n  }\n  .ats table.rf td::before {\n    content: attr(data-label);\n    display: block; font-size: 13px; font-weight: 700;\n    text-transform: uppercase; letter-spacing: .04em;\n    color: var(--text-light); margin: 0 0 2px;\n  }\n}\n\n\/* Images: native WordPress image block, overflow guard only, decision 0005 *\/\n.ats .wp-block-image { margin: 24px 0; }\n.ats .wp-block-image img { max-width: 100%; height: auto; display: block; }\n.ats .wp-block-image figcaption { font-size: 14px; font-style: italic; color: var(--text-light); line-height: 1.5; margin-top: 8px; }\n\n\/* Promo *\/\n.ats-promo {\n  background: var(--promo-bg); border: 1px solid var(--promo-border);\n  border-radius: var(--radius); margin: 36px 0; padding: 24px 28px;\n  display: grid; grid-template-columns: 1fr auto;\n  align-items: center; gap: 24px;\n}\n@media (max-width: 600px) { .ats-promo { grid-template-columns: 1fr; padding: 20px; } }\n.ats-promo-title {\n  font-size: 20px; font-weight: 700; color: var(--heading);\n  margin-bottom: 5px; line-height: 1.3;\n}\n.ats-promo-sub { font-size: 15px; color: var(--text-light); line-height: 1.5; }\n.ats-promo-actions { display: flex; gap: 8px; flex-wrap: wrap; }\n.ats-promo-btn {\n  display: inline-block;\n  background: var(--green) !important;\n  color: #fff !important;\n  text-decoration: none !important;\n  font-size: 15px; font-weight: 700; padding: 10px 15px;\n  border-radius: 3px; white-space: nowrap; transition: background .15s;\n}\n.ats-promo-btn:hover { background: var(--green-hover) !important; }\n\n\/* CTA, a bare centred link *\/\n.ats-cta { text-align: center; margin: 36px 0; }\n.ats-cta a {\n  display: inline-block;\n  background: var(--green) !important;\n  color: #fff !important;\n  text-decoration: none !important;\n  font-size: 20px; font-weight: 700; padding: 13px 32px;\n  border-radius: 3px; transition: background .15s;\n}\n.ats-cta a:hover { background: var(--green-hover) !important; }\n@media (max-width: 600px) { .ats-cta a { font-size: 18px; padding: 12px 20px; } }\n\n\/* FAQ. Native <details>, ASCII + and - only. Decision 0003. *\/\n.ats-faq { margin: 8px 0; max-width: 900px; }\n.ats-faq details.ats-faq-item { border-bottom: 1px solid var(--border); }\n.ats-faq details.ats-faq-item:last-child { border-bottom: none; }\n.ats-faq details.ats-faq-item summary.ats-faq-q {\n  list-style: none; cursor: pointer; display: flex; align-items: center;\n  justify-content: space-between; gap: 12px; padding: 16px 0; margin: 0;\n  font-size: 18px; font-weight: 700; color: var(--heading); user-select: none;\n}\n.ats-faq details.ats-faq-item summary.ats-faq-q::-webkit-details-marker { display: none; }\n.ats-faq details.ats-faq-item summary.ats-faq-q::after {\n  content: '+'; flex-shrink: 0; font-size: 22px; font-weight: 300;\n  color: var(--green); line-height: 1;\n}\n.ats-faq details.ats-faq-item[open] summary.ats-faq-q::after { content: '-'; }\n.ats-faq .ats-faq-a {\n  font-size: 18px; color: var(--text); line-height: 1.65; margin: 0 0 16px;\n  padding: 0; animation: ats-faq-open .18s ease;\n}\n@keyframes ats-faq-open {\n  from { opacity: 0; transform: translateY(-4px); }\n  to   { opacity: 1; transform: translateY(0); }\n}\n@media (max-width: 600px) {\n  .ats-faq details.ats-faq-item summary.ats-faq-q { font-size: 17px; }\n  .ats-faq .ats-faq-a { font-size: 17px; }\n}\n\n\/* Mobile heading scale *\/\n@media (max-width: 600px) {\n  .ats h2 { font-size: 24px; margin: 32px 0 14px; }\n  .ats h3 { font-size: 19px; }\n}\n\n\/* Disclaimer. Always last. *\/\n.ats-disclaimer {\n  font-size: 12px; color: var(--text-light); line-height: 1.65;\n  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border);\n}\n.ats-disclaimer em { font-style: italic; }\n\n\/* Code block. Wrapped plain text, no horizontal scroll. Copy button is a\n   real button; its label is ASCII set with innerHTML, CLAUDE.md hard rule 8. *\/\n.ats-code {\n  border: 1px solid var(--border); border-radius: var(--radius);\n  margin: 16px 0 16px; max-width: 900px; overflow: hidden; background: var(--toc-bg);\n}\n.ats-code-head {\n  display: flex; align-items: center; justify-content: space-between; gap: 12px;\n  padding: 8px 14px; background: var(--table-head); border-bottom: 1px solid var(--border);\n  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;\n  color: var(--text-light);\n}\n.ats .ats-code-text,\n.ats .ats-builder-out {\n  margin: 0; padding: 14px 18px; white-space: pre-wrap; word-wrap: break-word;\n  overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; color: var(--text);\n  background: transparent; border: none; max-height: none;\n  font-family: 'Roboto Mono', Consolas, 'Courier New', monospace !important;\n}\n.ats .ats-copy {\n  display: inline-block; margin: 0; padding: 5px 12px !important;\n  font-size: 13px !important; font-weight: 700 !important; line-height: 1.3;\n  color: #fff !important; background: var(--green) !important;\n  border: none !important; border-radius: 3px !important; box-shadow: none !important;\n  text-transform: none !important; letter-spacing: normal !important;\n  cursor: pointer; -webkit-appearance: none; appearance: none; transition: background .15s;\n}\n.ats .ats-copy:hover { background: var(--green-hover) !important; }\n.ats .ats-copy:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }\n\n\/* Rules template *\/\n.ats-builder {\n  border: 1px solid var(--border); border-radius: var(--radius);\n  margin: 20px 0 24px; max-width: 900px; overflow: hidden; background: #fff;\n}\n.ats-builder-head { padding: 14px 18px; background: var(--promo-bg); border-bottom: 1px solid var(--border); }\n.ats-builder-title {\n  font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;\n  color: var(--text-light); margin: 0 0 4px;\n}\n.ats-builder-hint { font-size: 14px; color: var(--text-light); line-height: 1.4; }\n.ats-builder-body { padding: 16px 18px 18px; }\n.ats-builder-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0 0 16px; }\n.ats-builder-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.ats-builder-full { grid-column: 1 \/ -1; }\n.ats-builder-field span { font-size: 14px; font-weight: 700; color: var(--heading); }\n.ats .ats-builder-field input,\n.ats .ats-builder-field textarea {\n  box-sizing: border-box; width: 100%; max-width: 100%; margin: 0;\n  padding: 8px 10px; font-size: 16px; line-height: 1.4; color: var(--text);\n  background: #fff; border: 1px solid var(--border); border-radius: 3px; resize: vertical;\n}\n.ats-builder-out-label {\n  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;\n  color: var(--text-light); margin: 0 0 6px;\n}\n.ats .ats-builder-out {\n  background: var(--toc-bg); border: 1px solid var(--border); border-radius: var(--radius);\n  margin: 0 0 12px;\n}\n@media (max-width: 600px) {\n  .ats-builder-head, .ats-builder-body { padding-left: 14px; padding-right: 14px; }\n  .ats-builder-fields { grid-template-columns: 1fr; }\n  .ats .ats-code-text, .ats .ats-builder-out { font-size: 14px; padding: 12px 14px; }\n}\n<\/style>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Which strategies a robot can run, the five blocks of rules it needs and an EUR\/USD example written as pseudocode for a developer or ChatGPT.<\/p>\n","protected":false},"author":20,"featured_media":22438,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_post_was_ever_published":false},"categories":[29],"tags":[3108,250],"class_list":["post-22437","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-education","tag-automated-trading-strategy","tag-trading-robot"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Automated Trading Strategies: Types, Rules and an Example<\/title>\n<meta name=\"description\" content=\"Automated trading strategies explained: which systems a robot can run, the five rules it needs and a worked EUR\/USD example to turn into an MT5 robot.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automated Trading Strategies: Types, Rules and an Example\" \/>\n<meta property=\"og:description\" content=\"Automated trading strategies explained: which systems a robot can run, the five rules it needs and a worked EUR\/USD example to turn into an MT5 robot.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/\" \/>\n<meta property=\"og:site_name\" content=\"RoboForex Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoboForexOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-13T07:49:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-13T07:49:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/automated-trading-strategies.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1672\" \/>\n\t<meta property=\"og:image:height\" content=\"941\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@RoboForexGlobal\" \/>\n<meta name=\"twitter:site\" content=\"@RoboForexGlobal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrey Goilov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/\"},\"headline\":\"Automated Trading Strategies: How to Turn Your Idea Into Rules a Robot Can Execute\",\"datePublished\":\"2026-11-13T07:49:03+00:00\",\"dateModified\":\"2026-11-13T07:49:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/\"},\"wordCount\":2558,\"publisher\":{\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/automated-trading-strategies.png\",\"keywords\":[\"automated trading strategy\",\"trading robot\"],\"articleSection\":[\"Education\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/\",\"url\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/\",\"name\":\"Automated Trading Strategies: Types, Rules and an Example\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/automated-trading-strategies.png\",\"datePublished\":\"2026-11-13T07:49:03+00:00\",\"dateModified\":\"2026-11-13T07:49:06+00:00\",\"description\":\"Automated trading strategies explained: which systems a robot can run, the five rules it needs and a worked EUR\\\/USD example to turn into an MT5 robot.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/#primaryimage\",\"url\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/automated-trading-strategies.png\",\"contentUrl\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/automated-trading-strategies.png\",\"width\":1672,\"height\":941,\"caption\":\"Automated Trading Strategies: How to Turn Your Idea Into Rules a Robot Can Execute\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/automated-trading-strategies\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Main\",\"item\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Education\",\"item\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/education\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Automated Trading Strategies: How to Turn Your Idea Into Rules a Robot Can Execute\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/\",\"name\":\"RoboForex Blog\",\"description\":\"Blog RoboForex for Traders: Trading News, Analysis, Forecasts - forex and stocks | RoboForex Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/#organization\"},\"alternateName\":\"RoboForex Ltd\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/#organization\",\"name\":\"RoboForex Ltd\",\"alternateName\":\"RoboForex\",\"url\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/android-chrome-512x512-1.png\",\"contentUrl\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/android-chrome-512x512-1.png\",\"width\":512,\"height\":512,\"caption\":\"RoboForex Ltd\"},\"image\":{\"@id\":\"https:\\\/\\\/roboforex.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoboForexOfficial\\\/\",\"https:\\\/\\\/x.com\\\/RoboForexGlobal\",\"https:\\\/\\\/www.youtube.com\\\/RoboForexOfficial\",\"https:\\\/\\\/www.instagram.com\\\/roboforex\\\/\"],\"address\":{\"@type\":\"PostalAddress\",\"streetAddress\":\"2118 Guava Street, Belama Phase 1\",\"addressLocality\":\"Belize City\",\"addressRegion\":\"BZ\",\"postalCode\":\"00000\",\"addressCountry\":\"BZ\"},\"contactPoint\":{\"@type\":\"ContactPoint\",\"telephone\":\"+593 964 256 286\",\"contactType\":\"customer service\",\"availableLanguage\":\"en\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Automated Trading Strategies: Types, Rules and an Example","description":"Automated trading strategies explained: which systems a robot can run, the five rules it needs and a worked EUR\/USD example to turn into an MT5 robot.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/","og_locale":"en_US","og_type":"article","og_title":"Automated Trading Strategies: Types, Rules and an Example","og_description":"Automated trading strategies explained: which systems a robot can run, the five rules it needs and a worked EUR\/USD example to turn into an MT5 robot.","og_url":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/","og_site_name":"RoboForex Blog","article_publisher":"https:\/\/www.facebook.com\/RoboForexOfficial\/","article_published_time":"2026-11-13T07:49:03+00:00","article_modified_time":"2026-11-13T07:49:06+00:00","og_image":[{"width":1672,"height":941,"url":"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/automated-trading-strategies.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_creator":"@RoboForexGlobal","twitter_site":"@RoboForexGlobal","twitter_misc":{"Written by":"Andrey Goilov","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/#article","isPartOf":{"@id":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/"},"headline":"Automated Trading Strategies: How to Turn Your Idea Into Rules a Robot Can Execute","datePublished":"2026-11-13T07:49:03+00:00","dateModified":"2026-11-13T07:49:06+00:00","mainEntityOfPage":{"@id":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/"},"wordCount":2558,"publisher":{"@id":"https:\/\/roboforex.com\/blog\/#organization"},"image":{"@id":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/#primaryimage"},"thumbnailUrl":"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/automated-trading-strategies.png","keywords":["automated trading strategy","trading robot"],"articleSection":["Education"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/","url":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/","name":"Automated Trading Strategies: Types, Rules and an Example","isPartOf":{"@id":"https:\/\/roboforex.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/#primaryimage"},"image":{"@id":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/#primaryimage"},"thumbnailUrl":"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/automated-trading-strategies.png","datePublished":"2026-11-13T07:49:03+00:00","dateModified":"2026-11-13T07:49:06+00:00","description":"Automated trading strategies explained: which systems a robot can run, the five rules it needs and a worked EUR\/USD example to turn into an MT5 robot.","breadcrumb":{"@id":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/#primaryimage","url":"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/automated-trading-strategies.png","contentUrl":"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/automated-trading-strategies.png","width":1672,"height":941,"caption":"Automated Trading Strategies: How to Turn Your Idea Into Rules a Robot Can Execute"},{"@type":"BreadcrumbList","@id":"https:\/\/roboforex.com\/blog\/education\/automated-trading-strategies\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Main","item":"https:\/\/roboforex.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Education","item":"https:\/\/roboforex.com\/blog\/education\/"},{"@type":"ListItem","position":3,"name":"Automated Trading Strategies: How to Turn Your Idea Into Rules a Robot Can Execute"}]},{"@type":"WebSite","@id":"https:\/\/roboforex.com\/blog\/#website","url":"https:\/\/roboforex.com\/blog\/","name":"RoboForex Blog","description":"Blog RoboForex for Traders: Trading News, Analysis, Forecasts - forex and stocks | RoboForex Blog","publisher":{"@id":"https:\/\/roboforex.com\/blog\/#organization"},"alternateName":"RoboForex Ltd","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/roboforex.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/roboforex.com\/blog\/#organization","name":"RoboForex Ltd","alternateName":"RoboForex","url":"https:\/\/roboforex.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/roboforex.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/10\/android-chrome-512x512-1.png","contentUrl":"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/10\/android-chrome-512x512-1.png","width":512,"height":512,"caption":"RoboForex Ltd"},"image":{"@id":"https:\/\/roboforex.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoboForexOfficial\/","https:\/\/x.com\/RoboForexGlobal","https:\/\/www.youtube.com\/RoboForexOfficial","https:\/\/www.instagram.com\/roboforex\/"],"address":{"@type":"PostalAddress","streetAddress":"2118 Guava Street, Belama Phase 1","addressLocality":"Belize City","addressRegion":"BZ","postalCode":"00000","addressCountry":"BZ"},"contactPoint":{"@type":"ContactPoint","telephone":"+593 964 256 286","contactType":"customer service","availableLanguage":"en"}}]}},"views":"","jetpack_featured_media_url":"https:\/\/roboforex.com\/blog\/wp-content\/uploads\/2026\/11\/automated-trading-strategies.png","_links":{"self":[{"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/posts\/22437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/comments?post=22437"}],"version-history":[{"count":1,"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/posts\/22437\/revisions"}],"predecessor-version":[{"id":22439,"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/posts\/22437\/revisions\/22439"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/media\/22438"}],"wp:attachment":[{"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/media?parent=22437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/categories?post=22437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/roboforex.com\/blog\/wp-json\/wp\/v2\/tags?post=22437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}