I followed you, I saw your other indicators in the forum and really are very good programming, which I do not (I'm learning) I would if I could help schedule an indicator of moving averages Junction 5 (arrows ) with all their respective price mode and mode, + alert, and if possible, with the option of using 4 or 3 of those 5 moving averages (you know invalidate some moving averages) would be very grateful indeed,
here I send what I've done (just did it with 3 moving averages, but sometimes I fail, not painted in some crosses), if you could paint whenever there crosses,
and one more thing if you could add the option of an arrow lying, indicated that moving averages are between crossed but in a disorderly manner (without tendecia), so to see in the graph, arrows, indicating when crossing moving averages (trend alzista or bearish) and an arrow indicating the sideways trend and alerts.
As far as I see, you are trying to place arrows when all 3 averages cross on a same bar. That is almost never going to happen and that is probably why you are having a problem with the indicator (if I understood your post correctly)
Detrended price oscillator bars