> ## Documentation Index
> Fetch the complete documentation index at: https://www.emoguardian.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Expert Advisors

For example, if you have three EAs (EA\_1, EA\_2, and EA\_3) running on a VPS server, you can set a maximum daily loss in the **Daily Limit** tab. Once this limit is reached, all EAs will be stopped, and all positions and orders will be closed. This can help prevent erratic behavior during abnormal market conditions. The following day, the EAs can be automatically reloaded at midnight (platform time). The parameters in the **Daily Limit** tab also allow you to customize the start and end of each trading day.

Similarly, limits can be configured using the **Time Ranges** tab. You can define up to three different time ranges, each with its own maximum loss or maximum number of trades. If any of these limits are reached, the EAs will be stopped. By selecting the corresponding checkbox in the **EAs** tab, you can choose to automatically reload the EAs once the limits are reset.

![Expert Advisors](https://content.gitbook.com/content/szl1rbhEYuoojSer2aup/blobs/LX0mSSUz81cxvlCNnyK3/image.png)

## How to use this function:

1\. Load the EA that you would like to reload any chart.

2\. Right click on the chart and select "Save Template as".

3\. Create a template, save it in the folder MQL5>Files>EMOG\_EA (see the image below and the video).

4\. Repeat for all the EAs that you would like to load (for instance you can create TemplateA.tpl to load the EA\_A, you can create Template\_B.tpl for the EA\_B ...etc...).

5\. Select the checkbox in the EA tab.

6\. Insert the name of the Templates that contain the EA that you would like to load.

If you wish to attach the EA to a specific symbol, use this notation: TemplateName.tpl!SYMBOL  (i.e. Template\_A.tpl!EURUSD to load EA\_A to EUR/USD).

If you do not need to specify any symbol, the EA will be attached to a random symbol.

The templates need to be created only the first time, they do not need to be recreated and resaved every time. For the next use of the same template, you can just select the checkbox and specify the template name.

If your EA has some specific settings (Input variables) these must be specified and saved when creating the template that will 'host' the EA.

When you right click on the chart, and select *Save Template* option, you will be proposed the folder MQL5 > Profile > Template to save the template.

![Expert Advisors](https://content.gitbook.com/content/szl1rbhEYuoojSer2aup/blobs/nqUY1Cyyw7AKuBMxZeYK/EA1__2.png)

Click on MQL5 and select the folder MQL5 > Files > EMOG\_EA instead and save the template there.

![Expert Advisors](https://content.gitbook.com/content/szl1rbhEYuoojSer2aup/blobs/84hELvO5QuvQChGDDfEc/EA1__2%20\(1\).png)

As usual EmoGuardian will make sure that the template exists and that the notation used in the EA tab is correct, otherwise the user will be notified.

The procedure might seem complicated but after it's understood the whole process takes (literally) 30 seconds. For more clarity, check the video below:

<iframe width="100%" height="420" src="https://www.youtube.com/embed/3oYdw4zKvQM" title="YouTube video" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />
