{"id":17485,"date":"2025-05-08T10:23:42","date_gmt":"2025-05-08T10:23:42","guid":{"rendered":"https:\/\/socialvps.net\/?p=17485"},"modified":"2025-07-27T01:24:48","modified_gmt":"2025-07-27T01:24:48","slug":"los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea","status":"publish","type":"post","link":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/","title":{"rendered":"Los fundamentos de MQL4 : C\u00f3mo crear su primer EA de Forex"},"content":{"rendered":"<p class=\"wp-block-paragraph\">SocialVPS \u2014 MetaTrader 4 (MT4) es una de las plataformas m\u00e1s populares entre los operadores de Forex, y uno de sus mayores puntos fuertes es la posibilidad de automatizar las operaciones utilizando Expert Advisors (EAs). Si alguna vez te has preguntado c\u00f3mo construyen los traders esos bots de trading automatizados, esta gu\u00eda es tu punto de partida. En este art\u00edculo, vamos a romper los conceptos b\u00e1sicos de MQL4 (el lenguaje de programaci\u00f3n detr\u00e1s de MT4) y le guiar\u00e1 a trav\u00e9s de c\u00f3mo crear su primera <a href=\"https:\/\/socialvps.net\/es\/como-crear-un-robot-de-forex-paso-a-paso\/\" title=\"C\u00f3mo Crear un Robot para Operar en Forex: Gu\u00eda paso a paso\">EA de Forex<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-mql4-and-why-is-it-important\">\u00bfQu\u00e9 es MQL4 y por qu\u00e9 es importante?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Antes de sumergirnos en la codificaci\u00f3n, entendamos qu\u00e9 es realmente MQL4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"360\" src=\"https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/MQL4-Apps-1024x360.webp\" alt=\"MQL4 Aplicaciones para Forex EA\" class=\"wp-image-17489\" srcset=\"https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/MQL4-Apps-1024x360.webp 1024w, https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/MQL4-Apps-300x105.webp 300w, https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/MQL4-Apps-768x270.webp 768w, https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/MQL4-Apps-18x6.webp 18w, https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/MQL4-Apps.webp 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">MQL4, o MetaQuotes Language 4, es un lenguaje de programaci\u00f3n de alto nivel dise\u00f1ado espec\u00edficamente para desarrollar estrategias de trading en la plataforma MT4. Con MQL4, puede crear indicadores personalizados, scripts y, lo que es m\u00e1s importante, Expert Advisors, tambi\u00e9n conocidos como robots de Forex o... <a href=\"https:\/\/socialvps.net\/es\/ea-scripting-como-crear-algoritmos-de-forex-trading\/\" title=\"Programaci\u00f3n de EA: C\u00f3mo crear algoritmos de trading de Forex\">robots de negociaci\u00f3n algor\u00edtmica<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bfPor qu\u00e9 es importante para usted? Porque la automatizaci\u00f3n de su estrategia le permite eliminar el sesgo emocional, el comercio 24\/7, y probar ideas m\u00e1s r\u00e1pido que el comercio manual nunca podr\u00eda.<\/p>\n\n\n\n<div class=\"wp-block-data443-irp-shortcode irp-shortcode\"><div style=\"clear:both; margin-top:0em; margin-bottom:1em;\"><a href=\"https:\/\/socialvps.net\/es\/ea-scripting-como-crear-algoritmos-de-forex-trading\/\" target=\"_blank\" rel=\"dofollow\" class=\"s6fa8c1c397a88c411088d4e21fe95220\"><div style=\"padding-left:1em; padding-right:1em;\"><span class=\"ctaText\">Lee tambi\u00e9n<\/span>&nbsp; <span class=\"postTitle\">Programaci\u00f3n de EA: C\u00f3mo crear algoritmos de trading de Forex<\/span><\/div><\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-a-forex-ea\">\u00bfQu\u00e9 es un EA de Forex?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Un EA de Forex (Expert Advisor) es un software escrito en MQL4 que automatiza su estrategia de trading. Supervisa el mercado, abre y cierra operaciones en funci\u00f3n de las condiciones que usted defina, e incluso puede enviarle alertas. Esencialmente, act\u00faa como su asistente personal de trading, menos el salario.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Crear un EA es como dar vida a su plan de trading. Sigue las instrucciones sin emoci\u00f3n, sin fatiga y sin dudas.<\/p>\n\n\n\n<div class=\"wp-block-data443-irp-shortcode irp-shortcode\"><div style=\"clear:both; margin-top:0em; margin-bottom:1em;\"><a href=\"https:\/\/socialvps.net\/es\/que-es-un-asesor-experto\/\" target=\"_blank\" rel=\"dofollow\" class=\"s6fa8c1c397a88c411088d4e21fe95220\"><div style=\"padding-left:1em; padding-right:1em;\"><span class=\"ctaText\">Lee tambi\u00e9n<\/span>&nbsp; <span class=\"postTitle\">\u00bfQu\u00e9 es un Asesor Experto? Herramienta automatizada para operar en Forex<\/span><\/div><\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"tools-youll-need-to-create-your-first-ea\">Herramientas necesarias para crear su primer EA<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Hablemos de las herramientas b\u00e1sicas y la configuraci\u00f3n que necesitas para empezar.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>MetaTrader 4 Plataforma:<\/strong> Desc\u00e1rguelo de su intermediario o del <a href=\"https:\/\/www.metatrader4.com\/en\">Sitio web oficial de MetaTrader 4<\/a>.<\/li>\n\n\n\n<li><strong>MetaEditor:<\/strong> Instalado con MT4, aqu\u00ed es donde escribir\u00e1s y compilar\u00e1s tu c\u00f3digo.<\/li>\n\n\n\n<li><strong>Paciencia:<\/strong> Aprender a programar, aunque s\u00f3lo sea lo b\u00e1sico, lleva su tiempo.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-data443-irp-shortcode irp-shortcode\"><div style=\"clear:both; margin-top:0em; margin-bottom:1em;\"><a href=\"https:\/\/socialvps.net\/es\/como-instalar-expert-advisor-ea-en-metatrader-facilmente\/\" target=\"_blank\" rel=\"dofollow\" class=\"s6fa8c1c397a88c411088d4e21fe95220\"><div style=\"padding-left:1em; padding-right:1em;\"><span class=\"ctaText\">Lee tambi\u00e9n<\/span>&nbsp; <span class=\"postTitle\">C\u00f3mo instalar Expert Advisor (EA) en MetaTrader f\u00e1cilmente<\/span><\/div><\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"your-first-mql4-forex-ea-step-by-step\">Su primer EA MQL4 Forex: Paso a Paso<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ahora llegamos a la parte divertida: construir tu primer EA de Forex. Vamos a empezar con una estrategia comercial b\u00e1sica:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><em>Comprar cuando la media m\u00f3vil de 10 periodos cruce por encima de la media m\u00f3vil de 20 periodos.<\/em><br><em>Vender cuando la Media M\u00f3vil de 10 periodos cruce por debajo de la Media M\u00f3vil de 20 periodos.<\/em><\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-open-metaeditor\">Paso 1: Abrir MetaEditor<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Abra su plataforma MT4.<\/li>\n\n\n\n<li>Haga clic en el icono MetaEditor o pulse <code>F4<\/code>.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-create-a-new-ea-file\">Paso 2: Crear un nuevo archivo EA<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>En el MetaEditor, vaya a <strong>File \u2192 New \u2192 Expert Advisor (template)<\/strong>.<\/li>\n\n\n\n<li>Ponle un nombre como <code>SimpleMA_EA<\/code>.<\/li>\n\n\n\n<li>Haga clic en <strong>Next \u2192 Finish<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-write-the-ea-code\">Paso 3: Escribir el c\u00f3digo EA<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A continuaci\u00f3n se muestra un c\u00f3digo EA simplificado que puede utilizar para empezar:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-auto-translation=\"\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/+------------------------------------------------------------------+\n\/\/|                                                  SimpleMA_EA.mq4|\n\/\/+------------------------------------------------------------------+\n#property strict\n\ninput int FastMA = 10;\ninput int SlowMA = 20;\ninput double LotSize = 0.1;\n\nint start() {\n    double fastMA = iMA(NULL, 0, FastMA, 0, MODE_SMA, PRICE_CLOSE, 0);\n    double slowMA = iMA(NULL, 0, SlowMA, 0, MODE_SMA, PRICE_CLOSE, 0);\n    double fastMA_prev = iMA(NULL, 0, FastMA, 0, MODE_SMA, PRICE_CLOSE, 1);\n    double slowMA_prev = iMA(NULL, 0, SlowMA, 0, MODE_SMA, PRICE_CLOSE, 1);\n\n    if (fastMA > slowMA &amp;&amp; fastMA_prev &lt;= slowMA_prev) {\n        OrderSend(Symbol(), OP_BUY, LotSize, Ask, 2, 0, 0, \"Buy Order\", 0, 0, clrBlue);\n    }\n\n    if (fastMA &lt; slowMA &amp;&amp; fastMA_prev >= slowMA_prev) {\n        OrderSend(Symbol(), OP_SELL, LotSize, Bid, 2, 0, 0, \"Sell Order\", 0, 0, clrRed);\n    }\n\n    return(0);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A9955\">\/\/+------------------------------------------------------------------+<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">\/\/| SimpleMA_EA.mq4|<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">\/\/+------------------------------------------------------------------+<\/span><\/span>\n<span class=\"line\"><span style=\"color: #9CDCFE\">#property<\/span><span style=\"color: #D4D4D4\"> strict<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">input <\/span><span style=\"color: #569CD6\">int<\/span><span style=\"color: #D4D4D4\"> FastMA = <\/span><span style=\"color: #B5CEA8\">10<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">input <\/span><span style=\"color: #569CD6\">int<\/span><span style=\"color: #D4D4D4\"> SlowMA = <\/span><span style=\"color: #B5CEA8\">20<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">input <\/span><span style=\"color: #569CD6\">double<\/span><span style=\"color: #D4D4D4\"> LotSize = <\/span><span style=\"color: #B5CEA8\">0.1<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">int<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">start<\/span><span style=\"color: #D4D4D4\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">double<\/span><span style=\"color: #D4D4D4\"> fastMA = <\/span><span style=\"color: #DCDCAA\">iMA<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #569CD6\">NULL<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, FastMA, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, MODE_SMA, PRICE_CLOSE, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">double<\/span><span style=\"color: #D4D4D4\"> slowMA = <\/span><span style=\"color: #DCDCAA\">iMA<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #569CD6\">NULL<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, SlowMA, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, MODE_SMA, PRICE_CLOSE, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">double<\/span><span style=\"color: #D4D4D4\"> fastMA_prev = <\/span><span style=\"color: #DCDCAA\">iMA<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #569CD6\">NULL<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, FastMA, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, MODE_SMA, PRICE_CLOSE, <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">double<\/span><span style=\"color: #D4D4D4\"> slowMA_prev = <\/span><span style=\"color: #DCDCAA\">iMA<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #569CD6\">NULL<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, SlowMA, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, MODE_SMA, PRICE_CLOSE, <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (fastMA &gt; slowMA &amp;&amp; fastMA_prev &lt;= slowMA_prev) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #DCDCAA\">OrderSend<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #DCDCAA\">Symbol<\/span><span style=\"color: #D4D4D4\">(), OP_BUY, LotSize, Ask, <\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">\"Buy Order\"<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, clrBlue);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (fastMA = slowMA_prev) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #DCDCAA\">OrderSend<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #DCDCAA\">Symbol<\/span><span style=\"color: #D4D4D4\">(), OP_SELL, LotSize, Bid, <\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">\"Sell Order\"<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, clrRed);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">return<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Este Expert Advisor (EA) realiza operaciones automatizadas en MetaTrader 4 utilizando una estrategia de cruce de medias m\u00f3viles simples (SMA). Cuando la MA r\u00e1pida cruza por encima de la MA lenta, abre una orden de compra. Cuando la MA R\u00e1pida cruza por debajo de la MA Lenta, abre una orden de venta.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-compile-and-test\">Paso 4: Compilar y probar<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Pulsa el bot\u00f3n <strong>Compile<\/strong> en el MetaEditor.<\/li>\n\n\n\n<li>Vuelva a MT4 y arrastre su EA a un gr\u00e1fico para probarlo.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Eso es todo. Usted acaba de crear su primer sistema de comercio automatizado utilizando MQL4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Por supuesto. Desglosemos este script MQL4 Expert Advisor <code>SimpleMA_EA.mq4<\/code>l\u00ednea por l\u00ednea, para ayudarle a usted o a cualquier principiante a entender claramente lo que hace cada parte del c\u00f3digo.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"code-breakdown-and-function-explanations\">Desglose de c\u00f3digo y explicaciones de funciones<\/h2>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-auto-translation=\"\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>#property strict<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">#<\/span><span style=\"color: #9CDCFE\">property<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">strict<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Esto permite realizar comprobaciones de errores en tiempo de compilaci\u00f3n m\u00e1s estrictas para garantizar un c\u00f3digo m\u00e1s limpio.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-auto-translation=\"\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>input int FastMA = 10;\ninput int SlowMA = 20;\ninput double LotSize = 0.1;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #9CDCFE\">input<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">int<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">FastMA<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #B5CEA8\">10<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #9CDCFE\">input<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">int<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">SlowMA<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #B5CEA8\">20<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #9CDCFE\">input<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">double<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">LotSize<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #B5CEA8\">0.1<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Se trata de <strong>variables de entrada<\/strong>lo que significa que los usuarios pueden cambiarlos f\u00e1cilmente en la configuraci\u00f3n de EA:\n<ul class=\"wp-block-list\">\n<li><code>FastMA<\/code>: el per\u00edodo para el <strong>Fast Moving Average<\/strong>, por ejemplo, 10.<\/li>\n\n\n\n<li><code>SlowMA<\/code>: el per\u00edodo para el <strong>Slow Moving Average<\/strong>por ejemplo, 20.<\/li>\n\n\n\n<li><code>LotSize<\/code>: De qu\u00e9 tama\u00f1o ser\u00e1 su operaci\u00f3n (0,1 lote en este caso).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-auto-translation=\"\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>int start() {<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #9CDCFE\">int<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">start<\/span><span style=\"color: #D4D4D4\">() {<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>En <code>start()<\/code> es la funci\u00f3n <strong>main loop<\/strong> en los EAs MQL4 (utilizados en versiones anteriores de MetaTrader 4).<\/li>\n\n\n\n<li>Esta funci\u00f3n ejecuta <strong>cada vez que se produce un nuevo tick (actualizaci\u00f3n del precio)<\/strong> se recibe.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-auto-translation=\"\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>double fastMA = iMA(NULL, 0, FastMA, 0, MODE_SMA, PRICE_CLOSE, 0);\ndouble slowMA = iMA(NULL, 0, SlowMA, 0, MODE_SMA, PRICE_CLOSE, 0);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #9CDCFE\">double<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">fastMA<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #DCDCAA\">iMA<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #4FC1FF\">NULL<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">FastMA<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #4FC1FF\">MODO_SMA<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #4FC1FF\">PRICE_CLOSE<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #9CDCFE\">double<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">slowMA<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #DCDCAA\">iMA<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #4FC1FF\">NULL<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">SlowMA<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #4FC1FF\">MODO_SMA<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #4FC1FF\">PRICE_CLOSE<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Estas l\u00edneas calculan el <strong>actual<\/strong> valores del <strong>Fast MA<\/strong> y <strong>Slow MA<\/strong> utilizando <code>iMA()<\/code>:\n<ul class=\"wp-block-list\">\n<li><code>NULL<\/code>: s\u00edmbolo del gr\u00e1fico actual.<\/li>\n\n\n\n<li><code>0<\/code>: marco temporal actual.<\/li>\n\n\n\n<li><code>FastMA\/SlowMA<\/code>periodo para cada AM.<\/li>\n\n\n\n<li><code>0<\/code>: turno (vela actual).<\/li>\n\n\n\n<li><code>MODO_SMA<\/code>: uso <strong>Simple Moving Average<\/strong>.<\/li>\n\n\n\n<li><code>PRICE_CLOSE<\/code>basado en el precio de cierre de la vela.<\/li>\n\n\n\n<li><code>0<\/code>: vela actual.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-auto-translation=\"\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>double fastMA_prev = iMA(NULL, 0, FastMA, 0, MODE_SMA, PRICE_CLOSE, 1);\ndouble slowMA_prev = iMA(NULL, 0, SlowMA, 0, MODE_SMA, PRICE_CLOSE, 1);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #9CDCFE\">double<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">fastMA_prev<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #DCDCAA\">iMA<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #4FC1FF\">NULL<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">FastMA<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #4FC1FF\">MODO_SMA<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #4FC1FF\">PRICE_CLOSE<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #9CDCFE\">double<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">slowMA_prev<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #DCDCAA\">iMA<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #4FC1FF\">NULL<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">SlowMA<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #4FC1FF\">MODO_SMA<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #4FC1FF\">PRICE_CLOSE<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Estas l\u00edneas reciben el <strong>vela anterior<\/strong> Valores MA (<code>shift = 1<\/code>), por lo que podemos comparar el actual con el anterior para la l\u00f3gica de cruce.<\/li>\n<\/ul>\n\n\n\t\t<div data-elementor-type=\"container\" data-elementor-id=\"12840\" class=\"elementor elementor-12840\" data-elementor-post-type=\"elementor_library\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a59bbdd e-flex e-con-boxed e-con e-child\" data-id=\"a59bbdd\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-b73672e e-con-full e-flex e-con e-child\" data-id=\"b73672e\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0844e89 elementor-widget elementor-widget-elementskit-heading\" data-id=\"0844e89\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"elementskit-heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"ekit-wid-con\" ><div class=\"ekit-heading elementskit-section-title-wraper text_left   ekit_heading_tablet-text_left   ekit_heading_mobile-text_center\"><span class=\"elementskit-section-subtitle\">\n\t\t\t\t\t\tLooking to Elevate Your Forex Trading?\n\t\t\t\t\t<\/span><div class=\"ekit-heading--title elementskit-section-title\">Boost Your Trading Performance with Our <span>Forex VPS<\/span><\/div><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6880476 elementor-align-left elementor-tablet-align-left elementor-tablet_extra-align-left elementor-mobile-align-center elementor-widget elementor-widget-button\" data-id=\"6880476\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/socialvps.net\/es\/precios-forex-vps\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Get Started!<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-12a5fce elementor-widget elementor-widget-text-editor\" data-id=\"12a5fce\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><em>de <del>$8.3<\/del> a $5,7\/facturados anualmente<\/em><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-b07df3c e-con-full elementor-hidden-laptop elementor-hidden-tablet_extra e-flex e-con e-child\" data-id=\"b07df3c\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e0667c7 elementor-widget elementor-widget-image\" data-id=\"e0667c7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"782\" height=\"548\" src=\"https:\/\/socialvps.net\/wp-content\/uploads\/2024\/11\/Server-SocialVPS-Vector-1.webp\" class=\"attachment-full size-full wp-image-12807\" alt=\"SociaVPS ofrece el mejor VPS de Forex\" srcset=\"https:\/\/socialvps.net\/wp-content\/uploads\/2024\/11\/Server-SocialVPS-Vector-1.webp 782w, https:\/\/socialvps.net\/wp-content\/uploads\/2024\/11\/Server-SocialVPS-Vector-1-300x210.webp 300w, https:\/\/socialvps.net\/wp-content\/uploads\/2024\/11\/Server-SocialVPS-Vector-1-768x538.webp 768w, https:\/\/socialvps.net\/wp-content\/uploads\/2024\/11\/Server-SocialVPS-Vector-1-18x12.webp 18w\" sizes=\"(max-width: 782px) 100vw, 782px\" title=\"SociaVPS ofrece el mejor VPS de Forex - SocialVPS\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\n\n\n\n<h2 class=\"wp-block-heading\" id=\"trading-logic\">Trading L\u00f3gica<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"buy-condition\">Condici\u00f3n de compra<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-auto-translation=\"\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>if (fastMA > slowMA &amp;&amp; fastMA_prev &lt;= slowMA_prev) {\nOrderSend(Symbol(), OP_BUY, LotSize, Ask, 2, 0, 0, \"Buy Order\", 0, 0, clrBlue);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (<\/span><span style=\"color: #9CDCFE\">fastMA<\/span><span style=\"color: #D4D4D4\"> &gt; <\/span><span style=\"color: #9CDCFE\">slowMA<\/span><span style=\"color: #D4D4D4\"> &amp;&amp; <\/span><span style=\"color: #9CDCFE\">fastMA_prev<\/span><span style=\"color: #D4D4D4\"> &lt;= <\/span><span style=\"color: #9CDCFE\">slowMA_prev<\/span><span style=\"color: #D4D4D4\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">OrderSend<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #DCDCAA\">Symbol<\/span><span style=\"color: #D4D4D4\">(), <\/span><span style=\"color: #4FC1FF\">OP_BUY<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">LotSize<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">Ask<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">\"Buy Order\"<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">clrBlue<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Este bloque comprueba:\n<ul class=\"wp-block-list\">\n<li>\u00bfEs el Fast MA <strong>actualmente por encima de<\/strong> \u00bfel Slow MA?<\/li>\n\n\n\n<li>\u00bfFue el Fast MA <strong>inferior o igual a<\/strong> al Slow MA en el <strong>vela anterior<\/strong>?<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Si <strong>s\u00ed<\/strong>desencadena un <strong>Orden de compra<\/strong> con:\n<ul class=\"wp-block-list\">\n<li><code>Symbol()<\/code>: par del gr\u00e1fico actual (por ejemplo, EURUSD).<\/li>\n\n\n\n<li><code>OP_BUY<\/code>: tipo de pedido.<\/li>\n\n\n\n<li><code>LotSize<\/code>: Cantidad del lote.<\/li>\n\n\n\n<li><code>Ask<\/code>: Precio de venta actual (precio de compra).<\/li>\n\n\n\n<li><code>2<\/code>: deslizamiento.<\/li>\n\n\n\n<li><code>0, 0<\/code>: Sin Stop Loss ni Take Profit.<\/li>\n\n\n\n<li><code>\"Buy Order\"<\/code>: comentario de pedido.<\/li>\n\n\n\n<li><code>clrBlue<\/code>: color indicado en la carta para el pedido.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"sell-condition\">Condici\u00f3n de venta<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-auto-translation=\"\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>if (fastMA &lt; slowMA &amp;&amp; fastMA_prev >= slowMA_prev) {\nOrderSend(Symbol(), OP_SELL, LotSize, Bid, 2, 0, 0, \"Sell Order\", 0, 0, clrRed);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (<\/span><span style=\"color: #9CDCFE\">fastMA<\/span><span style=\"color: #D4D4D4\"> &lt; <\/span><span style=\"color: #9CDCFE\">slowMA<\/span><span style=\"color: #D4D4D4\"> &amp;&amp; <\/span><span style=\"color: #9CDCFE\">fastMA_prev<\/span><span style=\"color: #D4D4D4\"> &gt;= <\/span><span style=\"color: #9CDCFE\">slowMA_prev<\/span><span style=\"color: #D4D4D4\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">OrderSend<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #DCDCAA\">Symbol<\/span><span style=\"color: #D4D4D4\">(), <\/span><span style=\"color: #4FC1FF\">OP_SELL<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">LotSize<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">Bid<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">\"Sell Order\"<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">clrRed<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Este bloque comprueba:\n<ul class=\"wp-block-list\">\n<li>\u00bfEs el Fast MA <strong>a continuaci\u00f3n<\/strong> \u00bfel Slow MA?<\/li>\n\n\n\n<li>\u00bfFue el Fast MA <strong>superior o igual a<\/strong> al Slow MA anteriormente?<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Si <strong>s\u00ed<\/strong>coloca un <strong>Orden de venta<\/strong> utilizando <code>OrderSend()<\/code> con los mismos par\u00e1metros, pero para <code>OP_SELL<\/code>.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-auto-translation=\"\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>return(0);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #C586C0\">return<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Finaliza el <code>start()<\/code> y devuelve 0 (no es necesario para la funcionalidad, pero es la sintaxis est\u00e1ndar).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"next-steps-in-building-better-eas\">Pr\u00f3ximos pasos para crear mejores EA<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Una vez que tu EA funcione, probablemente querr\u00e1s mejorarlo. Puede hacerlo:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A\u00f1adir <strong>Stop Loss<\/strong> y <strong>Obtener beneficios<\/strong> l\u00f3gica.<\/li>\n\n\n\n<li>Implementar <strong>trailing stops<\/strong>.<\/li>\n\n\n\n<li>M\u00e1s informaci\u00f3n <strong>indicadores<\/strong> o filtros personalizados.<\/li>\n\n\n\n<li>Incluya <strong>gesti\u00f3n de riesgos<\/strong> caracter\u00edsticas.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Las posibilidades son infinitas. Cuanto m\u00e1s aprenda, m\u00e1s potente ser\u00e1 su EA de Forex.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-use-a-forex-vps-for-your-expert-advisor\">\u00bfPor qu\u00e9 utilizar un Forex VPS para su Expert Advisor?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Llegados a este punto, puede que est\u00e9 pensando: <em>\"Genial, he hecho mi EA. Pero \u00bfnecesito dejar mi ordenador encendido 24\/7?\".<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">La respuesta es no, para eso sirve un Forex VPS. Un Virtual Private Server (VPS) permite que su EA funcione sin parar en un servidor remoto, lo que le proporciona un tiempo de actividad estable, low latency, y un trading ininterrumpido, especialmente crucial para el trading automatizado, <a href=\"https:\/\/socialvps.net\/es\/como-poner-un-ea-o-robot-en-un-forex-vps\/\">robot forex<\/a> y estrategias algor\u00edtmicas.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">El uso de un VPS garantiza que su EA siga funcionando aunque se caiga Internet o se bloquee su PC.<br>Si se toma en serio la automatizaci\u00f3n, necesita un Forex VPS. Consiga su propio Forex VPS de alto rendimiento de SocialVPS y mantenga su EA. <a href=\"https:\/\/socialvps.net\/es\/puede-mt4-ejecutar-sin-problemas-en-8gb-ram-vps-desglose-completo-en-el-interior\/\">funcionando sin problemas<\/a> 24\/7.<\/p>\n\n\n\n<div class=\"wp-block-data443-irp-shortcode irp-shortcode\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faqs\">FAQs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"how-long-does-it-take-to-learn-mql4\">\u00bfCu\u00e1nto tiempo se tarda en aprender a utilizar MQL4?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Los principiantes pueden empezar a escribir EA sencillos en pocos d\u00edas. Aprender funciones m\u00e1s avanzadas puede llevar unas semanas o meses, dependiendo de tu dedicaci\u00f3n.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"can-i-create-a-forex-ea-without-coding\">\u00bfPuedo crear un EA de Forex sin codificaci\u00f3n?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">S\u00ed, hay constructores de EA sin c\u00f3digo disponibles en l\u00ednea, pero a menudo son limitados. Aprender MQL4 le da un control total y flexibilidad sobre sus estrategias.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"is-a-forex-ea-profitable\">\u00bfEs rentable un EA de Forex?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Un EA de Forex puede ser rentable si se basa en una estrategia s\u00f3lida y est\u00e1 bien probado. El backtesting y la optimizaci\u00f3n son cruciales para el \u00e9xito a largo plazo.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"can-i-use-the-same-ea-on-different-currency-pairs\">\u00bfPuedo utilizar el mismo EA en diferentes pares de divisas?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">S\u00ed, pero es posible que tenga que ajustar la configuraci\u00f3n (como los per\u00edodos de MA o tama\u00f1o de lote) para adaptarse a diferentes pares o plazos.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-should-i-run-my-forex-ea-on-a-vps\">\u00bfPor qu\u00e9 deber\u00eda ejecutar mi EA de Forex en un VPS?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Un VPS mantiene su EA en l\u00ednea 24\/7, <a href=\"https:\/\/socialvps.net\/es\/impacto-del-tiempo-de-inactividad-en-los-servidores-de-divisas-y-como-evitarlo\/\" target=\"_blank\" rel=\"noopener noreferrer\">evita tiempos de inactividad<\/a>, y mejora la velocidad de ejecuci\u00f3n, que puede ser decisiva en los mercados cambiantes.<\/p>","protected":false},"excerpt":{"rendered":"<p>SocialVPS \u2014 MetaTrader 4 (MT4) is one of the most popular platforms among Forex traders, and one of its biggest strengths is the ability to automate trades using Expert Advisors (EAs). If you\u2019ve ever wondered how traders build those automated trading bots, this guide is your starting point. In this article, we\u2019ll break down the [&hellip;]<\/p>","protected":false},"author":6,"featured_media":17487,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[117],"class_list":["post-17485","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-robot-forex"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Learn the basics of MQL4 and how to create your own Forex ea (robot). Start building automated strategies for MetaTrader 4\/5 with this beginner\u2019s guide.\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"Writer SocialVPS\"\/>\n\t<meta name=\"msvalidate.01\" content=\"E4365D2CC45B722A3FF6BD10B07C1C13\" \/>\n\t<meta name=\"yandex-verification\" content=\"ab19199c5bd79eec\" \/>\n\t<meta name=\"keywords\" content=\"how to create forex ea,basics mql4\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"es_ES\" \/>\n\t\t<meta property=\"og:site_name\" content=\"SocialVPS\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"The Basics of MQL4 : How to Create Your First Forex EA\" \/>\n\t\t<meta property=\"og:description\" content=\"Learn the basics of MQL4 and how to create your own Forex ea (robot). Start building automated strategies for MetaTrader 4\/5 with this beginner\u2019s guide.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/The-Basics-of-MQL4-How-to-Create-Your-First-Forex-EA.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/The-Basics-of-MQL4-How-to-Create-Your-First-Forex-EA.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2025-05-08T10:23:42+07:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-07-27T01:24:48+07:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/socialvpsforex\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/socialvpsforex\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@svps_since2013\" \/>\n\t\t<meta name=\"twitter:title\" content=\"The Basics of MQL4 : How to Create Your First Forex EA\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Learn the basics of MQL4 and how to create your own Forex ea (robot). Start building automated strategies for MetaTrader 4\/5 with this beginner\u2019s guide.\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@svps_since2013\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/The-Basics-of-MQL4-How-to-Create-Your-First-Forex-EA.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/#blogposting\",\"name\":\"The Basics of MQL4 : How to Create Your First Forex EA\",\"headline\":\"The Basics of MQL4 : How to Create Your First Forex EA\",\"author\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/author\\\/writer-socialvps\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/socialvps.net\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/The-Basics-of-MQL4-How-to-Create-Your-First-Forex-EA.jpg\",\"width\":1200,\"height\":628},\"datePublished\":\"2025-05-08T10:23:42+00:00\",\"dateModified\":\"2025-07-27T01:24:48+00:00\",\"inLanguage\":\"es-ES\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/#webpage\"},\"articleSection\":\"Tutorial, Robot Forex\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/socialvps.net\\\/es\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/categoria\\\/tutorial\\\/#listItem\",\"name\":\"Tutorial\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/categoria\\\/tutorial\\\/#listItem\",\"position\":2,\"name\":\"Tutorial\",\"item\":\"https:\\\/\\\/socialvps.net\\\/es\\\/categoria\\\/tutorial\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/#listItem\",\"name\":\"The Basics of MQL4 : How to Create Your First Forex EA\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/#listItem\",\"position\":3,\"name\":\"The Basics of MQL4 : How to Create Your First Forex EA\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/categoria\\\/tutorial\\\/#listItem\",\"name\":\"Tutorial\"}}]},{\"@type\":\"FAQPage\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/#aioseo-faq-page-maf80u0z\",\"name\":\"The Basics of MQL4 : How to Create Your First Forex EA\",\"description\":\"Learn the basics of MQL4 and how to create your own Forex ea (robot). Start building automated strategies for MetaTrader 4\\\/5 with this beginner\\u2019s guide.\",\"url\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"How long does it take to learn MQL4?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"For beginners, you can start writing simple EAs in just a few days. Learning more advanced features can take a few weeks or months depending on your dedication.\"}},{\"@type\":\"Question\",\"name\":\"Can I create a Forex EA without coding?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Yes, there are no-code EA builders available online, but they are often limited. Learning MQL4 gives you full control and flexibility over your strategies.\"}},{\"@type\":\"Question\",\"name\":\"Is a Forex EA profitable?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"A Forex EA can be profitable if it\\u2019s based on a sound strategy and well-tested. Backtesting and optimization are crucial to long-term success.\"}},{\"@type\":\"Question\",\"name\":\"Can I use the same EA on different currency pairs?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Yes, but you may need to tweak the settings (like MA periods or lot size) to fit different pairs or timeframes.\"}},{\"@type\":\"Question\",\"name\":\"Why should I run my Forex EA on a VPS?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"A VPS keeps your EA online 24\\\/7, prevents downtime, and improves execution speed\\u2014which can make or break your strategy in fast-moving markets.\"}}],\"inLanguage\":\"es\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/#breadcrumblist\"}},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/#organization\",\"name\":\"SocialVPS\",\"description\":\"SocialVPS established since 2013, we always guarantee the quality of server uptime 99.9%, 24-hour CS support, and provide world-class service at the lowest price in its class. We are also committed to meeting the needs of our customers, with an expert and professional support team.\",\"url\":\"https:\\\/\\\/socialvps.net\\\/es\\\/\",\"email\":\"support@socialvps.net\",\"telephone\":\"+12345644878\",\"foundingDate\":\"2013-01-15\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":1,\"maxValue\":20},\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/socialvps.net\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Logo-SVPS-baru-juga.svg\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/#organizationLogo\",\"width\":200,\"height\":50},\"image\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/socialvpsforex\",\"https:\\\/\\\/x.com\\\/svps_since2013\",\"https:\\\/\\\/www.instagram.com\\\/socialvps_official\\\/\",\"https:\\\/\\\/www.youtube.com\\\/@SocialVPS-net\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/socialvpsofficial\\\/\"],\"address\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/#postaladdress\",\"@type\":\"PostalAddress\",\"streetAddress\":\"Jl. KH. Muchtar Tabrani\",\"postalCode\":\"17134\",\"addressLocality\":\"Bekasi\",\"addressRegion\":\"Jawa Barat\",\"addressCountry\":\"ID\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/author\\\/writer-socialvps\\\/#author\",\"url\":\"https:\\\/\\\/socialvps.net\\\/es\\\/author\\\/writer-socialvps\\\/\",\"name\":\"Writer SocialVPS\",\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/socialvps.net\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/Writer-SocialVPS.webp\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/socialvpsforex\",\"https:\\\/\\\/x.com\\\/svps_since2013\",\"https:\\\/\\\/www.instagram.com\\\/socialvps_official\\\/\",\"https:\\\/\\\/www.youtube.com\\\/@SocialVPS-net\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/socialvpsofficial\\\/\"],\"description\":\"A content writer at SocialVPS who focuses on creating informative and educational articles related to Forex VPS services, trading guides, and VPS usage tips to help traders improve their trading performance.\",\"jobTitle\":\"SEO Specialist\",\"knowsLanguage\":[\"English\",\"Indonesia\"]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/#website\",\"url\":\"https:\\\/\\\/socialvps.net\\\/es\\\/\",\"name\":\"SocialVPS\",\"alternateName\":\"Social VPS\",\"description\":\"The Best Forex VPS Hosting for Trading\",\"inLanguage\":\"es-ES\",\"publisher\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/es\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>The Basics of MQL4 : How to Create Your First Forex EA<\/title>\n\n","aioseo_head_json":{"title":"Los fundamentos de MQL4 : C\u00f3mo crear su primer EA de Forex","description":"Aprenda los conceptos b\u00e1sicos de MQL4 y c\u00f3mo crear su propio Forex ea (robot). Comience a construir estrategias automatizadas para MetaTrader 4\/5 con esta gu\u00eda para principiantes.","canonical_url":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"how to create forex ea,basics mql4","webmasterTools":{"msvalidate.01":"E4365D2CC45B722A3FF6BD10B07C1C13","yandex-verification":"ab19199c5bd79eec","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/#blogposting","name":"The Basics of MQL4 : How to Create Your First Forex EA","headline":"The Basics of MQL4 : How to Create Your First Forex EA","author":{"@id":"https:\/\/socialvps.net\/es\/author\/writer-socialvps\/#author"},"publisher":{"@id":"https:\/\/socialvps.net\/es\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/The-Basics-of-MQL4-How-to-Create-Your-First-Forex-EA.jpg","width":1200,"height":628},"datePublished":"2025-05-08T10:23:42+00:00","dateModified":"2025-07-27T01:24:48+00:00","inLanguage":"es-ES","mainEntityOfPage":{"@id":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/#webpage"},"isPartOf":{"@id":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/#webpage"},"articleSection":"Tutorial, Robot Forex"},{"@type":"BreadcrumbList","@id":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/socialvps.net\/es\/#listItem","position":1,"name":"Home","item":"https:\/\/socialvps.net\/es\/","nextItem":{"@type":"ListItem","@id":"https:\/\/socialvps.net\/es\/categoria\/tutorial\/#listItem","name":"Tutorial"}},{"@type":"ListItem","@id":"https:\/\/socialvps.net\/es\/categoria\/tutorial\/#listItem","position":2,"name":"Tutorial","item":"https:\/\/socialvps.net\/es\/categoria\/tutorial\/","nextItem":{"@type":"ListItem","@id":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/#listItem","name":"The Basics of MQL4 : How to Create Your First Forex EA"},"previousItem":{"@type":"ListItem","@id":"https:\/\/socialvps.net\/es\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/#listItem","position":3,"name":"The Basics of MQL4 : How to Create Your First Forex EA","previousItem":{"@type":"ListItem","@id":"https:\/\/socialvps.net\/es\/categoria\/tutorial\/#listItem","name":"Tutorial"}}]},{"@type":"FAQPage","@id":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/#aioseo-faq-page-maf80u0z","name":"The Basics of MQL4 : How to Create Your First Forex EA","description":"Learn the basics of MQL4 and how to create your own Forex ea (robot). Start building automated strategies for MetaTrader 4\/5 with this beginner\u2019s guide.","url":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/","mainEntity":[{"@type":"Question","name":"How long does it take to learn MQL4?","acceptedAnswer":{"@type":"Answer","text":"For beginners, you can start writing simple EAs in just a few days. Learning more advanced features can take a few weeks or months depending on your dedication."}},{"@type":"Question","name":"Can I create a Forex EA without coding?","acceptedAnswer":{"@type":"Answer","text":"Yes, there are no-code EA builders available online, but they are often limited. Learning MQL4 gives you full control and flexibility over your strategies."}},{"@type":"Question","name":"Is a Forex EA profitable?","acceptedAnswer":{"@type":"Answer","text":"A Forex EA can be profitable if it\u2019s based on a sound strategy and well-tested. Backtesting and optimization are crucial to long-term success."}},{"@type":"Question","name":"Can I use the same EA on different currency pairs?","acceptedAnswer":{"@type":"Answer","text":"Yes, but you may need to tweak the settings (like MA periods or lot size) to fit different pairs or timeframes."}},{"@type":"Question","name":"Why should I run my Forex EA on a VPS?","acceptedAnswer":{"@type":"Answer","text":"A VPS keeps your EA online 24\/7, prevents downtime, and improves execution speed\u2014which can make or break your strategy in fast-moving markets."}},{"@type":"Question","name":"How long does it take to learn MQL4?","acceptedAnswer":{"@type":"Answer","text":"For beginners, you can start writing simple EAs in just a few days. Learning more advanced features can take a few weeks or months depending on your dedication."}},{"@type":"Question","name":"Can I create a Forex EA without coding?","acceptedAnswer":{"@type":"Answer","text":"Yes, there are no-code EA builders available online, but they are often limited. Learning MQL4 gives you full control and flexibility over your strategies."}},{"@type":"Question","name":"Is a Forex EA profitable?","acceptedAnswer":{"@type":"Answer","text":"A Forex EA can be profitable if it\u2019s based on a sound strategy and well-tested. Backtesting and optimization are crucial to long-term success."}},{"@type":"Question","name":"Can I use the same EA on different currency pairs?","acceptedAnswer":{"@type":"Answer","text":"Yes, but you may need to tweak the settings (like MA periods or lot size) to fit different pairs or timeframes."}},{"@type":"Question","name":"Why should I run my Forex EA on a VPS?","acceptedAnswer":{"@type":"Answer","text":"A VPS keeps your EA online 24\/7, prevents downtime, and improves execution speed\u2014which can make or break your strategy in fast-moving markets."}}],"inLanguage":"es","breadcrumb":{"@id":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/#breadcrumblist"}},{"@type":"Organization","@id":"https:\/\/socialvps.net\/es\/#organization","name":"SocialVPS","description":"SocialVPS established since 2013, we always guarantee the quality of server uptime 99.9%, 24-hour CS support, and provide world-class service at the lowest price in its class. We are also committed to meeting the needs of our customers, with an expert and professional support team.","url":"https:\/\/socialvps.net\/es\/","email":"support@socialvps.net","telephone":"+12345644878","foundingDate":"2013-01-15","numberOfEmployees":{"@type":"QuantitativeValue","minValue":1,"maxValue":20},"logo":{"@type":"ImageObject","url":"https:\/\/socialvps.net\/wp-content\/uploads\/2022\/08\/Logo-SVPS-baru-juga.svg","@id":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/#organizationLogo","width":200,"height":50},"image":{"@id":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/#organizationLogo"},"sameAs":["https:\/\/www.facebook.com\/socialvpsforex","https:\/\/x.com\/svps_since2013","https:\/\/www.instagram.com\/socialvps_official\/","https:\/\/www.youtube.com\/@SocialVPS-net","https:\/\/www.linkedin.com\/company\/socialvpsofficial\/"],"address":{"@id":"https:\/\/socialvps.net\/es\/#postaladdress","@type":"PostalAddress","streetAddress":"Jl. KH. Muchtar Tabrani","postalCode":"17134","addressLocality":"Bekasi","addressRegion":"Jawa Barat","addressCountry":"ID"}},{"@type":"Person","@id":"https:\/\/socialvps.net\/es\/author\/writer-socialvps\/#author","url":"https:\/\/socialvps.net\/es\/author\/writer-socialvps\/","name":"Writer SocialVPS","image":{"@type":"ImageObject","url":"https:\/\/socialvps.net\/wp-content\/uploads\/2025\/06\/Writer-SocialVPS.webp"},"sameAs":["https:\/\/www.facebook.com\/socialvpsforex","https:\/\/x.com\/svps_since2013","https:\/\/www.instagram.com\/socialvps_official\/","https:\/\/www.youtube.com\/@SocialVPS-net","https:\/\/www.linkedin.com\/company\/socialvpsofficial\/"],"description":"A content writer at SocialVPS who focuses on creating informative and educational articles related to Forex VPS services, trading guides, and VPS usage tips to help traders improve their trading performance.","jobTitle":"SEO Specialist","knowsLanguage":["English","Indonesia"]},{"@type":"WebSite","@id":"https:\/\/socialvps.net\/es\/#website","url":"https:\/\/socialvps.net\/es\/","name":"SocialVPS","alternateName":"Social VPS","description":"The Best Forex VPS Hosting for Trading","inLanguage":"es-ES","publisher":{"@id":"https:\/\/socialvps.net\/es\/#organization"}}]},"og:locale":"es_ES","og:site_name":"SocialVPS","og:type":"article","og:title":"The Basics of MQL4 : How to Create Your First Forex EA","og:description":"Learn the basics of MQL4 and how to create your own Forex ea (robot). Start building automated strategies for MetaTrader 4\/5 with this beginner\u2019s guide.","og:url":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/","og:image":"https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/The-Basics-of-MQL4-How-to-Create-Your-First-Forex-EA.jpg","og:image:secure_url":"https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/The-Basics-of-MQL4-How-to-Create-Your-First-Forex-EA.jpg","og:image:width":1200,"og:image:height":628,"article:published_time":"2025-05-08T10:23:42+07:00","article:modified_time":"2025-07-27T01:24:48+07:00","article:publisher":"https:\/\/www.facebook.com\/socialvpsforex","article:author":"https:\/\/www.facebook.com\/socialvpsforex","twitter:card":"summary_large_image","twitter:site":"@svps_since2013","twitter:title":"The Basics of MQL4 : How to Create Your First Forex EA","twitter:description":"Learn the basics of MQL4 and how to create your own Forex ea (robot). Start building automated strategies for MetaTrader 4\/5 with this beginner\u2019s guide.","twitter:creator":"@svps_since2013","twitter:image":"https:\/\/socialvps.net\/wp-content\/uploads\/2025\/05\/The-Basics-of-MQL4-How-to-Create-Your-First-Forex-EA.jpg"},"aioseo_meta_data":{"post_id":"17485","title":"#post_title","description":"Aprenda los conceptos b\u00e1sicos de MQL4 y c\u00f3mo crear su propio Forex ea (robot). Comience a construir estrategias automatizadas para MetaTrader 4\/5 con esta gu\u00eda para principiantes.","keywords":[{"label":"how to create forex ea","value":"how to create forex ea"},{"label":"basics mql4","value":"basics mql4"}],"keyphrases":{"focus":{"keyphrase":"forex ea","score":91,"analysis":{"keyphraseInTitle":{"score":9,"maxScore":9,"error":0},"keyphraseInDescription":{"score":9,"maxScore":9,"error":0},"keyphraseLength":{"score":9,"maxScore":9,"error":0,"length":2},"keyphraseInURL":{"score":5,"maxScore":5,"error":0},"keyphraseInIntroduction":{"score":9,"maxScore":9,"error":0},"keyphraseInSubHeadings":{"score":3,"maxScore":9,"error":1},"keyphraseInImageAlt":{"score":9,"maxScore":9,"error":0},"keywordDensity":{"type":"best","score":9,"maxScore":9,"error":0}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":true,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[{"id":"#aioseo-faq-page-maf80u0z","slug":"faq-page","graphName":"FAQPage","label":"FAQ","properties":{"name":"#post_title","description":"Learn the basics of MQL4 and how to create your own Forex ea (robot). Start building automated strategies for MetaTrader 4\/5 with this beginner\u2019s guide.","questions":[{"question":"How long does it take to learn MQL4?","answer":"For beginners, you can start writing simple EAs in just a few days. Learning more advanced features can take a few weeks or months depending on your dedication."},{"question":"Can I create a Forex EA without coding?","answer":"Yes, there are no-code EA builders available online, but they are often limited. Learning MQL4 gives you full control and flexibility over your strategies."},{"question":"Is a Forex EA profitable?","answer":"A Forex EA can be profitable if it\u2019s based on a sound strategy and well-tested. Backtesting and optimization are crucial to long-term success."},{"question":"Can I use the same EA on different currency pairs?","answer":"Yes, but you may need to tweak the settings (like MA periods or lot size) to fit different pairs or timeframes."},{"question":"Why should I run my Forex EA on a VPS?","answer":"A VPS keeps your EA online 24\/7, prevents downtime, and improves execution speed\u2014which can make or break your strategy in fast-moving markets."}]},"value":"faq-page"}]},"schema_type":"default","schema_type_options":null,"pillar_content":true,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"seo_analyzer_scan_date":"2025-08-14 19:41:44","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":"0","open_ai":"{\"title\":{\"suggestions\":[],\"usage\":0},\"description\":{\"suggestions\":[],\"usage\":0}}","ai":{"faqs":[],"keyPoints":[],"titles":[],"descriptions":[],"socialPosts":{"email":[],"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2025-05-08 09:10:48","updated":"2026-06-19 20:30:28"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/socialvps.net\/es\/\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">\/<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/socialvps.net\/es\/categoria\/tutorial\/\" title=\"Tutorial\">Tutorial<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">\/<\/span><span class=\"aioseo-breadcrumb\">\n\tThe Basics of MQL4 : How to Create Your First Forex EA\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/socialvps.net\/es\/"},{"label":"Tutorial","link":"https:\/\/socialvps.net\/es\/categoria\/tutorial\/"},{"label":"The Basics of MQL4 : How to Create Your First Forex EA","link":"https:\/\/socialvps.net\/es\/los-fundamentos-de-mql4-como-crear-tu-primer-forex-ea\/"}],"_links":{"self":[{"href":"https:\/\/socialvps.net\/es\/wp-json\/wp\/v2\/posts\/17485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/socialvps.net\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/socialvps.net\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/socialvps.net\/es\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/socialvps.net\/es\/wp-json\/wp\/v2\/comments?post=17485"}],"version-history":[{"count":0,"href":"https:\/\/socialvps.net\/es\/wp-json\/wp\/v2\/posts\/17485\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/socialvps.net\/es\/wp-json\/wp\/v2\/media\/17487"}],"wp:attachment":[{"href":"https:\/\/socialvps.net\/es\/wp-json\/wp\/v2\/media?parent=17485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/socialvps.net\/es\/wp-json\/wp\/v2\/categories?post=17485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/socialvps.net\/es\/wp-json\/wp\/v2\/tags?post=17485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}