Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Last cross of indicator above or below a value (0)
Trying to figure out how to code something but not quite sure where to start. Part of a strategy needs to find the time or bar number of lowest low or highest high of the oscillator between the current cross and the last cross of the zero line. In other words, if the oscillator is crossing 0 on this bar, go back and find the last cross of 0. Between this bar and the bar that the oscillator last crossed zero, find the bar with the highest high or lowest low. Conceptually it seems easy but I don't have a clue where to start. Would this have to be done in a loop structure working backward to check each bar for a cross or can I use something with the Cross command and a qualifier for the last occurance like [1]?
If anyone can give me an idea of where to start I'd appreciate it. Thanks!
Can you help answer these questions from other members on NexusFi?
Thanks! I hadn't thought of working forward with this. I figured it would be simpler to wait for the event and then work backwards. I think I can manage to put together something using your technique. Appreciate the help!