Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

Support and Resistance indicator for MQL5 - indicator for MetaTrader 5

Views:
15902
Rating:
(3)
Published:
2023.07.27 12:03
Updated:
2023.10.19 18:14
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The basic idea behind the indicator is to check for bouncebacks between support and resistance levels. There are two input parameters: period and overlook. A support level is the lowest low in the last period bars if this value is equal to the lowest low of the last period+overlook bars. A resistance level is the highest high in the last period bars if it is equal to the highest high of the last period+overlook bars. If there are both support and resistance levels and a bounceback happens (price is between these levels) the support and resistance levels will be displayed on the chart.

In the original Indicator the i integer runs from period+overlook until rates_total, so the for cycle is for(i = rates_total-3;i<rates_total;i++). But for some reason I had to change that to validate my code.

Screenshot of indicator

Check out the video I've made about the mql4 version (there are a few differences between mql4 and mql5 but the logic is the same) :


    Grid, MartinGale include File Grid, MartinGale include File

    Enables Programmers to create Martin Gale and Grid Trading strategies with ease.

    PNG PNG

    Forget about BMP files like a bad dream. Thanks to this library, you can now use the PNG format, which has a number of advantages, such as being more compact without losing image quality and maintaining transparency.

    RectangleTest RectangleTest

    The EA trades using the Rectangle, EMA and SMA indicators.

    Moving Average with alerts on price crossovers Moving Average with alerts on price crossovers

    I wanted to build a moving average which would create an alert when the price moves over the line by a user defined amount of points. It creates both bullish and bearish signals depending on the direction of market price moving through the MA. It is designed for slow length moving averages (default is 200-day MA). EDIT: I now added a second version of the indicator which uses Arrow buffers instead of ObjectCreate.