logo
Get Our New E-Books For Free

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.

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.

Loading
Before you read the rest of this article... Submit your email to receive our eBook for Free:

How Do You Like the Highs_Lows Script?

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

Join Our 22,000+ Loyal Followers Now & Receive Our E-Book For Free!
Download Our E-book For FREE and Don't Miss Our New Articles!
Enter your email address and check your inbox now:

Article by

"Whether you think you can, or you think you cannot, you are right." - Henry Ford

+ Click Here to learn who we are and why this site was created.

+ Click Here to receive our eBook for free.

I want to...

54 thoughts on “MT4 Script to Locate Highs and Lows on the Price Chart
  1. Peter Wagner says:

    Hi Chris

    I had no problem loading this tool – there is only a problem with the ‘traditional MACD’ – no need for reply, just letting you know – I am not really concerned about it because I am not using it.

    • Chris says:

      Hi Peter,

      I just installed it on my platform from the scratch. It works for me. May I see a screenshot from your platform Navigator area to see where the indicator is placed?

  2. Barbara says:

    Chris

    Loaded fine. Can I ask what happens if all objects are not removed first?

    As I would have to remember where some historical trend lines where if I deleted them.

    Thanks

    • Chris says:

      If you run the script with 24 settings, and then run on the same chart with a different settings, then the previous objects will not be removed and the new objects will be added to them.

  3. Bob Harding says:

    Sorry to bother this morning but I do not understand: “Please note that …”

    Does this mean that in order to use the Zig Zag script all other scripts and indicators need to be removed?

    Thanks

  4. Peter Wagner says:

    Hi Chris
    you wrote: “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.”

    Another way is simply control B control A delete

  5. Todd says:

    Hi Chris & Co. — Thanks so much for the Highs & Lows script. It works very well and I don’t see anything about Zig-zag which improves on the script (maybe I’m missing something).

    At full screen you, of course, see a nice message “Learn mare about trading http://www.LuckScout.com” — just want to mention that if you have multiple small windows open (I have 24), this message get repeated in each one of them and occupies a considerably higher %-age of real estate than a full-screen view of a particular currency paid.

    The efforts to educate that you make are so appreciated. Not only has this helped me learn … it’s also been very helpful in terms of improved results trading stocks.

  6. Chris says:

    Hi Chris,

    Thanks so much for script, May I know how long it takes to paint the High/Low on the Daily Chart.

    Chris

  7. Ted says:

    Thanks Chris!

    Looks good!

    Ted

  8. Patrick says:

    Hi chris got a question does the script repaints?

    • No. It places the objects right when you run it. It doesn’t move them after that. Of course if you apply it to the same chart while the script settings is changed, it will place the objects differently. But it doesn’t repaint.

  9. Ben says:

    Hey Chris,

    I am a little confused, only because I’ve seen you say in other articles that we shouldn’t use support/resistance lines.

    Is the is idea not to just use candlesticks and BB’s only??

    Thanks kindly,

    Ben

    • Hi Ben,

      I personally don’t use support/resistance lines to enter the market. However, I plot them on the charts to be aware of the market reactions in advance. A too strong candlestick signal that forms above a strong support levels is more reliable.

  10. Alejandro O. Bastida says:

    Thanks so much Chris, Peter Wagner and the above persons who give their comments.

  11. muhaimin says:

    still really can not plug skriptnya in my MT4 , can paste skip files mt4 such programs ?

  12. muhaimin says:

    masih saja kok gak bisa pasang skriptnya di Mt4 saya, bisakah disalin lewati programs files mt4 misalnya?

  13. Wang says:

    How to open EX4 file?

  14. Wang says:

    How to install the ex4?

    I cant download

  15. hoflich says:

    thank you so much

  16. Himanshu Sahai says:

    Hi Chris Sir

    What should be the ideal deviation and backstep for stronger highs & lows if it matters?

    Regards

  17. PREM KUMAR says:

    Sir,
    Thank you for giving High low script and guiding us. When we run the script in the chart it shows the High and lows. After that as days past if any highs and lows formed in the chart it would be helpful if the Script automatically inserts the high/low mark in the chart. So that we do not want to manually Run the script once more to find if any High/low has been formed newly.

  18. Peter Wagner says:

    Benedict

    Ctrl L – just adds or hides volume on my chart

    ctrl B A on keys and delete (using mouse)- only deletes all the objects on the chart – this includes the values printed on the chart by indicators – however the indicators quickly reappear.

    Indicators must deleted from the edit menu – right click – click INDICATORS – select INDICATOR and then DELETE.

  19. Md. Saiful Islam says:

    Helpful article and resource.

  20. Steve Edwards says:

    This is a good indicator for locating S&R trendlines …. but I am used to using Fractals… as it helps me to find the strong horizontal S&R lines as well Trendlines … I will try this indicator to see if it works better than what I am used to using …. Thank you for this contribution Chris…!!

  21. Caleb I says:

    Please Chris and the LuckScout team, can we make this script an expert advisor so it can plot highs and lows automatically please please. It is very useful but it will perform better if automated, this is my humble request. Thank you.

  22. Caleb I says:

    Or if I can get the mq4(source) file, I can a pay a programmer to develop it and then share it with the community free.

  23. Caleb I says:

    I have contacted the programmer, he asked if the indicator repaints?I believe a non repainting EA works better right?

    • If he wants to create an EA from this script, he has to do it in the way that when the new candlestick opens, it restarts the EA and the EA marks the highs and lows like what the script is doing now. It is not the matter of repainting with this script.

  24. Caleb I says:

    Also thanks for trusting me to deliver, I won’t disappoint you.

  25. Caleb I says:

    Thank you I will communicate this important tip to him.

  26. Caleb I says:

    Hi, Chris it is ready. Cheers.

  27. Caleb I says:

    Yes of course Chris, that was the plan all along haha. Cheers.

Leave a Reply :

Your email address will not be published. Required fields are marked *

*