Trabajo finalizado
Tarea técnica
I need to have an indicator modified with an additional feature. The original indicator was written several years ago, on this service, and is an ema crossover alert on the MT4 chart.
As currently written: when a selected ema/sma crosses another one of different time value (let's say 5ema over 50ema), an arrow appears on the chart, at the close of the candle representing the crossover, and an audible alert, from the MT4 library of alerts, is heard. Concurrently, an email message indicates the currency pair involved, the time of the crossover, the time frame of the chart, and the bearish or bullish direction of the crossover.
As the current indicator is written, I can select only one crossover alert at a time, let's say bearish, indicated by a red arrow. I would like to add a feature that causes the indicator to alternate between bearish and bullish arrows of different color, as the trend changes and the ema crossovers alternate direction. Stated differently, when the short period ema crosses the long period ema, from above, a red arrow (owner's choice) signifies the crossover. When the short period ema crosses the long period ema from below, a blue or aqua (owner's choice) arrow signifies the event. The history of crossover arrows is to remain on the chart (both bullish and bearish), but the most current crossover direction must be indicated only by the color of arrow that represents the current crossover direction. I want no other changes, only the added feature described above.
Please notice that, as written, the ema crossover alert allows for many operator choices, which need to remain intact in the modified version.
Attached is the source code of the present indicator.