Scripts & Custom Indicators – MT5 Desktop Version
1 Understand the Difference
– Scripts – One-time actions. When you drop them on a chart, they run once (e.g., close all orders).
– Custom Indicators – Like built-in indicators but coded by others. They display signals, lines, or data continuously on your chart.
– Scripts – One-time actions. When you drop them on a chart, they run once (e.g., close all orders).
– Custom Indicators – Like built-in indicators but coded by others. They display signals, lines, or data continuously on your chart.
2 Download or Obtain the Files
– Scripts and Indicators come as .ex5 (compiled) or .mq5 (source) files.
– Save them to an easy location (Desktop/Downloads).
– Scripts and Indicators come as .ex5 (compiled) or .mq5 (source) files.
– Save them to an easy location (Desktop/Downloads).
3 Open MT5 and Locate the Data Folder
— In MT5 top menu: File→ Open Data Folder.
– This opens MT5’s working directory.
— In MT5 top menu: File→ Open Data Folder.
– This opens MT5’s working directory.

4 Place Files in the Correct Folder
– In the Data Folder go to:
– In the Data Folder go to:
- – MQL5→ Scripts for scripts.
- – MQL5→ Indicators for custom indicators.
– Copy the downloaded .ex5 or .mq5 files into the appropriate folder.

5 Refresh or Restart MT5
– Go back to MT5.
– In the Navigator window (press Ctrl+N if hidden), right-click Scripts or Indicators → Refresh.
– Or simply restart MT5.
– The new items should appear under Navigator → Scripts or Navigator → Indicators.
– Go back to MT5.
– In the Navigator window (press Ctrl+N if hidden), right-click Scripts or Indicators → Refresh.
– Or simply restart MT5.
– The new items should appear under Navigator → Scripts or Navigator → Indicators.

6 Attach a Script to a Chart
In Navigator → Scripts, drag the script onto the desired chart.
A dialog will appear to confirm settings (if any).
Click OK.
The script executes once.
Tip: Scripts do not run continuously; once done they disappear from the chart.
In Navigator → Scripts, drag the script onto the desired chart.
A dialog will appear to confirm settings (if any).
Click OK.
The script executes once.
Tip: Scripts do not run continuously; once done they disappear from the chart.

7 Attach a Custom Indicator to a Chart
In Navigator → Indicators, drag the indicator onto the chart.
Adjust its parameters under the Inputs tab.
Click OK.
The indicator now displays signals, lines, or data on the chart in real time.
In Navigator → Indicators, drag the indicator onto the chart.
Adjust its parameters under the Inputs tab.
Click OK.
The indicator now displays signals, lines, or data on the chart in real time.

8 Adjust Settings or Remove
– Scripts: Once run, they’re done nothing to remove.
– Indicators: To remove, right-click on the chart → Indicators List → select the indicator → Delete.
– Scripts: Once run, they’re done nothing to remove.
– Indicators: To remove, right-click on the chart → Indicators List → select the indicator → Delete.
9 Enable Algo/Automated Functions (If Needed)
– On the MT5 toolbar, ensure Algo Trading is enabled (green) if your script/indicator requires algorithmic permissions.
– In the indicator or script’s “Common” tab, allow DLL imports if required.
– On the MT5 toolbar, ensure Algo Trading is enabled (green) if your script/indicator requires algorithmic permissions.
– In the indicator or script’s “Common” tab, allow DLL imports if required.

