Finally here is a Coral Trend Indicator for MT5 with alert of price crossing.
This is a great, easy to read trend indicator. Just set the period for calculating the trend and whether or not you want an alert when the price crosses the trend line.
Green indicates an uptrend, red is a downtrend, and yellow means no trend.
Buffers for EAs
You can also use this indicator in an EA. Buffer 0 contains the data of this indicator.
There are 3 parameters for this indicator.
- Alert price crossing Coral line - set this to true if you want MT5 to alert you when the price crosses the trend line up or down.
- Coral Period - Enter a period for calculating the trend line. I've found 20-35 works best. You can also add another one with a longer period and create a system based on the crossing of the 2.
- Width of Coral Line - this defaults to 5 but you can set the number smaller if the line is too thick.
input int cPeriod = 34; // Coral Period
input int width = 5; // Width of Coral Line
Thank you and happy pipping!