One can get the min or max of a dataset as myMIN = lowest[50](CLOSE). But now I want to get the min of last 30. Surely I can do this with a FOR loop. But it will be efficient when I can do as: min = lowest[last30](CLOSE).
What I want is to get the double bottom with 50 bars. The first bottom should be inside the first 5 bars and the second should be inside the last 30 bars (from the 20th to the 50th).
Rough idea: use BARINDEX to count if the last lowest price saved in a variable is older than 30 bars or not. I let you think of it, let me now if it is not clear enough and I’ll try to code it accordingly to what I think about..
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue