So my setup has 3 moving averages. Green (fast moving average), red (meduim moving average) and blue (slow moving average). Now I want to plot a shape named 1 when prices touch my green average, plot shape named 2 when prices touch my red average and 3 when prices touch my blue average and then when prices close above green average, I want to plot arrow which is a shape to buy.
Now I want them in order. I.e if lets say 3 occurs, then I don't want to plot 1 or 2 since its bearish now. I would only want to plot arrow if buy comes. So after 3 shape I only want buy shape and disregard 1 and 2 shapes.
How do I do that ? Exrem is not working here. I am not buying or selling in this code. This is just for plotting shapes and visualising the setup.