Forum

trend indy based on break of swing high / low

I would like to add something to an indicator that I wrote but have not been able to work out how to do it. The indicator currently does two things 1. first, it marks bars with a green or red x that form a swing high or swing low. (It uses a while loop so that swings that have equal highs or equal

Put indicator values into an array

Is it possible to take the values of an indicator and put them into an array so that the values of the indicator can be looped through. I have tried for a while to find a way to do this but can't work it out. Below iis the core of the code for an indicator to mark spike highs (it allows for bars

while in indicator crashing platform

relative newbie trying to code an indicator that marks bars that are completely below the 20 EMA (i.e. high below 20 EMA) and only mark the first instance since there was a whole bar above the MA (i.e. low above MA) and alos the opposite (ie first whole bar above the MA). When I put in while loops

accounting for equal highs / equal lows in swing indicator

I adapted the 3_bar_swing.mq4 indy to have fewer criteria so that lows are not considered in the downswingbar and highs are not considered in the upswingbar I would like to adapt it further to cope with situations where there are equal highs and equal lows in the pattern so, the downswing bar would