MT4 Script to Locate Highs and Lows on the Price Chart

Novice traders usually have a lot of problems locating the proper price highs and lows or peaks and valleys on the price chart to plot the support and resistance lines. They usually choose the wrong and weak highs and lows to plot the support and resistance lines, and so the lines they plot are mainly invalid.

This is a common problem among novice traders. Even experienced traders sometimes make mistakes in locating the proper highs and lows. It takes some time to train the brain and eyes to see the real and main highs and lows. Most of the time novice traders think that they have located a strong high and low, but they are wrong.

There are a few solutions for this problem when you are new to chart analysis. There are some tools that can help you to see the highs and lows properly. One of the easy to access tools is the ZigZag indicator. It is one of the default MetaTrader indicators.

Before you read the rest of this article, please subscribe to our newsletter:

To add the ZigZag indicator to your charts, just (1) open a price chart, and then (2) press Ctrl+N to open the Navigator, (3) open the indicators dropdown menu, (4) scrolls down and (5) drag and drop ZigZag to the chart:

ZigZag default settings is 12 which is a little fast. It means it locates the small and weak highs and lows which can cause you to make mistake in plotting the lines. You can use the larger settings like 24 or 36 to make the indicator locate the bigger and stronger highs and lows. Then you can connect the highs and lows with trend lines and have the support and resistance lines on your charts:

The other tool you can use is the scripts or indicators that mark the highs and lows on the price charts. You can download a sample of such a script here on LuckScout. Please note that this tool is a script that has to be installed in the scripts folder. It is not an indicator or Expert Advisor (robot).

1. Click Here to download the script file.

2. Run your MT4 platform.

3. Click on “File” menu at the top left of your MT4 platform.

4. Click on “Open Data Folder”.

5. Open the “MQL4” folder.

6. Open the “Scripts” folder.

7. Copy and paste the Highs_Lows.ex4 file you just downloaded to the “Scripts” folder.

8. Restart the MT4 platform.

9. Press Ctrl+N to open the navigator. Open the “Scripts” dropdown.

10. Double click on Highs_Lows:

11. Choose the “Common” tab and check the “Allow live trading” and “Allow DLL imports” on the opened dialogue box:

12. Click on the “Inputs” tab. As you see, the script default settings is 24. If you click on the OK button, the script marks the highs and lows with blue and red objects:

You can change the script settings to a larger number like 48 and so it will mark the stronger highs and lows. This helps you to locate stronger support and resistance lines on the chart, and so the trade setups will be stronger too. You can easily plot the support and resistance lines using the object this script places on the charts. Look how you could locate one of the strongest support lines, and so, one of the strongest support breakouts in the history of EUR/USD by using the Highs_Lows script:

This is how you can also locate the chart patterns using the Highs_Lows script:

Before you apply the script on a chart with a different settings, first you have to delete all the objects already placed on the chart by this script. The reason is that the script doesn’t remove the objects it has already placed on the chart and when you apply it on the chart again with a different settings, the new objects will be added to the previous ones and this makes you confused.

To remove the objects from the chart, you have to right click on the chart, click on “Objects List”. Then click on one of the objects and press Ctrl+A to select all objects. Click on the “Delete” button at the right and all the objects will be deleted.

To learn how to use this script, you can apply on different currency pairs charts and plot the lines. Share you charts here and ask for the others’ opinion about the support and resistance lines you locate.


How Do You Like the Highs_Lows Script?

Thank you for voting
You have already voted on this poll!
Please select an option!

0 0 votes
Article Rating
Categorized as Trading

By The LuckScout Team

I don't believe in luck. I believe in sweat. The more you sweat, the luckier you get.

Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x

New Report