How to Attach an EA (Expert Advisor/Trading Robot)
to a Chart in MT4 (MetaTrader4)!

1. Open the appropriate chart for your Expert Advisor following these steps. In this example, we are attaching the GBP/JPY 15-Min Trend-Following EA to the GBP/JPY 15-Minute Chart.

A. Choose the appropriate currency pair from File, then click "New Chart" at the top of the menu.

B. A list of currency pairs will appear in a pop-up window. Choose the appropriate currency pair. In this example, it's GBP/JPY.

C. Then choose the appropriate candlestick time frame for your EA (robot). The time frame will always be included in the EA file name. (Note: If your EA runs on Renko bars, it will not use a time frame. See the Renko tutorial for this).

2. Open the Navigator to display the EA/Robot files: Click the Navigator Icon to open it.

3. Locate your Roulette TRADER EA in the Navigator window. Click and drag it onto your chart (or double click it).

4. The EA properties window will open with 3 tabs (About, Common, Inputs). You may also open this window by right-clicking anywhere on your chart after the EA is attached and selecting Expert Advisor > Properties (as shown)...

After the window opens, click the "Common" tab to display the options...

A. Enable Alerts: This is optional. If enabled, your chart will make noises when something happens.
B. Check this box to enable LIVE Trading. Uncheck to disable it.
C. Allow DLL Imports: Not required but I usually check it.
D. Allow import of external experts: Not required.
E. Allow Modification of Signal Settings: Not Required but I usually check this box.

Click the Inputs tab to change the EA settings (see #5 below).


You may save these settings as your Defaults to save time in the future. In your MT4 menu, open Tools > Options and open the Experts Advisors tab. This is how I set up my EA defaults below. The "Disable" settings are a precaution to prevent the EA from trading on a currency pair, time frame, or account it shouldn't be trading.

5a. Now click on the Inputs tab. This displays all of the variable settings for the EA's trading conditions, beginning with the Money Management Settings. You may change the money management settings directly from here. The 3 pink arrows show the settings used when Roulette Trader Money Management = True.

To use the "Fixed Lots" setting, change "Roulette Trader Money Management" to False. This will disable the RT Money Management and use the Fixed Lot setting on every trade.

5b. Here you can customize the trading hours settings (StartHour, EndHour, StartMinute, EndMinute). V3-V9 EAs use "StartTime" and "EndTime" for the trading hours settings.

6. If you're unsure of what settings to use for your allocated margin, you may LOAD a Preset file that was included with your robot. If you purchased a V2 robot, the presets are located in the "Include, Scripts & Presets" file. V3-v9 EAs will include their own Presets folder in the download file. CLICK HERE for more info on using the Preset files.

Once you are done adjusting your settings, you can SAVE these settings to create your own Preset file so you won't need to do this all over again the next time you attach this EA. Just click SAVE and name it. Include the name of the robot in the file name so you know which EA settings are for.

Once you are happy with your settings, click OK to attach it to your chart.

7.  When your EA is attached to the chart, the name will appear in the top right corner, with additional EA details on the left. The currency pair and time frame will also appear on the top left. Make sure the currency pair and time frame match your EA. A frown face on the top right means that Live Trading is disabled.

7. final attachement

8. To enable or disable live trading, or just open the properties window again, right click anywhere on the chart and choose Expert Advisor > Properties. Here you can also choose to Remove the EA from the chart.

8. Open Properties from chart

Open the "Common" tab, check the box "Allow Live Trading" and OK.

9. If you have "Enable Live Trading" checked in the properties window but you still have a sad face in the top right corner of your chart, click the AutoTrading button in the top menu to activate live trading. This should give you a smiley face. You may also use this button to quickly turn On/Off live trading, assuming Live Trading is enabled in the properties window. It will not enable if the properties box is unchecked.

9. Auto Trading Button

10. If you have a smiley face on the top right side of your chart, then your chart is trading LIVE and just waiting for the next signal.

Your Expert Advisor is Now Attached
and ready for Live Trading or Back-Testing

IMPORTANT: If you close MT4 or turn your computer off, trading will also stop. Therefore, I highly recommend using a virtual private server (VPS) if you will be using the trading robots for live trading. This is especially important for the automated money management. CLICK HERE for recommended VPS services.

For all EAs that start with "RT_V2" in the file name... If you close your MT4 trading platform or recompile your robot source code while there are no open trades on that EA, the money management will lose unit count and default back to the minimum lot size. This is  ONLY if you have NO OPEN trades at the time you restart MT4 or compile your EA. The EA calculates the next lot size based on the most recent trade closed from that EA during that MT4 operating session so always try to reboot MT4 while there is a trade open on that EA.

If you must close your MT4 during a money management cycle WITH NO OPEN TRADES, you can manually adjust for this by changing your Minimum lot size to what the next trade size should be in your money management cycle. Once the next trade opens, change your Minimum_Lot setting back to the normal Minimum_Lot setting. The software will continue the lot count based on the result of that next trade.

For all "V3-V9" versions of EAs, these are newer EAs and calculate the next lot size at the opening of each trade by referencing the last closed trade from that EA in the account history so restarting MT4 at any time "should" not cause the EA to lose it's unit count in the money management cycle. However, if you detach the EA and re-attach it, it will re-initialize the EA (create a new starting point) and cause the next trade to open at the Minimum Lot setting. To play it safe, always try to restart MT4 (ie. to perform Windows Updates) while the EA has a trade open so it cannot lose its place in the money management cycle.

Copyright 2021 - Roulette Trader - All Rights Reserved