I’ve updated the code but I knew immediately that it wouldn’t generate the entry signal – it is my fault because I don’t know how to define “Definitehigh” properly. Doing it as “highest[10]” when the market is rising will use a bar that is too recent. In the case of the screengrab, the highest in the range of 10 is simply the previous bar, which isn’t what I want. I need it to look back to find the high that was previously the highest before the market went upwards (at 10:25am on the screengrab). It’s similar to how someone would look back a certain number of bars to find a significant high in a divergence system. How would I do this?
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