{"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":"le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea","status":"publish","type":"post","link":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\/","title":{"rendered":"Le basi di MQL4: come creare il vostro primo EA Forex"},"content":{"rendered":"<p class=\"wp-block-paragraph\">SocialVPS \u2014 MetaTrader 4 (MT4) \u00e8 una delle piattaforme pi\u00f9 popolari tra i trader Forex e uno dei suoi maggiori punti di forza \u00e8 la possibilit\u00e0 di automatizzare le operazioni utilizzando Expert Advisors (EA). Se vi siete mai chiesti come i trader costruiscono questi bot di trading automatizzati, questa guida \u00e8 il vostro punto di partenza. In questo articolo vi spiegheremo le basi di MQL4 (il linguaggio di programmazione alla base di MT4) e vi illustreremo come creare il vostro primo EA. <a href=\"https:\/\/socialvps.net\/it\/come-creare-un-robot-di-trading-forex-passo-dopo-passo\/\" title=\"Come creare un robot di trading sul Forex: Guida passo passo\">EA Forex<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-mql4-and-why-is-it-important\">Cos'\u00e8 l'MQL4 e perch\u00e9 \u00e8 importante?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Prima di immergerci nella codifica, cerchiamo di capire cos'\u00e8 effettivamente 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=\"Applicazioni MQL4 per EA Forex\" 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, \u00e8 un linguaggio di programmazione di alto livello progettato specificamente per sviluppare strategie di trading sulla piattaforma MT4. Con l'MQL4 \u00e8 possibile creare indicatori personalizzati, script e, soprattutto, Expert Advisors, noti anche come Forex robot o <a href=\"https:\/\/socialvps.net\/it\/ea-scripting-come-creare-algoritmi-di-trading-sul-forex\/\" title=\"EA Scripting: come creare algoritmi di trading Forex\">bot di trading algoritmici<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Perch\u00e9 \u00e8 importante per voi? Perch\u00e9 automatizzare la vostra strategia vi permette di eliminare i pregiudizi emotivi, di operare 24 ore su 24, 7 giorni su 7, e di testare le idee pi\u00f9 velocemente di quanto non possa fare il trading manuale.<\/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\/it\/ea-scripting-come-creare-algoritmi-di-trading-sul-forex\/\" target=\"_blank\" rel=\"dofollow\" class=\"s3744ef77423c9419f72986965396b47b\"><div style=\"padding-left:1em; padding-right:1em;\"><span class=\"ctaText\">Leggi anche<\/span>&nbsp; <span class=\"postTitle\">EA Scripting: come creare algoritmi di trading Forex<\/span><\/div><\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-a-forex-ea\">Che cos'\u00e8 un EA Forex?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Un EA (Expert Advisor) \u00e8 un software scritto in MQL4 che automatizza la vostra strategia di trading. Monitora il mercato, apre e chiude le operazioni in base alle condizioni definite dall'utente e pu\u00f2 anche inviare avvisi. In sostanza, agisce come il vostro assistente di trading personale, senza lo stipendio.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Creare un EA forex \u00e8 come dare vita al vostro piano di trading. Segue le istruzioni senza emozioni, senza fatica e senza ripensamenti.<\/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\/it\/che-cose-un-consulente-esperto\/\" target=\"_blank\" rel=\"dofollow\" class=\"s3744ef77423c9419f72986965396b47b\"><div style=\"padding-left:1em; padding-right:1em;\"><span class=\"ctaText\">Leggi anche<\/span>&nbsp; <span class=\"postTitle\">Che cos'\u00e8 un Expert Advisor? Strumento automatico per il trading sul Forex<\/span><\/div><\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"tools-youll-need-to-create-your-first-ea\">Strumenti necessari per creare il vostro primo EA<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Parliamo degli strumenti di base e della configurazione necessaria per iniziare.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>MetaTrader 4 Piattaforma:<\/strong> Scaricate dal vostro broker o dal sito <a href=\"https:\/\/www.metatrader4.com\/en\">sito ufficiale MetaTrader 4<\/a>.<\/li>\n\n\n\n<li><strong>MetaEditore:<\/strong> Installato con MT4, \u00e8 il luogo in cui scriverete e compilerete il vostro codice.<\/li>\n\n\n\n<li><strong>Pazienza:<\/strong> Imparare a codificare, anche solo le basi, richiede tempo.<\/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\/it\/come-installare-facilmente-lexpert-advisor-ea-in-metatrader\/\" target=\"_blank\" rel=\"dofollow\" class=\"s3744ef77423c9419f72986965396b47b\"><div style=\"padding-left:1em; padding-right:1em;\"><span class=\"ctaText\">Leggi anche<\/span>&nbsp; <span class=\"postTitle\">Come installare facilmente Expert Advisor (EA) in MetaTrader<\/span><\/div><\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"your-first-mql4-forex-ea-step-by-step\">Il vostro primo EA Forex MQL4: passo dopo passo<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ora passiamo alla parte pi\u00f9 divertente: costruire il vostro primo EA Forex. Iniziamo con una strategia di trading di base:<\/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>Acquistare quando la media mobile a 10 periodi incrocia la media mobile a 20 periodi.<\/em><br><em>Vendere quando la media mobile a 10 periodi incrocia la media mobile a 20 periodi.<\/em><\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-open-metaeditor\">Passo 1: aprire MetaEditor<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Aprite la vostra piattaforma MT4.<\/li>\n\n\n\n<li>Fate clic sull'icona MetaEditor o premete il tasto <code>F4<\/code>.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-create-a-new-ea-file\">Passo 2: Creare un nuovo file EA<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In MetaEditor, andare su <strong>File \u2192 New \u2192 Expert Advisor (template)<\/strong>.<\/li>\n\n\n\n<li>Dare un nome come <code>SempliceMA_EA<\/code>.<\/li>\n\n\n\n<li>Cliccare <strong>Next \u2192 Finish<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-write-the-ea-code\">Passo 3: scrivere il codice EA<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Di seguito \u00e8 riportato un codice EA semplificato da utilizzare per iniziare:<\/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\">Questo Expert Advisor (EA) esegue il trading automatico su MetaTrader 4 utilizzando una strategia di incrocio di medie mobili semplici (SMA). Quando la MA veloce incrocia la MA lenta, apre un ordine di acquisto. Quando la MA veloce incrocia la MA lenta, apre un ordine di vendita.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-compile-and-test\">Passo 4: compilazione e test<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Colpire il <strong>Compile<\/strong> in MetaEditor.<\/li>\n\n\n\n<li>Tornate alla MT4 e trascinate il vostro EA su un grafico per testarlo.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Ecco fatto. Avete appena creato il vostro primo sistema di trading automatico utilizzando MQL4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Certamente! Analizziamo questo script MQL4 Expert Advisor <code>SimpleMA_EA.mq4<\/code>per aiutare voi o qualsiasi principiante a capire chiaramente cosa fa ogni parte del codice.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"code-breakdown-and-function-explanations\">Disaggregazione del codice e spiegazioni delle funzioni<\/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>Ci\u00f2 consente di effettuare controlli pi\u00f9 severi sugli errori in fase di compilazione per garantire un codice pi\u00f9 pulito.<\/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>Questi sono <strong>input variables<\/strong>, e ci\u00f2 significa che gli utenti possono facilmente modificarli nelle impostazioni dell'EA:\n<ul class=\"wp-block-list\">\n<li><code>FastMA<\/code>: il periodo per il <strong>Fast Moving Average<\/strong>, ad esempio 10.<\/li>\n\n\n\n<li><code>SlowMA<\/code>: il periodo per il <strong>Slow Moving Average<\/strong>, ad esempio 20.<\/li>\n\n\n\n<li><code>LotSize<\/code>: Quanto sar\u00e0 grande l'operazione (0,1 lotti in questo 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>Il <code>start()<\/code> \u00e8 la funzione <strong>main loop<\/strong> negli EA MQL4 (utilizzati nelle versioni precedenti di MetaTrader 4).<\/li>\n\n\n\n<li>Questa funzione esegue <strong>ogni volta che si verifica un nuovo tick (aggiornamento del prezzo)<\/strong> viene ricevuto.<\/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\">MODE_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\">MODE_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>Queste linee calcolano il <strong>corrente<\/strong> dei valori di <strong>Fast MA<\/strong> e <strong>Slow MA<\/strong> utilizzando <code>iMA()<\/code>:\n<ul class=\"wp-block-list\">\n<li><code>NULL<\/code>: simbolo del grafico corrente.<\/li>\n\n\n\n<li><code>0<\/code>: periodo di tempo attuale.<\/li>\n\n\n\n<li><code>FastMA\/SlowMA<\/code>periodo per ogni AdG.<\/li>\n\n\n\n<li><code>0<\/code>: turno (candela corrente).<\/li>\n\n\n\n<li><code>MODE_SMA<\/code>: uso <strong>Simple Moving Average<\/strong>.<\/li>\n\n\n\n<li><code>PRICE_CLOSE<\/code>: in base al prezzo di chiusura della candela.<\/li>\n\n\n\n<li><code>0<\/code>: candela attuale.<\/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\">MODE_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\">MODE_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>Queste linee ottengono il <strong>candela precedente<\/strong> Valori di MA (<code>shift = 1<\/code>), in modo da poter confrontare l'attuale con il precedente per la logica del crossover.<\/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>VPS Forex<\/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\/it\/prezzi-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>da <del>$8,3<\/del> a $ 5,7\/fatturati annualmente<\/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 offre il miglior VPS 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 offre il miglior VPS 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\">Logica Trading<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"buy-condition\">Condizioni di acquisto<\/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>Questo blocco controlla:\n<ul class=\"wp-block-list\">\n<li>Il Fast MA <strong>attualmente sopra<\/strong> la MA lenta?<\/li>\n\n\n\n<li>Il Fast MA <strong>inferiore o uguale<\/strong> alla MA lenta nel <strong>candela precedente<\/strong>?<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Se <strong>s\u00ec<\/strong>, si innesca un <strong>Ordine di acquisto<\/strong> con:\n<ul class=\"wp-block-list\">\n<li><code>Symbol()<\/code>: coppia di grafici corrente (ad es. EURUSD).<\/li>\n\n\n\n<li><code>OP_BUY<\/code>Tipo di ordine.<\/li>\n\n\n\n<li><code>LotSize<\/code>: quantit\u00e0 del lotto.<\/li>\n\n\n\n<li><code>Ask<\/code>: prezzo corrente di domanda (prezzo di acquisto).<\/li>\n\n\n\n<li><code>2<\/code>: slittamento.<\/li>\n\n\n\n<li><code>0, 0<\/code>: nessun Stop Loss o Take Profit.<\/li>\n\n\n\n<li><code>\"Buy Order\"<\/code>: commento all'ordine.<\/li>\n\n\n\n<li><code>clrBlue<\/code>: colore indicato nella tabella per l'ordine.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"sell-condition\">Condizioni di vendita<\/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\">clrRosso<\/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>Questo blocco controlla:\n<ul class=\"wp-block-list\">\n<li>Il Fast MA <strong>ora sotto<\/strong> la MA lenta?<\/li>\n\n\n\n<li>Il Fast MA <strong>superiore o uguale<\/strong> alla Slow MA in precedenza?<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Se <strong>s\u00ec<\/strong>, pone un <strong>Ordine di vendita<\/strong> utilizzando <code>OrderSend()<\/code> con gli stessi parametri, ma per <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>Termina il <code>start()<\/code> e restituisce 0 (non necessario per la funzionalit\u00e0, ma sintassi standard).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"next-steps-in-building-better-eas\">I prossimi passi per costruire EA migliori<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Una volta che il vostro EA funziona, probabilmente vorrete migliorarlo. \u00c8 possibile:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Aggiungi <strong>Stop Loss<\/strong> e <strong>Profitto<\/strong> logica.<\/li>\n\n\n\n<li>Attuare <strong>trailing stop<\/strong>.<\/li>\n\n\n\n<li>Utilizzare di pi\u00f9 <strong>indicatori<\/strong> o filtri personalizzati.<\/li>\n\n\n\n<li>Includere <strong>gestione del rischio<\/strong> caratteristiche.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Le possibilit\u00e0 sono infinite. Pi\u00f9 si impara, pi\u00f9 il proprio EA forex diventa potente.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-use-a-forex-vps-for-your-expert-advisor\">Perch\u00e9 utilizzare un Forex VPS per il vostro Expert Advisor?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A questo punto, potreste pensare: <em>\"Bene, ho creato il mio EA. Ma devo lasciare il mio computer acceso 24 ore su 24, 7 giorni su 7?\".<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">La risposta \u00e8 no, a questo serve un Forex VPS. Un Virtual Private Server (VPS) consente all'EA di funzionare ininterrottamente su un server remoto, garantendo tempi di attivit\u00e0 stabili, low latency e trading ininterrotto, particolarmente importante per il trading automatico, <a href=\"https:\/\/socialvps.net\/it\/come-inserire-un-ea-o-un-robot-in-un-vps-forex\/\">robot forex<\/a> sistemi e strategie algoritmiche.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">L'uso di un VPS garantisce che l'EA continui a funzionare anche se Internet si interrompe o il PC si blocca.<br>Se volete fare sul serio con l'automazione, avete bisogno di un Forex VPS. Ottenete il vostro Forex VPS ad alte prestazioni da SocialVPS e mantenete il vostro EA <a href=\"https:\/\/socialvps.net\/it\/mt4-puo-essere-eseguito-senza-problemi-su-vps-da-8gb-di-ram-con-una-spiegazione-completa-allinterno\/\">senza intoppi<\/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\">Domande frequenti<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"how-long-does-it-take-to-learn-mql4\">Quanto tempo occorre per imparare MQL4?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Per i principianti, \u00e8 possibile iniziare a scrivere semplici EA in pochi giorni. L'apprendimento di funzioni pi\u00f9 avanzate pu\u00f2 richiedere alcune settimane o mesi, a seconda della vostra dedizione.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"can-i-create-a-forex-ea-without-coding\">\u00c8 possibile creare un EA Forex senza codificare?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">S\u00ec, ci sono dei costruttori di EA senza codice disponibili online, ma spesso sono limitati. Imparare l'MQL4 vi d\u00e0 il pieno controllo e la flessibilit\u00e0 delle vostre strategie.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"is-a-forex-ea-profitable\">Un EA Forex \u00e8 redditizio?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Un EA Forex pu\u00f2 essere redditizio se si basa su una strategia solida e ben testata. Il backtesting e l'ottimizzazione sono fondamentali per il successo a lungo termine.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"can-i-use-the-same-ea-on-different-currency-pairs\">Posso utilizzare lo stesso EA su coppie di valute diverse?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">S\u00ec, ma potrebbe essere necessario modificare le impostazioni (come i periodi MA o la dimensione del lotto) per adattarle a coppie o timeframe diversi.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-should-i-run-my-forex-ea-on-a-vps\">Perch\u00e9 dovrei eseguire il mio EA Forex su un VPS?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Un VPS mantiene l'EA online 24 ore su 24, 7 giorni su 7, <a href=\"https:\/\/socialvps.net\/it\/impatto-dei-tempi-di-inattivita-sui-server-forex-e-come-prevenirli\/\" target=\"_blank\" rel=\"noopener noreferrer\">previene i tempi di inattivit\u00e0<\/a>, e migliora la velocit\u00e0 di esecuzione, che pu\u00f2 rendere la vostra strategia pi\u00f9 o meno efficace in mercati in rapida evoluzione.<\/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\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-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=\"it_IT\" \/>\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\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-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\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-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\\\/it\\\/author\\\/writer-socialvps\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/#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\":\"it-IT\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\\\/#webpage\"},\"articleSection\":\"Tutorial, Robot Forex\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/socialvps.net\\\/it\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/categoria\\\/tutorial\\\/#listItem\",\"name\":\"Tutorial\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/categoria\\\/tutorial\\\/#listItem\",\"position\":2,\"name\":\"Tutorial\",\"item\":\"https:\\\/\\\/socialvps.net\\\/it\\\/categoria\\\/tutorial\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\\\/#listItem\",\"name\":\"The Basics of MQL4 : How to Create Your First Forex EA\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\\\/#listItem\",\"position\":3,\"name\":\"The Basics of MQL4 : How to Create Your First Forex EA\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/categoria\\\/tutorial\\\/#listItem\",\"name\":\"Tutorial\"}}]},{\"@type\":\"FAQPage\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-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\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-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\":\"it-IT\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\\\/#breadcrumblist\"}},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/#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\\\/it\\\/\",\"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\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\\\/#organizationLogo\",\"width\":200,\"height\":50},\"image\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/le-basi-di-mql4-come-creare-il-vostro-primo-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\\\/it\\\/#postaladdress\",\"@type\":\"PostalAddress\",\"streetAddress\":\"Jl. KH. Muchtar Tabrani\",\"postalCode\":\"17134\",\"addressLocality\":\"Bekasi\",\"addressRegion\":\"Jawa Barat\",\"addressCountry\":\"ID\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/author\\\/writer-socialvps\\\/#author\",\"url\":\"https:\\\/\\\/socialvps.net\\\/it\\\/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\\\/it\\\/#website\",\"url\":\"https:\\\/\\\/socialvps.net\\\/it\\\/\",\"name\":\"SocialVPS\",\"alternateName\":\"Social VPS\",\"description\":\"The Best Forex VPS Hosting for Trading\",\"inLanguage\":\"it-IT\",\"publisher\":{\"@id\":\"https:\\\/\\\/socialvps.net\\\/it\\\/#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":"Le basi di MQL4: come creare il vostro primo EA Forex","description":"Imparate le basi di MQL4 e come creare il vostro Forex ea (robot). Iniziate a costruire strategie automatizzate per MetaTrader 4\/5 con questa guida per principianti.","canonical_url":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-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\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-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\/it\/author\/writer-socialvps\/#author"},"publisher":{"@id":"https:\/\/socialvps.net\/it\/#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":"it-IT","mainEntityOfPage":{"@id":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\/#webpage"},"isPartOf":{"@id":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\/#webpage"},"articleSection":"Tutorial, Robot Forex"},{"@type":"BreadcrumbList","@id":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/socialvps.net\/it\/#listItem","position":1,"name":"Home","item":"https:\/\/socialvps.net\/it\/","nextItem":{"@type":"ListItem","@id":"https:\/\/socialvps.net\/it\/categoria\/tutorial\/#listItem","name":"Tutorial"}},{"@type":"ListItem","@id":"https:\/\/socialvps.net\/it\/categoria\/tutorial\/#listItem","position":2,"name":"Tutorial","item":"https:\/\/socialvps.net\/it\/categoria\/tutorial\/","nextItem":{"@type":"ListItem","@id":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\/#listItem","name":"The Basics of MQL4 : How to Create Your First Forex EA"},"previousItem":{"@type":"ListItem","@id":"https:\/\/socialvps.net\/it\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\/#listItem","position":3,"name":"The Basics of MQL4 : How to Create Your First Forex EA","previousItem":{"@type":"ListItem","@id":"https:\/\/socialvps.net\/it\/categoria\/tutorial\/#listItem","name":"Tutorial"}}]},{"@type":"FAQPage","@id":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-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\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-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":"it-IT","breadcrumb":{"@id":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\/#breadcrumblist"}},{"@type":"Organization","@id":"https:\/\/socialvps.net\/it\/#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\/it\/","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\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\/#organizationLogo","width":200,"height":50},"image":{"@id":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-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\/it\/#postaladdress","@type":"PostalAddress","streetAddress":"Jl. KH. Muchtar Tabrani","postalCode":"17134","addressLocality":"Bekasi","addressRegion":"Jawa Barat","addressCountry":"ID"}},{"@type":"Person","@id":"https:\/\/socialvps.net\/it\/author\/writer-socialvps\/#author","url":"https:\/\/socialvps.net\/it\/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\/it\/#website","url":"https:\/\/socialvps.net\/it\/","name":"SocialVPS","alternateName":"Social VPS","description":"The Best Forex VPS Hosting for Trading","inLanguage":"it-IT","publisher":{"@id":"https:\/\/socialvps.net\/it\/#organization"}}]},"og:locale":"it_IT","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\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-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":"Imparate le basi di MQL4 e come creare il vostro Forex ea (robot). Iniziate a costruire strategie automatizzate per MetaTrader 4\/5 con questa guida per principianti.","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-21 00:32:49"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/socialvps.net\/it\/\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">\/<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/socialvps.net\/it\/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\/it\/"},{"label":"Tutorial","link":"https:\/\/socialvps.net\/it\/categoria\/tutorial\/"},{"label":"The Basics of MQL4 : How to Create Your First Forex EA","link":"https:\/\/socialvps.net\/it\/le-basi-di-mql4-come-creare-il-vostro-primo-forex-ea\/"}],"_links":{"self":[{"href":"https:\/\/socialvps.net\/it\/wp-json\/wp\/v2\/posts\/17485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/socialvps.net\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/socialvps.net\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/socialvps.net\/it\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/socialvps.net\/it\/wp-json\/wp\/v2\/comments?post=17485"}],"version-history":[{"count":0,"href":"https:\/\/socialvps.net\/it\/wp-json\/wp\/v2\/posts\/17485\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/socialvps.net\/it\/wp-json\/wp\/v2\/media\/17487"}],"wp:attachment":[{"href":"https:\/\/socialvps.net\/it\/wp-json\/wp\/v2\/media?parent=17485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/socialvps.net\/it\/wp-json\/wp\/v2\/categories?post=17485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/socialvps.net\/it\/wp-json\/wp\/v2\/tags?post=17485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}