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)
Hi I'm new to this forum, and this is going to be my first post.
Here's my question: I know you can reference historical data by using "[1]" (1 bar ago), but is it allowed to reference future data using "[-1]" (1 bar ahead)?
I'm asking this question because I'm working on a study that calls for identifying the highest/lowest price within a range of 5 bars, i.e. current bar, 2 bars before current bar, and 2 bars after current bar.
Thanks in advance!
Can you help answer these questions from other members on NexusFi?
But this is not exactly what I'm looking for. Let me do a better job explaining my idea:
1) I would first look for the highest/lowest point within 3 bars, i.e. current bar and previous 2 bars.
2) Then I would wait for the next 2 bars to confirm. If the next 2 bars do not break through the previous range, then the range holds. If the next 2 bars do break through the previous range, then range would adapt dynamically.
Just about anything is possible. Try the above code, I just wrote it free hand so it may need some work and probably a good amount of refinement for your exact needs, but I think you get the general idea.
FYI, here's what I had in mind (hence my original question):
For high point: MaxList(high[2],high[1],high[0],high[-1],high[-2])
For low point: MinList(low[2],low[1],low[0],low[-1],low[-2])
Trying to access a bar that hasn't happened yet is impossible.
That's why H[-1] doesn't work. It's in the future, so you don't know what it will be (unless you have the Delorean with the flux capacitor as stated above).
Here's a system that would work great because it knows whether to buy or sell short today and at what price, as well as what price to close the trade on tomorrow:
I wish my computer knew what the prices are gonna be for the next day or two, but unfortunately, it doesn't.
"I wish my computer knew what the prices are gonna be for the next day or two, but unfortunately, it doesn't."
Sorry for re-activating an old post but am new to MC and thought that you may not be aware that you can call up future bars/prices in Easylanguage. It is a dll called AnyOHLC.dll. However one needs to be very careful in applying it in signals!